2020-02-18 01:56:13 +03:00
|
|
|
_section: Wordlists @<wordlists>
|
|
|
|
|
2020-05-08 10:24:40 +03:00
|
|
|
_subsection: Wordlist @<Wordlist>
|
2020-02-18 01:56:13 +03:00
|
|
|
|
|
|
|
_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.
|
|
|
|
|
2020-05-08 10:24:40 +03:00
|
|
|
_property: Wordlist.check(wordlists) => string<[[DataHexString]]<32>>
|
2020-02-18 01:56:13 +03:00
|
|
|
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.
|
|
|
|
|
2020-02-25 22:57:11 +03:00
|
|
|
_property: Wordlist.register(wordlist [ , name ]) => void
|
2020-02-18 01:56:13 +03:00
|
|
|
Register a wordlist with the list of wordlists, optionally overriding
|
|
|
|
the registered //name//.
|
|
|
|
|
2020-05-08 10:24:40 +03:00
|
|
|
_subsection: Languages @<wordlists--languages>
|
2020-02-18 01:56:13 +03:00
|
|
|
|
2020-10-03 19:30:15 +03:00
|
|
|
The [official wordlists](link-bip39-wordlists) available in at
|
|
|
|
`ethers.wordlists`. In the browser, only the english language is
|
2020-06-12 10:38:55 +03:00
|
|
|
available by default; to include the others (which increases the
|
|
|
|
size of the library), see the dist files in the `ethers` package.
|
|
|
|
|
2020-02-18 01:56:13 +03:00
|
|
|
_property: ethers.wordlists.cz => Wordlist
|
2020-05-08 10:24:40 +03:00
|
|
|
The Czech [[Wordlist]].
|
2020-02-18 01:56:13 +03:00
|
|
|
|
|
|
|
_property: ethers.wordlists.en => Wordlist
|
2020-05-08 10:24:40 +03:00
|
|
|
The English [[Wordlist]].
|
2020-02-18 01:56:13 +03:00
|
|
|
|
|
|
|
_property: ethers.wordlists.es => Wordlist
|
2020-05-08 10:24:40 +03:00
|
|
|
The Spanish [[Wordlist]].
|
2020-02-18 01:56:13 +03:00
|
|
|
|
|
|
|
_property: ethers.wordlists.fr => Wordlist
|
2020-05-08 10:24:40 +03:00
|
|
|
The French [[Wordlist]].
|
2020-02-18 01:56:13 +03:00
|
|
|
|
|
|
|
_property: ethers.wordlists.it => Wordlist
|
2020-05-08 10:24:40 +03:00
|
|
|
The Italian [[Wordlist]].
|
2020-02-18 01:56:13 +03:00
|
|
|
|
2020-02-25 22:57:11 +03:00
|
|
|
_property: ethers.wordlists.ja => Wordlist
|
2020-05-08 10:24:40 +03:00
|
|
|
The Japanese [[Wordlist]].
|
2020-02-18 01:56:13 +03:00
|
|
|
|
|
|
|
_property: ethers.wordlists.ko => Wordlist
|
2020-05-08 10:24:40 +03:00
|
|
|
The Korean [[Wordlist]].
|
2020-02-18 01:56:13 +03:00
|
|
|
|
|
|
|
_property: ethers.wordlists.zh_cn => Wordlist
|
2020-05-08 10:24:40 +03:00
|
|
|
The Simplified Chinese [[Wordlist]].
|
2020-02-18 01:56:13 +03:00
|
|
|
|
|
|
|
_property: ethers.wordlists.zh_tw => Wordlist
|
2020-05-08 10:24:40 +03:00
|
|
|
The Traditional Chinese [[Wordlist]].
|