64 lines
2.0 KiB
Plaintext
64 lines
2.0 KiB
Plaintext
_section: Wordlists @<wordlists>
|
|
|
|
_subsection: Wordlist @<Wordlist>
|
|
|
|
_property: wordlist.locale => string
|
|
The locale for this wordlist.
|
|
|
|
_property: wordlist.getWord(index) => string
|
|
Returns the word at //index//.
|
|
|
|
_property: wordlist.getWordIndex(word) => number
|
|
Returns the index of //word// within the wordlist.
|
|
|
|
_property: wordlist.split(mnemonic) => Array<string>
|
|
Returns the mnemonic split into each individual word, according to a
|
|
locale's valid whitespace character set.
|
|
|
|
_property: wordlist.join(words) => string
|
|
Returns the mnemonic by joining //words// together using the
|
|
whitespace that is standard for the locale.
|
|
|
|
_property: Wordlist.check(wordlists) => string<[[DataHexString]]<32>>
|
|
Checks that all words map both directions correctly and return the
|
|
hash of the lists. Sub-classes should use this to validate the wordlist
|
|
is correct against the official wordlist hash.
|
|
|
|
_property: Wordlist.register(wordlist [ , name ]) => void
|
|
Register a wordlist with the list of wordlists, optionally overriding
|
|
the registered //name//.
|
|
|
|
_subsection: Languages @<wordlists--languages>
|
|
|
|
The [official wordlists](link-bip39-wordlists) availalbe in at
|
|
`ethers.wordlists`. In the browser, only the english langauge is
|
|
available by default; to include the others (which increases the
|
|
size of the library), see the dist files in the `ethers` package.
|
|
|
|
_property: ethers.wordlists.cz => Wordlist
|
|
The Czech [[Wordlist]].
|
|
|
|
_property: ethers.wordlists.en => Wordlist
|
|
The English [[Wordlist]].
|
|
|
|
_property: ethers.wordlists.es => Wordlist
|
|
The Spanish [[Wordlist]].
|
|
|
|
_property: ethers.wordlists.fr => Wordlist
|
|
The French [[Wordlist]].
|
|
|
|
_property: ethers.wordlists.it => Wordlist
|
|
The Italian [[Wordlist]].
|
|
|
|
_property: ethers.wordlists.ja => Wordlist
|
|
The Japanese [[Wordlist]].
|
|
|
|
_property: ethers.wordlists.ko => Wordlist
|
|
The Korean [[Wordlist]].
|
|
|
|
_property: ethers.wordlists.zh_cn => Wordlist
|
|
The Simplified Chinese [[Wordlist]].
|
|
|
|
_property: ethers.wordlists.zh_tw => Wordlist
|
|
The Traditional Chinese [[Wordlist]].
|