fromMnemonicWithoutValidation function

Ed25519KeyIdentity fromMnemonicWithoutValidation(
  1. String mnemonic,
  2. List<int>? derivationPath, {
  3. int offset = HARDENED,
})

Create an Ed25519 based on a mnemonic phrase according to SLIP 0010: https://github.com/satoshilabs/slips/blob/master/slip-0010.md

NOTE: This method derives an identity even if the mnemonic is invalid. It's the responsibility of the caller to validate the mnemonic before calling this method.

@param mnemonic A BIP-39 mnemonic. @param derivationPath an array that is always interpreted as a hardened path. e.g. to generate m/44'/223’/0’/0’/0' the derivation path should be 44, 223, 0, 0, 0 @param skipValidation if true, validation checks on the mnemonics are skipped.

Implementation

Ed25519KeyIdentity fromMnemonicWithoutValidation(
    String mnemonic, List<int>? derivationPath,
    {int offset = HARDENED}) {
  derivationPath ??= [];
  final seed = mnemonicToSeed(mnemonic);
  return fromSeedWithSlip0010(seed, derivationPath, offset: offset);
}