fromMnemonic static method
Creates a SigningKey from a mnemonic phrase.
The mnemonic is used to derive a seed, which is then used to create the signing key.
- Parameter mnemonic: The mnemonic phrase.
- Returns: A
Futurethat completes with theSigningKey.
Implementation
static Future<SigningKey> fromMnemonic(final String mnemonic) async {
final bip44 = Bip44.fromMnemonic(mnemonic);
return SigningKey._(
ed25519.SigningKey.fromSeed(
Uint8List.fromList(
await bip44.deriveKey(),
),
),
);
}