ethers.js/docs/api/utils/wordlists/index.html

23 lines
24 KiB
HTML
Raw Normal View History

2020-02-18 01:56:50 +03:00
<html><head><title>Wordlists</title><link rel="stylesheet" type="text/css" href="/static/style.css"></head><body><div class="sidebar"><div class="header"><div class="logo"><a href="/"><div class="image"></div><div class="name">ethers</div><div class="version">v5.0-beta</div></a></div></div><div class="toc"><div><div class="link title"><a href="/">Documentation</a></div><div class="base show link depth-1"><a href="/getting-started/">Getting Started</a></div><div class="hide link depth-2"><a href="/getting-started/#installing">Installing</a></div><div class="hide link depth-2"><a href="/getting-started/#importing">Importing</a></div><div class="base show link depth-1"><a href="/concepts/">Concepts</a></div><div class="hide link depth-2"><a href="/concepts/events/">Events</a></div><div class="hide link depth-3"><a href="/concepts/events/#solidity-topics">Solidity Topics</a></div><div class="hide link depth-2"><a href="/concepts/gas/">Gas</a></div><div class="hide link depth-3"><a href="/concepts/gas/#gas-price">Gas Price</a></div><div class="hide link depth-3"><a href="/concepts/gas/#gas-limit">Gas Limit</a></div><div class="base ancestor show link depth-1"><a href="/api/">Application Programming Interface</a></div><div class="show link depth-2"><a href="/api/contract/">Contracts</a></div><div class="hide link depth-3"><a href="/api/contract/#buckets">Buckets</a></div><div class="show link depth-2"><a href="/api/signer/">Signers</a></div><div class="hide link depth-3"><a href="/api/signer/#signer">Signer</a></div><div class="hide link depth-3"><a href="/api/signer/#wallet">Wallet</a></div><div class="hide link depth-3"><a href="/api/signer/#voidsigner">VoidSigner</a></div><div class="hide link depth-3"><a href="/api/signer/#externallyownedaccount">ExternallyOwnedAccount</a></div><div class="show link depth-2"><a href="/api/providers/">Providers</a></div><div class="hide link depth-3"><a href="/api/providers/provider/">Provider</a></div><div class="hide link depth-4"><a href="/api/providers/provider/#accounts-methods">Accounts Methods</a></div><div class="hide link depth-4"><a href="/api/providers/provider/#blocks-methods">Blocks Methods</a></div><div class="hide link depth-4"><a href="/api/providers/provider/#ethereum-naming-service-(ens)-methods">Ethereum Naming Service (ENS) Methods</a></div><div class="hide link depth-4"><a href="/api/providers/provider/#logs-methods">Logs Methods</a></div><div class="hide link depth-4"><a href="/api/providers/provider/#network-status-methods">Network Status Methods</a></div><div class="hide link depth-4"><a href="/api/providers/provider/#transactions-methods">Transactions Methods</a></div><div class="hide link depth-4"><a href="/api/providers/provider/#event-emitter-methods">Event Emitter Methods</a></div><div class="hide link depth-4"><a href="/api/providers/provider/#inspection-methods">Inspection Methods</a></div><div class="hide link depth-3"><a href="/api/providers/jsonrpc-provider/">JsonRpcProvider</a></div><div class="hide link depth-4"><a href="/api/providers/jsonrpc-provider/#jsonrpcsigner">JsonRpcSigner</a></div><div class="hide link depth-4"><a href="/api/providers/jsonrpc-provider/#jsonrpcuncheckedsigner">JsonRpcUncheckedSigner</a></div><div class="hide link depth-3"><a href="/api/providers/api-providers/">API Providers</a></div><div class="hide link depth-4"><a href="/api/providers/api-providers/#etherscanprovider">EtherscanProvider</a></div><div class="hide link depth-4"><a href="/api/providers/api-providers/#infuraprovider">InfuraProvider</a></div><div class="hide link depth-4"><a href="/api/providers/api-providers/#alchemyprovider">AlchemyProvider</a></div><div class="hide link depth-4"><a href="/api/providers/api-providers/#cloudfrontprovider">CloudfrontProvider</a></div><div class="hide link depth-3"><a href="/api/providers/other/">Other Providers</a></div><div class="hide link depth-4"><a href="/api/providers/other/#fallbackprovider">FallbackProvider</a></div><div class="hide link depth-4"><a href="/api/providers/other/#ipcprovider">IpcProvider</a></div><div class="h
<a name="wordlists"></a><a name="wordlists"></a><h1 class="show-anchors"><div>Wordlists<div class="anchors"><a class="self" href="#wordlists"></a></div></div></h1>
<a name="wordlist"></a><a name="wordlist"></a><h2 class="show-anchors"><div>Wordlist<div class="anchors"><a class="self" href="#wordlist"></a></div></div></h2>
<div class="property show-anchors"><div class="signature"><span class="path">wordlist</span> . <span class="method">locale</span> <span class="arrow">&rArr;</span> <span class="returns">string</span><div class="anchors"></div></div><div class="body"><p>The locale for this wordlist.</p></div></div>
<div class="property show-anchors"><div class="signature"><span class="path">wordlist</span> . <span class="method">getWord</span> ( <span class="param">index</span> ) <span class="arrow">&rArr;</span> <span class="returns">string</span><div class="anchors"></div></div><div class="body"><p>Returns the word at <i>index</i>.</p></div></div>
<div class="property show-anchors"><div class="signature"><span class="path">wordlist</span> . <span class="method">getWordIndex</span> ( <span class="param">word</span> ) <span class="arrow">&rArr;</span> <span class="returns">number</span><div class="anchors"></div></div><div class="body"><p>Returns the index of <i>word</i> within the wordlist.</p></div></div>
<div class="property show-anchors"><div class="signature"><span class="path">wordlist</span> . <span class="method">split</span> ( <span class="param">mnemonic</span> ) <span class="arrow">&rArr;</span> <span class="returns">Array&lt;&thinsp;string&thinsp;&gt;</span><div class="anchors"></div></div><div class="body"><p>Returns the mnemonic split into each individual word, according to a locale's valid whitespace character set.</p></div></div>
<div class="property show-anchors"><div class="signature"><span class="path">wordlist</span> . <span class="method">join</span> ( <span class="param">words</span> ) <span class="arrow">&rArr;</span> <span class="returns">string</span><div class="anchors"></div></div><div class="body"><p>Returns the mnemonic by joining <i>words</i> together using the whitespace that is standard for the locale.</p></div></div>
<div class="property show-anchors"><div class="signature"><span class="path">Wordlist</span> . <span class="method">check</span> ( <span class="param">wordlists</span> ) <span class="arrow">&rArr;</span> <span class="returns">string&lt;&thinsp;<a href="/api/utils/bytes/#datahexstring">DataHexstring</a>&lt;&thinsp;32&thinsp;&gt;&thinsp;&gt;</span><div class="anchors"></div></div><div class="body"><p>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.</p></div></div>
<div class="property show-anchors"><div class="signature"><span class="path">Wordlist</span> . <span class="method">register</span> ( <span class="param">wordlist</span> [ , <span class="param">name</span> ] ) <span class="arrow">&rArr;</span> <span class="returns">string&lt;&thinsp;<a href="/api/utils/bytes/#datahexstring">DataHexstring</a>&lt;&thinsp;32&thinsp;&gt;&thinsp;&gt;</span><div class="anchors"></div></div><div class="body"><p>Register a wordlist with the list of wordlists, optionally overriding the registered <i>name</i>.</p></div></div>
<a name="wordlist-languages"></a><a name="languages"></a><h2 class="show-anchors"><div>Languages<div class="anchors"><a class="self" href="#wordlist-languages"></a></div></div></h2>
<div class="property show-anchors"><div class="signature"><span class="path">ethers</span> . <span class="path">wordlists</span> . <span class="method">cz</span> <span class="arrow">&rArr;</span> <span class="returns">Wordlist</span><div class="anchors"></div></div><div class="body"><p>The Czech <a href="/api/utils/wordlists/#wordlist">Wordlist</a>.</p></div></div>
<div class="property show-anchors"><div class="signature"><span class="path">ethers</span> . <span class="path">wordlists</span> . <span class="method">en</span> <span class="arrow">&rArr;</span> <span class="returns">Wordlist</span><div class="anchors"></div></div><div class="body"><p>The English <a href="/api/utils/wordlists/#wordlist">Wordlist</a>.</p></div></div>
<div class="property show-anchors"><div class="signature"><span class="path">ethers</span> . <span class="path">wordlists</span> . <span class="method">es</span> <span class="arrow">&rArr;</span> <span class="returns">Wordlist</span><div class="anchors"></div></div><div class="body"><p>The Spanish <a href="/api/utils/wordlists/#wordlist">Wordlist</a>.</p></div></div>
<div class="property show-anchors"><div class="signature"><span class="path">ethers</span> . <span class="path">wordlists</span> . <span class="method">fr</span> <span class="arrow">&rArr;</span> <span class="returns">Wordlist</span><div class="anchors"></div></div><div class="body"><p>The French <a href="/api/utils/wordlists/#wordlist">Wordlist</a>.</p></div></div>
<div class="property show-anchors"><div class="signature"><span class="path">ethers</span> . <span class="path">wordlists</span> . <span class="method">it</span> <span class="arrow">&rArr;</span> <span class="returns">Wordlist</span><div class="anchors"></div></div><div class="body"><p>The Italian <a href="/api/utils/wordlists/#wordlist">Wordlist</a>.</p></div></div>
<div class="property show-anchors"><div class="signature"><span class="path">ethers</span> . <span class="path">wordlists</span> . <span class="method">js</span> <span class="arrow">&rArr;</span> <span class="returns">Wordlist</span><div class="anchors"></div></div><div class="body"><p>The Japanese <a href="/api/utils/wordlists/#wordlist">Wordlist</a>.</p></div></div>
<div class="property show-anchors"><div class="signature"><span class="path">ethers</span> . <span class="path">wordlists</span> . <span class="method">ko</span> <span class="arrow">&rArr;</span> <span class="returns">Wordlist</span><div class="anchors"></div></div><div class="body"><p>The Korean <a href="/api/utils/wordlists/#wordlist">Wordlist</a>.</p></div></div>
<div class="property show-anchors"><div class="signature"><span class="path">ethers</span> . <span class="path">wordlists</span> . <span class="method">zh_cn</span> <span class="arrow">&rArr;</span> <span class="returns">Wordlist</span><div class="anchors"></div></div><div class="body"><p>The Simplified Chinese <a href="/api/utils/wordlists/#wordlist">Wordlist</a>.</p></div></div>
<div class="property show-anchors"><div class="signature"><span class="path">ethers</span> . <span class="path">wordlists</span> . <span class="method">zh_tw</span> <span class="arrow">&rArr;</span> <span class="returns">Wordlist</span><div class="anchors"></div></div><div class="body"><p>The Traditional Chinese <a href="/api/utils/wordlists/#wordlist">Wordlist</a>.</p></div></div><div class="footer"><div class="nav previous"><a href="/api/utils/web/"><span class="arrow">&larr;</span>Web Utilities</a></div> <div class="nav next"><a href="/api/other/">Other Libraries<span class="arrow">&rarr;</span></a></div></div><div class="copyright">The content of this site is licensed under the <a href="https://choosealicense.com/licenses/cc-by-4.0/">Creative Commons Attribution 4.0 International License</a>.</div></div><script src="/script.js" type="text/javascript"></script></body></html><!-- ContentHash:fe40ed55a7112320c3bce3060f98f345052d663e77275212822ecf5f9d1d4401 -->