<divclass="link title"><ahref="/v5/">Documentation</a></div><divclass="base show link depth-1"><ahref="/v5/getting-started/">Getting Started</a></div><divclass="base show link depth-1"><ahref="/v5/concepts/">Ethereum Basics</a></div><divclass="hide link depth-2"><ahref="/v5/concepts/events/">Events</a></div><divclass="hide link depth-2"><ahref="/v5/concepts/gas/">Gas</a></div><divclass="hide link depth-2"><ahref="/v5/concepts/security/">Security</a></div><divclass="base show link depth-1"><ahref="/v5/api-keys/">Provider API Keys</a></div><divclass="base ancestor show link depth-1"><ahref="/v5/api/">Application Programming Interface</a></div><divclass="show link depth-2"><ahref="/v5/api/providers/">Providers</a></div><divclass="hide link depth-3"><ahref="/v5/api/providers/provider/">Provider</a></div><divclass="hide link depth-3"><ahref="/v5/api/providers/jsonrpc-provider/">JsonRpcProvider</a></div><divclass="hide link depth-3"><ahref="/v5/api/providers/api-providers/">API Providers</a></div><divclass="hide link depth-3"><ahref="/v5/api/providers/other/">Other Providers</a></div><divclass="hide link depth-3"><ahref="/v5/api/providers/types/">Types</a></div><divclass="show link depth-2"><ahref="/v5/api/signer/">Signers</a></div><divclass="show link depth-2"><ahref="/v5/api/contract/">Contract Interaction</a></div><divclass="hide link depth-3"><ahref="/v5/api/contract/contract/">Contract</a></div><divclass="hide link depth-3"><ahref="/v5/api/contract/contract-factory/">ContractFactory</a></div><divclass="hide link depth-3"><ahref="/v5/api/contract/example/">Example: ERC-20 Contract</a></div><divclass="show link depth-2"><ahref="/v5/api/utils/">Utilities</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/abi/">Application Binary Interface</a></div><divclass="hide link depth-4"><ahref="/v5/api/utils/abi/coder/">AbiCoder</a></div><divclass="hide link depth-4"><ahref="/v5/api/utils/abi/formats/">ABI Formats</a></div><divclass="hide link depth-4"><ahref="/v5/api/utils/abi/fragments/">Fragments</a></div><divclass="hide link depth-4"><ahref="/v5/api/utils/abi/interface/">Interface</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/address/">Addresses</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/bignumber/">BigNumber</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/bytes/">Byte Manipulation</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/constants/">Constants</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/display-logic/">Display Logic and Input</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/encoding/">Encoding Utilities</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/fixednumber/">FixedNumber</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/hashing/">Hashing Algorithms</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/hdnode/">HD Wallet</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/logger/">Logging</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/properties/">Property Utilities</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/signing-key/">Signing Key</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/strings/">Strings</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/transactions/">Transactions</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/web/">Web Utilities</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/wordlists/">Wordlists</a></div><divclass="show link depth-2"><ahref="/v5/api/other/">Other Libraries</a></div><divclass="hide link depth-3"><ahref="/v5/api/other/assembly/">Assembly</a></div><divclass="hide link depth-4"><ahref="/v5/api/other/assembly/dialect/">Ethers ASM Dialect</a></div><divclass="hide link depth-4"><ahref="/v5/api/other/assembly/api/">Utilities</a></div><divclass="hide link depth-4"><ahref="/v5/api/other/assembly/ast/">Abstract Syntax Tree</a></div><divclass="hide link depth-3"><ahref="/v5/api/other
<aname="experimental"></a><h1class="show-anchors"><div>Experimental<divclass="anchors"><aclass="self"href="/v5/api/experimental/#experimental"></a></div></div></h1><p>The <b>Experimental</b> package is used for features that are not ready to be included in the base library. The API should not be considered stable and does not follow <ahref="https://semver.org">semver</a> versioning, so applications requiring it should specify the <i>exact version</i> needed.</p>
<aname="experimental-brainwallet"></a><aname="experimental--experimental-brainwallet"></a><h2class="show-anchors"><div>BrainWallet<spanclass="inherits"> inherits <ahref="/v5/api/signer/#Wallet">Wallet</a></span><divclass="anchors"><aclass="self"href="/v5/api/experimental/#experimental-brainwallet"></a></div></div></h2><p>Ethers removed support for BrainWallets in v4, since they are unsafe and many can be easily guessed, allowing attackers to steal the funds. This class is offered to ensure older systems which used brain wallets can still recover their funds and assets.</p>
<divclass="property show-anchors"><divclass="signature"><spanclass="path">BrainWallet</span><spanclass="symbol">.</span><spanclass="method">generate</span><spanclass="symbol">(</span><spanclass="param">username</span><spanclass="symbol">,</span><spanclass="param">password</span><spanclass="symbol">[</span><spanclass="symbol">,</span><spanclass="param">progressCallback</span><spanclass="symbol">]</span><spanclass="symbol">)</span><spanclass="arrow">⇒</span><spanclass="returns"><ahref="/v5/api/experimental/#experimental-brainwallet">BrainWallet</a></span><divclass="anchors"></div></div><divclass="body"><p>Generates a brain wallet, with a slightly improved experience, in which the generated wallet has a mnemonic.</p>
</div></div><divclass="property show-anchors"><divclass="signature"><spanclass="path">BrainWallet</span><spanclass="symbol">.</span><spanclass="method">generateLegacy</span><spanclass="symbol">(</span><spanclass="param">username</span><spanclass="symbol">,</span><spanclass="param">password</span><spanclass="symbol">[</span><spanclass="symbol">,</span><spanclass="param">progressCallback</span><spanclass="symbol">]</span><spanclass="symbol">)</span><spanclass="arrow">⇒</span><spanclass="returns"><ahref="/v5/api/experimental/#experimental-brainwallet">BrainWallet</a></span><divclass="anchors"></div></div><divclass="body"><p>Generate a brain wallet which is compatibile with the ethers v3 and earlier.</p>
</div></div><aname="experimental-eip1193bridge"></a><aname="experimental--experimental-eip1193bridge"></a><h2class="show-anchors"><div>EIP1193Bridge<spanclass="inherits"> inherits <ahref="https://nodejs.org/dist/latest-v13.x/docs/api/events.html#events_class_eventemitter">EventEmitter</a></span><divclass="anchors"><aclass="self"href="/v5/api/experimental/#experimental-eip1193bridge"></a></div></div></h2><p>The <b>EIP1193Bridge</b> allows a normal Ethers <ahref="/v5/api/signer/#Signer">Signer</a> and <ahref="/v5/api/providers/provider/">Provider</a> to be exposed in as a standard <ahref="https://eips.ethereum.org/EIPS/eip-1193">EIP-1193 Provider</a>, which may be useful when interacting with other libraries.</p>
<aname="experimental-noncemanager"></a><aname="experimental--experimental-noncemanager"></a><h2class="show-anchors"><div>NonceManager<spanclass="inherits"> inherits <ahref="/v5/api/signer/#Signer">Signer</a></span><divclass="anchors"><aclass="self"href="/v5/api/experimental/#experimental-noncemanager"></a></div></div></h2><p>The <b>NonceManager</b> is designed to manage the nonce for a Signer, automatically increasing it as it sends transactions.</p>
<p>Currently the NonceManager does not handle re-broadcast. If you attempt to send a lot of transactions to the network on a node that does not control that account, the transaction pool may drop your transactions.</p>
<p>In the future, it'd be nice if the <b>NonceManager</b> remembered transactions and watched for them on the network, rebroadcasting transactions that appear to have been dropped.</p>
<p>Another future feature will be some sort of failure mode. For example, often a transaction is dependent on another transaction being mined first.</p>
<divclass="property show-anchors"><divclass="signature"><spanclass="modifier">new </span><spanclass="method">NonceManager</span><spanclass="symbol">(</span><spanclass="param">signer</span><spanclass="symbol">)</span><divclass="anchors"></div></div><divclass="body"><p>Create a new NonceManager.</p>
</div></div><divclass="property show-anchors"><divclass="signature"><spanclass="path">nonceManager</span><spanclass="symbol">.</span><spanclass="method">signer</span><spanclass="arrow">⇒</span><spanclass="returns"><ahref="/v5/api/signer/#Signer">Signer</a></span><divclass="anchors"></div></div><divclass="body"><p>The signer whose nonce is being managed.</p>
</div></div><divclass="property show-anchors"><divclass="signature"><spanclass="path">nonceManager</span><spanclass="symbol">.</span><spanclass="method">provider</span><spanclass="arrow">⇒</span><spanclass="returns"><ahref="/v5/api/providers/provider/">Provider</a></span><divclass="anchors"></div></div><divclass="body"><p>The provider associated with the signer.</p>
</div></div><divclass="property show-anchors"><divclass="signature"><spanclass="path">nonceManager</span><spanclass="symbol">.</span><spanclass="method">setTransactionCount</span><spanclass="symbol">(</span><spanclass="param">count</span><spanclass="symbol">)</span><spanclass="arrow">⇒</span><spanclass="returns">void</span><divclass="anchors"></div></div><divclass="body"><p>Set the current transaction count (nonce) for the signer.</p>
<p>This may be useful it interacting with the signer outside of using this class.</p>
</div></div><divclass="property show-anchors"><divclass="signature"><spanclass="path">nonceManager</span><spanclass="symbol">.</span><spanclass="method">increaseTransactionCount</span><spanclass="symbol">(</span><spanclass="symbol">[</span><spanclass="param">count</span> = <spanclass="param">1</span><spanclass="symbol">]</span><spanclass="symbol">)</span><spanclass="arrow">⇒</span><spanclass="returns">void</span><divclass="anchors"></div></div><divclass="body"><p>Bump the current transaction count (nonce) by <i>count</i>.</p>
<p>This may be useful it interacting with the signer outside of using this class.</p>
<divclass="copyright">The content of this site is licensed under the <ahref="https://choosealicense.com/licenses/cc-by-4.0/">Creative Commons License</a>. Generated on September 8, 2020, 1:8am.</div>