Create a MnemonicPassPhrase
instance.
Default wordlist language used.
Default mnemonic strength.
Validate a mnemonic pass phrase with optional language
.
If the language
argument is ommited, the default
language 'english' will be used.
The bitcoinjs/bip39
package's validateMnemonic
function
checks the mnemonic pass phrase by internally converting
to an entropy bytes array with mnemonicToEntropy
.
Validation steps include size
, checksum bits
and checksum
validations.
(Optional) The language used for the wordlist.
True for valid mnemonic, False for invalid mnemonic.
Get the array representation for the mnemonic pass phrase.
Words are split using a white-space character as a separator.
Array of plain text words
Converts a mnemonic to hexadecimal entropy (of strength
bits).
If the language
argument is ommited, the default
language 'english' will be used.
The bitcoinjs/bip39
package's mnemonicToEntropy
function
converts words into 11 bit binary strings, then validates the
checksum and finally, returns the built entropy hexadecimal
(of strength
bits).
It is not recommended to store the result of this function. Please,
have a look at mnemonicToSeed(m, pw)
instead.
(Optional) The language used for the wordlist.
Returns the hexadecimal format of the entropy value.
Convert a mnemonic to an encrypted hexadecimal seed.
If the password
argument is ommited, an empty password will be assumed.
The bitcoinjs/bip39
package's mnemonicToSeedSync
function
will first normalize the mnemonic pass phrase Buffer to
NFKD form.
Afterwards the buffer will be salted with the password
(or empty) prepend
by the string 'mnemonic'.
In its last step, the function will then use PBKDF2 to derivate the password-
protected hexadecimal seed from the salted buffer.
Buffer containing bytes of the hexadecimal seed.
Random number generator using nacl_bitxorcore
.
Implicit conversion to Buffer
is needed to comply
with bitcoinjs/bip39
.
Number of bytes to generate.
Assert whether language
is a supported language string, or not.
True for supported languages, never false.
Convert an entropy value to a mnemonic pass phrase in plain text.
If the language
argument is ommited, the default
language 'english' will be used.
The bitcoinjs/bip39
package's entropyToMnemonic
function
validates the entropy value by parsing it, then builds the mnemonic
pass phrase by retrieving and joining words from the wordlist.
(Optional) The language used for the wordlist.
Returns the mnemonic pass phrase in plain text format.
Create a random mnemonic pass phrase. Arguments to this method are all optional, default values are static variables of this class.
This static method returns a sentence built following the Bitcoin
BIP39 standard using the bitcoinjs/bip39
library.
(Optional) The language used for the wordlist.
(Optional) Strength of mnemonic pass phrase (% 32 == 0).
(Optional) Random Number Generator to be used.
Returns the mnemonic pass phrase in plain text format.
Generated using TypeDoc
Class
MnemonicPassPhrase
describes a mnemonic pass phrase generator as defined by the Bitcoin BIP39 standard which can be found at following URL:This class uses features provided by the
bitcoinjs/bip39
package and therefor is licensed under the BSD-2 Clause License as mentioned here.https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki
https://github.com/bitcoinjs/bip39
0.1.0