ethers.js/docs/v5/index.html
2020-11-22 23:07:13 -05:00

45 lines
43 KiB
HTML

<!DOCTYPE html>
<html class="paged">
<head>
<title>Documentation</title>
<link rel="stylesheet" type="text/css" href="/v5/static/style.css">
</head>
<body>
<div class="sidebar">
<div class="header">
<div class="logo"><a href="/v5/"><div class="image"></div><div class="name">ethers</div><div class="version">v5.0</div></a></div>
<div class="search"><form action="/v5/search/" method="GET"><input name="search" id="search" /></form><span class="search-icon">&#9906;</span></div>
</div>
<div class="toc"><div>
<div class="link title"><a href="/v5/">Documentation</a></div><div class="base child show link depth-1"><a href="/v5/getting-started/">Getting Started</a></div><div class="base child show link depth-1"><a href="/v5/concepts/">Ethereum Basics</a></div><div class="hide link depth-2"><a href="/v5/concepts/events/">Events</a></div><div class="hide link depth-2"><a href="/v5/concepts/gas/">Gas</a></div><div class="hide link depth-2"><a href="/v5/concepts/security/">Security</a></div><div class="hide link depth-2"><a href="/v5/concepts/best-practices/">Best Practices</a></div><div class="base child show link depth-1"><a href="/v5/api-keys/">Provider API Keys</a></div><div class="base child show link depth-1"><a href="/v5/api/">Application Programming Interface</a></div><div class="hide link depth-2"><a href="/v5/api/providers/">Providers</a></div><div class="hide link depth-3"><a href="/v5/api/providers/provider/">Provider</a></div><div class="hide link depth-3"><a href="/v5/api/providers/jsonrpc-provider/">JsonRpcProvider</a></div><div class="hide link depth-3"><a href="/v5/api/providers/api-providers/">API Providers</a></div><div class="hide link depth-3"><a href="/v5/api/providers/other/">Other Providers</a></div><div class="hide link depth-3"><a href="/v5/api/providers/types/">Types</a></div><div class="hide link depth-2"><a href="/v5/api/signer/">Signers</a></div><div class="hide link depth-2"><a href="/v5/api/contract/">Contract Interaction</a></div><div class="hide link depth-3"><a href="/v5/api/contract/contract/">Contract</a></div><div class="hide link depth-3"><a href="/v5/api/contract/contract-factory/">ContractFactory</a></div><div class="hide link depth-3"><a href="/v5/api/contract/example/">Example: ERC-20 Contract</a></div><div class="hide link depth-2"><a href="/v5/api/utils/">Utilities</a></div><div class="hide link depth-3"><a href="/v5/api/utils/abi/">Application Binary Interface</a></div><div class="hide link depth-4"><a href="/v5/api/utils/abi/coder/">AbiCoder</a></div><div class="hide link depth-4"><a href="/v5/api/utils/abi/formats/">ABI Formats</a></div><div class="hide link depth-4"><a href="/v5/api/utils/abi/fragments/">Fragments</a></div><div class="hide link depth-4"><a href="/v5/api/utils/abi/interface/">Interface</a></div><div class="hide link depth-3"><a href="/v5/api/utils/address/">Addresses</a></div><div class="hide link depth-3"><a href="/v5/api/utils/bignumber/">BigNumber</a></div><div class="hide link depth-3"><a href="/v5/api/utils/bytes/">Byte Manipulation</a></div><div class="hide link depth-3"><a href="/v5/api/utils/constants/">Constants</a></div><div class="hide link depth-3"><a href="/v5/api/utils/display-logic/">Display Logic and Input</a></div><div class="hide link depth-3"><a href="/v5/api/utils/encoding/">Encoding Utilities</a></div><div class="hide link depth-3"><a href="/v5/api/utils/fixednumber/">FixedNumber</a></div><div class="hide link depth-3"><a href="/v5/api/utils/hashing/">Hashing Algorithms</a></div><div class="hide link depth-3"><a href="/v5/api/utils/hdnode/">HD Wallet</a></div><div class="hide link depth-3"><a href="/v5/api/utils/logger/">Logging</a></div><div class="hide link depth-3"><a href="/v5/api/utils/properties/">Property Utilities</a></div><div class="hide link depth-3"><a href="/v5/api/utils/signing-key/">Signing Key</a></div><div class="hide link depth-3"><a href="/v5/api/utils/strings/">Strings</a></div><div class="hide link depth-3"><a href="/v5/api/utils/transactions/">Transactions</a></div><div class="hide link depth-3"><a href="/v5/api/utils/web/">Web Utilities</a></div><div class="hide link depth-3"><a href="/v5/api/utils/wordlists/">Wordlists</a></div><div class="hide link depth-2"><a href="/v5/api/other/">Other Libraries</a></div><div class="hide link depth-3"><a href="/v5/api/other/assembly/">Assembly</a></div><div class="hide link depth-4"><a href="/v5/api/other/assembly/dialect/">Ethers ASM Dialect</a></div><div class="hide link depth-4"><a href="/v5/api/other/assembly/api/">Utilities</a></div><div class="hide link depth-4"><a href="/v5/api/other/assembly/ast/">Abstract Syntax Tree</a></div><div class="hide link depth-3"><a href="/v5/api/other/hardware/">Hardware Wallets</a></div><div class="hide link depth-2"><a href="/v5/api/experimental/">Experimental</a></div><div class="base child show link depth-1"><a href="/v5/cli/">Command Line Interfaces</a></div><div class="hide link depth-2"><a href="/v5/cli/ethers/">Sandbox Utility</a></div><div class="hide link depth-2"><a href="/v5/cli/asm/">Assembler</a></div><div class="hide link depth-2"><a href="/v5/cli/ens/">Ethereum Naming Service</a></div><div class="hide link depth-2"><a href="/v5/cli/typescript/">TypeScript</a></div><div class="hide link depth-2"><a href="/v5/cli/plugin/">Making Your Own</a></div><div class="base child show link depth-1"><a href="/v5/cookbook/">Cookbook</a></div><div class="hide link depth-2"><a href="/v5/cookbook/react-native/">React Native (and ilk)</a></div><div class="base child show link depth-1"><a href="/v5/migration/">Migration Guide</a></div><div class="hide link depth-2"><a href="/v5/migration/web3/">Migration: From Web3.js</a></div><div class="hide link depth-2"><a href="/v5/migration/ethers-v4/">Migration: From Ethers v4</a></div><div class="base child show link depth-1"><a href="/v5/testing/">Testing</a></div><div class="base child show link depth-1"><a href="/v5/contributing/">Contributing and Hacking</a></div><div class="base child show link depth-1"><a href="/v5/documentation/">Flatworm Docs</a></div><div class="base child show link depth-1"><a href="/v5/license/">License and Copyright</a></div>
</div></div>
<div class="footer">
<a href="/v5/single-page/">Single Page</a>
</div>
</div>
<div class="content">
<div class="breadcrumbs"><span class="current">Documentation</span></div>
<a name="documentation"></a><a name="documentation"></a><h1 class="show-anchors"><div>Documentation<div class="anchors"><a class="self" href="/v5/#documentation"></a></div></div></h1>
<a name="preamble"></a><a name="documentation--preamble"></a><h2 class="show-anchors"><div>What is Ethers?<div class="anchors"><a class="self" href="/v5/#preamble"></a></div></div></h2><p>The ethers.js library aims to be a complete and compact library for interacting with the Ethereum Blockchain and its ecosystem. It was originally designed for use with <a href="https://ethers.io/">ethers.io</a> and has since expanded into a more general-purpose library.</p>
<a name="features"></a><a name="documentation--features"></a><h2 class="show-anchors"><div>Features<div class="anchors"><a class="self" href="/v5/#features"></a></div></div></h2><p><ul><li>Keep your private keys in your client, <b>safe</b> and sound </li><li>Import and export <b>JSON wallets</b> (Geth, Parity and crowdsale) </li><li>Import and export BIP 39 <b>mnemonic phrases</b> (12 word backup phrases) and HD Wallets (English, Italian, Japanese, Korean, Simplified Chinese, Traditional Chinese; more coming soon) </li><li>Meta-classes create JavaScript objects from any contract ABI, including <b>ABIv2</b> and <b>Human-Readable ABI</b> </li><li>Connect to Ethereum nodes over <a href="https://github.com/ethereum/wiki/wiki/JSON-RPC">JSON-RPC</a>, <a href="https://infura.io">INFURA</a>, <a href="https://etherscan.io">Etherscan</a>, <a href="https://alchemyapi.io">Alchemy</a>, <a href="https://developers.cloudflare.com/distributed-web/ethereum-gateway/">Cloudflare</a> or <a href="https://metamask.io/">MetaMask</a>. </li><li><b>ENS names</b> are first-class citizens; they can be used anywhere an Ethereum addresses can be used </li><li><b>Tiny</b> (~88kb compressed; 284kb uncompressed) </li><li><b>Complete</b> functionality for all your Ethereum needs </li><li>Extensive <a href="https://docs.ethers.io/">documentation</a> </li><li>Large collection of <b>test cases</b> which are maintained and added to </li><li>Fully <b>TypeScript</b> ready, with definition files and full TypeScript source </li><li><b>MIT License</b> (including <i>ALL</i> dependencies); completely open source to do with as you please </li></ul></p>
<a name="documentation--developer-documentation"></a><h2 class="show-anchors"><div>Developer Documentation<div class="anchors"><a class="self" href="/v5/#documentation--developer-documentation"></a></div></div></h2>
<div class="toc"><div style="padding-left: 0px"><span class="bullet">&bull;</span><a href="/v5/getting-started/">Getting Started</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/getting-started/#installing">Installing</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/getting-started/#importing">Importing</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/getting-started/#getting-started--glossary">Common Terminology</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/getting-started/#getting-started--connecting">Connecting to Ethereum: Metamask</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/getting-started/#getting-started--connecting-rpc">Connecting to Ethereum: RPC</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/getting-started/#getting-started--contracts">Contracts</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/getting-started/#getting-started--signing">Signing Messages</a></div><div style="padding-left: 0px"><span class="bullet">&bull;</span><a href="/v5/concepts/">Ethereum Basics</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/concepts/events/">Events</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/concepts/events/#events--solidity-topics">Solidity Topics</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/concepts/events/#events--logs-and-filtering">Logs and Filtering</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/concepts/gas/">Gas</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/concepts/gas/#gas-price">Gas Price</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/concepts/gas/#gas-limit">Gas Limit</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/concepts/security/">Security</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/concepts/security/#security--pbkdf">Key Derivation Functions</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/concepts/best-practices/">Best Practices</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/concepts/best-practices/#best-practices--network-changes">Network Changes</a></div><div style="padding-left: 0px"><span class="bullet">&bull;</span><a href="/v5/api-keys/">Provider API Keys</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/api-keys/#api-keys--etherscan">Etherscan</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/api-keys/#api-keys--infura">INFURA</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/api-keys/#api-keys--alchemy">Alchemy</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/api-keys/#api-keys--pocket-gateway">Pocket Gateway</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/api-keys/#api-keys--getDefaultProvider">Creating a Default Provider</a></div><div style="padding-left: 0px"><span class="bullet">&bull;</span><a href="/v5/api/">Application Programming Interface</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/api/providers/">Providers</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/providers/provider/">Provider</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/providers/provider/#Provider--account-methods">Accounts Methods</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/providers/provider/#Provider--block-methods">Blocks Methods</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/providers/provider/#Provider--ens-methods">Ethereum Naming Service (ENS) Methods</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/providers/provider/#Provider--log-methods">Logs Methods</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/providers/provider/#Provider--network-methods">Network Status Methods</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/providers/provider/#Provider--transaction-methods">Transactions Methods</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/providers/provider/#Provider--event-methods">Event Emitter Methods</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/providers/provider/#Provider--inspection-methods">Inspection Methods</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/providers/jsonrpc-provider/">JsonRpcProvider</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/providers/jsonrpc-provider/#JsonRpcSigner">JsonRpcSigner</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/providers/jsonrpc-provider/#UncheckedJsonRpcSigner">JsonRpcUncheckedSigner</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/providers/jsonrpc-provider/#JsonRpcProvider--other">Node-Specific Methods</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/providers/api-providers/">API Providers</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/providers/api-providers/#EtherscanProvider">EtherscanProvider</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/providers/api-providers/#InfuraProvider">InfuraProvider</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/providers/api-providers/#AlchemyProvider">AlchemyProvider</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/providers/api-providers/#CloudflareProvider">CloudflareProvider</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/providers/other/">Other Providers</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/providers/other/#FallbackProvider">FallbackProvider</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/providers/other/#IpcProvider">IpcProvider</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/providers/other/#UrlJsonRpcProvider">UrlJsonRpcProvider</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/providers/other/#Web3Provider">Web3Provider</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/providers/other/#WebSocketProvider">WebSocketProvider</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/providers/types/">Types</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/providers/types/#providers-BlockTag">BlockTag</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/providers/types/#providers-Networkish">Networkish</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/providers/types/#providers-Network">Network</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/providers/types/#providers-Block">Block</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/providers/types/#types--events-and-logs">Events and Logs</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/providers/types/#types--transactions">Transactions</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/api/signer/">Signers</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/signer/#Signer">Signer</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/signer/#Wallet">Wallet</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/signer/#VoidSigner">VoidSigner</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/signer/#ExternallyOwnedAccount">ExternallyOwnedAccount</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/api/contract/">Contract Interaction</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/contract/contract/">Contract</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/contract/contract/#Contract--creating">Creating Instances</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/contract/contract/#Contract--properties">Properties</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/contract/contract/#Contract--methods">Methods</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/contract/contract/#Contract--events">Events</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/contract/contract/#Contract--metaclass">Meta-Class</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/contract/contract-factory/">ContractFactory</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/contract/contract-factory/#ContractFactory--creating">Creating Instances</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/contract/contract-factory/#ContractFactory--properties">Properties</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/contract/contract-factory/#ContractFactory--methods">Methods</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/contract/example/">Example: ERC-20 Contract</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/contract/example/#example-erc-20-contract--connecting-to-a-contract">Connecting to a Contract</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/contract/example/#example-erc-20-contract--properties">Properties</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/contract/example/#example-erc-20-contract--methods">Methods</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/contract/example/#erc20-events">Events</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/contract/example/#example-erc-20-contract--meta-class-methods">Meta-Class Methods</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/contract/example/#example-erc-20-contract--meta-class-filters">Meta-Class Filters</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/api/utils/">Utilities</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/utils/abi/">Application Binary Interface</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/abi/coder/">AbiCoder</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/utils/abi/coder/#AbiCoder--creating">Creating Instance</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/utils/abi/coder/#AbiCoder--methods">Coding Methods</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/abi/formats/">ABI Formats</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/utils/abi/formats/#abi-formats--human-readable-abi">Human-Readable ABI</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/utils/abi/formats/#abi-formats--solidity">Solidity JSON ABI</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/abi/fragments/">Fragments</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/utils/abi/fragments/#fragments--formats">Formats</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/utils/abi/fragments/#Fragment">Fragment</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/utils/abi/fragments/#ConstructorFragment">ConstructorFragment</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/utils/abi/fragments/#EventFragment">EventFragment</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/utils/abi/fragments/#FunctionFragment">FunctionFragment</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/utils/abi/fragments/#ParamType">ParamType</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/abi/interface/">Interface</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/utils/abi/interface/#Interface--creating">Creating Instances</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/utils/abi/interface/#Interface--properties">Properties</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/utils/abi/interface/#Interface--formatting">Formatting</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/utils/abi/interface/#Interface--fragments">Fragment Access</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/utils/abi/interface/#Interface--selectors">Signature and Topic Hashes</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/utils/abi/interface/#Interface--encoding">Encoding Data</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/utils/abi/interface/#Interface--decoding">Decoding Data</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/utils/abi/interface/#Interface--parsing">Parsing</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/utils/abi/interface/#Interface--types">Types</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/utils/abi/interface/#Interface--specifying-fragments">Specifying Fragments</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/utils/address/">Addresses</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/address/#address-formats">Address Formats</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/address/#utils--address">Converting and Verifying</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/address/#utils--address-derivation">Derivation</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/address/#utils--contract-addresses">Contracts Addresses</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/utils/bignumber/">BigNumber</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/bignumber/#BigNumber--types">Types</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/bignumber/#BigNumber--creating">Creating Instances</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/bignumber/#BigNumber--methods">Methods</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/bignumber/#BigNumber--notes">Notes</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/utils/bytes/">Byte Manipulation</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/bytes/#byte-manipulation--types">Types</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/bytes/#byte-manipulation--inspection">Inspection</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/bytes/#byte-manipulation--converting-between-arrays-and-hexstrings">Converting between Arrays and Hexstrings</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/bytes/#byte-manipulation--array-manipulation">Array Manipulation</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/bytes/#byte-manipulation--hexstring-manipulation">Hexstring Manipulation</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/bytes/#byte-manipulation--signature-conversion">Signature Conversion</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/bytes/#byte-manipulation--random-bytes">Random Bytes</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/utils/constants/">Constants</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/constants/#constants--bytes">Bytes</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/constants/#constants--strings">Strings</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/constants/#constants--bignumber">BigNumber</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/utils/display-logic/">Display Logic and Input</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/display-logic/#display-logic--units">Units</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/display-logic/#display-logic--functions">Functions</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/utils/encoding/">Encoding Utilities</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/encoding/#Bse58">Base58</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/encoding/#Base64">Base64</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/encoding/#rlp--methods">Recursive-Length Prefix</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/utils/fixednumber/">FixedNumber</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/fixednumber/#FixedNumber--creating-instances">Creating Instances</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/fixednumber/#FixedNumber--properties">Properties</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/fixednumber/#FixedNumber--methods">Methods</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/fixednumber/#FixedFormat">FixedFormat</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/utils/hashing/">Hashing Algorithms</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/hashing/#cryptographic-hash-functions">Cryptographic Hash Functions</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/hashing/#utils--hmac">HMAC</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/hashing/#utils--hashing-helpers">Hashing Helpers</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/hashing/#utils--solidity-hashing">Solidity Hashing Algorithms</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/utils/hdnode/">HD Wallet</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/hdnode/#hdnodes--types">Types</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/hdnode/#HDNode">HDNode</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/hdnode/#HDNode--utilities">Other Functions</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/utils/logger/">Logging</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/logger/#Logger">Logger</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/logger/#errors">Errors</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/logger/#Logger-levels">Log Levels</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/utils/properties/">Property Utilities</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/utils/signing-key/">Signing Key</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/signing-key/#SigningKey--other-functions">Other Functions</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/utils/strings/">Strings</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/strings/#Bytes32String">Bytes32String</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/strings/#strings-utf8">UTF-8 Strings</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/strings/#strings--unicode-normalization-form">UnicodeNormalizationForm</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/strings/#strings--error-handling">Custom UTF-8 Error Handling</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/utils/transactions/">Transactions</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/transactions/#transactions--types">Types</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/transactions/#transactions--functions">Functions</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/utils/web/">Web Utilities</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/utils/wordlists/">Wordlists</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/wordlists/#Wordlist">Wordlist</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/utils/wordlists/#wordlists--languages">Languages</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/api/other/">Other Libraries</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/other/assembly/">Assembly</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/other/assembly/dialect/">Ethers ASM Dialect</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/other/assembly/dialect/#asm-dialect-opcode">Opcodes</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/other/assembly/dialect/#asm-dialect-label">Labels</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/other/assembly/dialect/#asm-dialect-literal">Literals</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/other/assembly/dialect/#asm-dialect-comment">Comments</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/other/assembly/dialect/#asm-dialect-scope">Scopes</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/other/assembly/dialect/#asm-dialect-datasegment">Data Segment</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/other/assembly/dialect/#asm-dialect-links">Links</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/other/assembly/dialect/#asm-dialect-placeholder">Stack Placeholders</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/other/assembly/dialect/#asm-dialect-scripting">Evaluation and Execution</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/other/assembly/api/">Utilities</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/other/assembly/api/#asm-utilities--assembler">Assembler</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/other/assembly/api/#asm-utilities--disassembler">Disassembler</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/other/assembly/api/#asm-opcode">Opcode</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/other/assembly/ast/">Abstract Syntax Tree</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/other/assembly/ast/#asm-ast--types">Types</a></div><div style="padding-left: 112px"><span class="bullet">&bull;</span><a href="/v5/api/other/assembly/ast/#asm-ast--nodes">Nodes</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/other/hardware/">Hardware Wallets</a></div><div style="padding-left: 84px"><span class="bullet">&bull;</span><a href="/v5/api/other/hardware/#hw-ledger">LedgerSigner</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/api/experimental/">Experimental</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/experimental/#experimental-brainwallet">BrainWallet</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/experimental/#experimental-eip1193bridge">EIP1193Bridge</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/api/experimental/#experimental-noncemanager">NonceManager</a></div><div style="padding-left: 0px"><span class="bullet">&bull;</span><a href="/v5/cli/">Command Line Interfaces</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/cli/ethers/">Sandbox Utility</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/cli/ethers/#sandbox-utility--help">Help</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/cli/ethers/#sandbox-utility--examples">Examples</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/cli/asm/">Assembler</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/cli/asm/#cli-asm--help">Help</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/cli/asm/#cli-asm--example-input-files">Example Input Files</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/cli/asm/#cli-asm--assembler-examples">Assembler Examples</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/cli/asm/#cli-asm--disassembler-examples">Disassembler Examples</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/cli/ens/">Ethereum Naming Service</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/cli/ens/#ethereum-naming-service--help">Help</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/cli/ens/#ethereum-naming-service--examples">Examples</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/cli/typescript/">TypeScript</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/cli/typescript/#typescript--help">Help</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/cli/typescript/#typescript--examples">Examples</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/cli/plugin/">Making Your Own</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/cli/plugin/#cli-cli">CLI</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/cli/plugin/#cli-plugin">Plugin</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/cli/plugin/#cli-argparser">ArgParser</a></div><div style="padding-left: 0px"><span class="bullet">&bull;</span><a href="/v5/cookbook/">Cookbook</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/cookbook/react-native/">React Native (and ilk)</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/cookbook/react-native/#cookbook-reactnative-shims">Installing</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/cookbook/react-native/#cookbook-reactnative-security">Security</a></div><div style="padding-left: 0px"><span class="bullet">&bull;</span><a href="/v5/migration/">Migration Guide</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/migration/web3/">Migration: From Web3.js</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/migration/web3/#migration-from-web3-js--providers">Providers</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/migration/web3/#migration-from-web3-js--signers">Signers</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/migration/web3/#migration-from-web3-js--contracts">Contracts</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/migration/web3/#migration-from-web3-js--numbers">Numbers</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/migration/web3/#migration-from-web3-js--utilities">Utilities</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/migration/ethers-v4/">Migration: From Ethers v4</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/migration/ethers-v4/#migration-v4--bignumber">BigNumber</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/migration/ethers-v4/#migration-v4--contracts">Contracts</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/migration/ethers-v4/#migration-v4--errors">Errors</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/migration/ethers-v4/#migration-v4--interface">Interface</a></div><div style="padding-left: 56px"><span class="bullet">&bull;</span><a href="/v5/migration/ethers-v4/#migration-v4--wallet">Wallet</a></div><div style="padding-left: 0px"><span class="bullet">&bull;</span><a href="/v5/testing/">Testing</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/testing/#testing-supported">Supported Platforms</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/testing/#testing-suites">Test Suites</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/testing/#testing-api">Test Suite API</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/testing/#testing-schemas">Schemas</a></div><div style="padding-left: 0px"><span class="bullet">&bull;</span><a href="/v5/contributing/">Contributing and Hacking</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/contributing/#contributing--building">Building</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/contributing/#contributing--updating">Making your changes</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/contributing/#contributing--documentation">Documentation</a></div><div style="padding-left: 0px"><span class="bullet">&bull;</span><a href="/v5/documentation/">Flatworm Docs</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/documentation/#flatworm-fragments">Fragments</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/documentation/#flatworm-markdown">Markdown</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/documentation/#flatworm--code">Code</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/documentation/#flatworm--table">Tables</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/documentation/#flatworm-config">Configuration</a></div><div style="padding-left: 28px"><span class="bullet">&bull;</span><a href="/v5/documentation/#flatworm-extensions">Extensions</a></div><div style="padding-left: 0px"><span class="bullet">&bull;</span><a href="/v5/license/">License and Copyright</a></div></div><a name="documentation--legacy"></a><a name="documentation--documentation--legacy"></a><h2 class="show-anchors"><div>Legacy Documentation<div class="anchors"><a class="self" href="/v5/#documentation--legacy"></a></div></div></h2><p>This section will be kept up to date, linking to documentation of older versions of the library.</p>
<p><ul><li><a href="https://docs.ethers.io/v4/">version 4.0</a> </li><li><a href="https://docs.ethers.io/v3/">version 3.0</a> </li></ul></p>
<div class="footer">
<div class="nav previous"><!--PREV_LINK--></div>
<div class="nav next"><a href="/v5/getting-started/">Getting Started<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 License</a>. Generated on November 22, 2020, 11:5pm.</div>
</div>
<script src="/v5/static/script.js" type="text/javascript"></script>
<!--EXTRASCRIPT-->
</body>
</html>