注意: 此页面尚未翻译成中文。以下内容为英文原版。A Mnemonic wraps all properties required to compute BIP-39 seeds and convert between phrases and entropy.
Parameter | Type | Description |
---|---|---|
guard | any | The guard object. |
entropy | string | The entropy. |
phrase | string | The mnemonic phrase. |
password ? | null | string | The password for the mnemonic. |
wordlist ? | null | Wordlist | The wordlist for the mnemonic. |
Mnemonic
Property | Modifier | Type | Description |
---|---|---|---|
entropy | readonly | string | The underlying entropy which the mnemonic encodes. |
password | readonly | string | The password used for this mnemonic. If no password is used this is the empty string (i.e. "" ) as per thespecification. |
phrase | readonly | string | The mnemonic phrase of 12, 15, 18, 21 or 24 words. Use the wordlist split method to get the individual words. |
wordlist | readonly | Wordlist | The wordlist for this mnemonic. |
string
The seed.
mnemonic
.
Parameter | Type | Description |
---|---|---|
_entropy | BytesLike | The entropy for the mnemonic. |
wordlist ? | null | Wordlist | The wordlist for the mnemonic. |
string
The mnemonic phrase.
entropy
.
The default password
is the empty string and the default wordlist is the [English wordlist.
Parameter | Type | Description |
---|---|---|
_entropy | BytesLike | The entropy for the mnemonic. |
password ? | null | string | The password for the mnemonic. |
wordlist ? | null | Wordlist | The wordlist for the mnemonic. |
Mnemonic
The new Mnemonic object.
phrase
.
The default password
is the empty string and the default wordlist is the English wordlist.
Parameter | Type | Description |
---|---|---|
phrase | string | The mnemonic phrase. |
password ? | null | string | The password for the mnemonic. |
wordlist ? | null | Wordlist | The wordlist for the mnemonic. |
Mnemonic
The new Mnemonic object.
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.
Parameter | Type | Description |
---|---|---|
phrase | string | The mnemonic phrase. |
wordlist ? | null | Wordlist | The wordlist for the mnemonic. |
boolean
True if the phrase is valid.
phrase
.
Parameter | Type | Description |
---|---|---|
phrase | string | The mnemonic phrase. |
wordlist ? | null | Wordlist | The wordlist for the mnemonic. |
string
The entropy.