Classes
MnemonicUtils
Constructors
new MnemonicUtils()
| Returns |
|---|
| MnemonicUtils |
Properties
DEFAULT_WORDLIST
The default English wordlist.
ENGLISH_WORDLIST
The English wordlist.
Methods
entropyToMnemonic()
Converts an Entropy to a mnemonic.
| Parameter | Type |
|---|---|
| First | string[] |
| [] |
getMnemonicType()
Gets the type of a mnemonic.
Return values:
0 = MnemonicType.LEGACY: the mnemonic is for a legacy Nimiq wallet.1 = MnemonicType.BIP39: the mnemonic is for a BIP39 wallet.-1 = MnemonicType.UNKNOWN: the mnemonic can be for both.
Throws if the menmonic is invalid.
| Parameter | Type |
|---|---|
| First | string[] |
| Returns |
|---|
| MnemonicType |
isCollidingChecksum()
Tests if a mnemonic can be both for a legacy Nimiq wallet and a BIP39 wallet.
| Parameter | Type |
|---|---|
| First | Entropy |
mnemonicToEntropy()
Converts a mnemonic to an Entropy.
| Parameter | Type |
|---|---|
| First | string[] |
| Returns |
|---|
| Entropy |
mnemonicToExtendedPrivateKey()
Converts a mnemonic to an extended private key.
Optionally takes a password to use for the seed derivation.
| Parameter | Type |
|---|---|
| First | string |
| Returns |
|---|
| ExtendedPrivateKey |
mnemonicToSeed()
Converts a mnemonic to a seed.
Optionally takes a password to use for the seed derivation.
| Parameter | Type |
|---|---|
| First | string |
| Returns |
|---|
| SerialBuffer |