decode method

  1. @override
List<int> decode(
  1. String mnemonic
)
override

Decode a BIP39 mnemonic phrase to obtain the entropy bytes.

This method takes a BIP39 mnemonic phrase, decodes it into binary form, and returns the corresponding entropy bytes as a List<int>.

Parameters:

  • mnemonic: The BIP39 mnemonic phrase to decode.

Example usage:

final decoder = Bip39MnemonicDecoder();
final entropy = decoder.decode("your BIP39 mnemonic phrase here");

Returns: A List<int> containing the decoded entropy bytes.

Implementation

@override
List<int> decode(String mnemonic) {
  final mnemonicBinStr = _decodeAndVerifyBinaryStr(mnemonic);
  return _entropyBytesFromBinaryStr(mnemonicBinStr);
}