I have a 24-word mnemonic, and I want to convert it to public and private keys.
This is how I did it:
const hex = HexCoder.instance; final seed = bip39.mnemonicToSeedHex(_mnmonic); final algorithm = Ed25519(); // The hex.decode(seed) have 64 bytes lengths. final keyPair = await algorithm.newKeyPairFromSeed(hex.decode(seed)); final newPublicKey = await keyPair.extractPublicKey();
But I get this error:
ArgumentError (Invalid argument(s): Seed must have 32 bytes)
What am I missing?