Bip39MnemonicDecoder class
BIP39 (Bitcoin Improvement Proposal 39) mnemonic decoder class.
The Bip39MnemonicDecoder class is responsible for decoding a BIP39 mnemonic phrase into its original binary entropy form. It extends the abstract MnemonicDecoderBase class and provides an implementation specific to BIP39.
To use this class, create an instance with the desired language and then call the decode method with a BIP39 mnemonic phrase as input. It returns the decoded binary entropy as a List<int>.
Example usage:
final mnemonic = Bip39Mnemonic.fromString("your BIP39 mnemonic phrase here");
final decoder = Bip39MnemonicDecoder(Bip39Languages.english);
final entropy = decoder.decode(mnemonic.toStr());
- Inheritance
-
- Object
- MnemonicDecoderBase
- Bip39MnemonicDecoder
Constructors
- Bip39MnemonicDecoder([Bip39Languages? language])
- Constructor for Bip39MnemonicDecoder class.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- language → MnemonicLanguages?
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- wordsList → MnemonicWordsList?
-
finalinherited
- wordsListFinder → MnemonicWordsListFinderBase
-
finalinherited
Methods
-
decode(
String mnemonic) → List< int> -
Decode a BIP39 mnemonic phrase to obtain the entropy bytes.
override
-
decodeWithChecksum(
String mnemonic) → List< int> - Decode a BIP39 mnemonic phrase to obtain the entropy bytes with checksum.
-
findLanguage(
Mnemonic mnemonic) → Tuple< MnemonicWordsList, MnemonicLanguages> -
Finds the language and word list for a given mnemonic phrase.
inherited
-
mnemonicToBinaryStr(
Mnemonic mnemonic, MnemonicWordsList wordsList) → String - mnemonic to binary
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited