Skip to main content
A Mnemonic wraps all properties required to compute BIP-39 seeds and convert between phrases and entropy.

Constructors

new Mnemonic()

Parameters

Returns

Mnemonic

Source

wallet/mnemonic.ts:175

Properties

Methods

computeSeed()

Returns the seed for the mnemonic.

Returns

string The seed.

Source

wallet/mnemonic.ts:191

entropyToPhrase()

Returns the phrase for mnemonic.

Parameters

Returns

string The mnemonic phrase.

Source

wallet/mnemonic.ts:248

fromEntropy()

Create a new Mnemonic from the entropy. The default password is the empty string and the default wordlist is the [English wordlist.

Parameters

Returns

Mnemonic The new Mnemonic object.

Source

wallet/mnemonic.ts:229

fromPhrase()

Creates a new Mnemonic for the phrase. The default password is the empty string and the default wordlist is the English wordlist.

Parameters

Returns

Mnemonic The new Mnemonic object.

Source

wallet/mnemonic.ts:206

isValidMnemonic()

Returns true if phrase is a valid BIP-39 phrase. This checks all the provided words belong to the wordlist, that the length is valid and the checksum is correct.

Parameters

Returns

boolean True if the phrase is valid.

Throws

If the phrase is invalid.

Source

wallet/mnemonic.ts:275

phraseToEntropy()

Returns the entropy for phrase.

Parameters

Returns

string The entropy.

Source

wallet/mnemonic.ts:260