<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 ancestor show link depth-1"><ahref="/v5/api/">Application Programming Interface</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/signer/">Signers</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="ancestor show link depth-2"><ahref="/v5/api/utils/">Utilities</a></div><divclass="show 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="show link depth-3"><ahref="/v5/api/utils/address/">Addresses</a></div><divclass="show link depth-3"><ahref="/v5/api/utils/bignumber/">BigNumber</a></div><divclass="myself ancestor ancestor show link depth-3"><ahref="/v5/api/utils/bytes/">Byte Manipulation</a></div><divclass="show link depth-3"><ahref="/v5/api/utils/constants/">Constants</a></div><divclass="show link depth-3"><ahref="/v5/api/utils/display-logic/">Display Logic and Input</a></div><divclass="show link depth-3"><ahref="/v5/api/utils/encoding/">Encoding Utilities</a></div><divclass="show link depth-3"><ahref="/v5/api/utils/fixednumber/">FixedNumber</a></div><divclass="show link depth-3"><ahref="/v5/api/utils/hashing/">Hashing Algorithms</a></div><divclass="show link depth-3"><ahref="/v5/api/utils/hdnode/">HD Wallet</a></div><divclass="show link depth-3"><ahref="/v5/api/utils/logger/">Logging</a></div><divclass="show link depth-3"><ahref="/v5/api/utils/properties/">Property Utilities</a></div><divclass="show link depth-3"><ahref="/v5/api/utils/signing-key/">Signing Key</a></div><divclass="show link depth-3"><ahref="/v5/api/utils/strings/">Strings</a></div><divclass="show link depth-3"><ahref="/v5/api/utils/transactions/">Transactions</a></div><divclass="show link depth-3"><ahref="/v5/api/utils/web/">Web Utilities</a></div><divclass="show 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/hardware/">Hardware Wallets</a></div><divclass="sho
<aname="byte-manipulation"></a><h1class="show-anchors"><div>Byte Manipulation<divclass="anchors"><aclass="self"href="/v5/api/utils/bytes/#byte-manipulation"></a></div></div></h1><p>Tra la la...</p>
<aname="Bytes"></a><aname="byte-manipulation--types--Bytes"></a><h3class="show-anchors"><div>Bytes<divclass="anchors"><aclass="self"href="/v5/api/utils/bytes/#Bytes"></a></div></div></h3><p>A <b>Bytes</b> is any object which is an <ahref="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a> or <ahref="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray">TypedArray</a> with each value in the valid byte range (i.e. between 0 and 255 inclusive), or is an Object with a <codeclass="inline">length</code> property where each indexed property is in the valid byte range.</p>
<aname="BytesLike"></a><aname="byte-manipulation--types--BytesLike"></a><h3class="show-anchors"><div>BytesLike<divclass="anchors"><aclass="self"href="/v5/api/utils/bytes/#BytesLike"></a></div></div></h3><p>A <b>BytesLike</b> can be either a <ahref="/v5/api/utils/bytes/#Bytes">Bytes</a> or a <ahref="/v5/api/utils/bytes/#DataHexString">DataHexString</a>.</p>
<aname="DataHexString"></a><aname="byte-manipulation--types--DataHexString"></a><h3class="show-anchors"><div>DataHexString<divclass="anchors"><aclass="self"href="/v5/api/utils/bytes/#DataHexString"></a></div></div></h3><p>A <b>DataHexstring</b> is identical to a <ahref="/v5/api/utils/bytes/#HexString">HexString</a> except that it has an even number of nibbles, and therefore is a valid representation of binary data as a string.</p>
<aname="HexString"></a><aname="byte-manipulation--types--HexString"></a><h3class="show-anchors"><div>HexString<divclass="anchors"><aclass="self"href="/v5/api/utils/bytes/#HexString"></a></div></div></h3><p>A <b>Hexstring</b> is a string which has a <codeclass="inline">0x</code> prefix followed by any number of nibbles (i.e. case-insensitive hexidecumal characters, <codeclass="inline">0-9</code> and <codeclass="inline">a-f</code>).</p>
<aname="Signature"></a><aname="byte-manipulation--types--Signature"></a><h3class="show-anchors"><div>Signature<divclass="anchors"><aclass="self"href="/v5/api/utils/bytes/#Signature"></a></div></div></h3><p><ul><li><b>r</b> and <b>s</b> --- The x co-ordinate of <b>r</b> and the <b>s</b> value of the signature </li><li><b>v</b> --- The parity of the y co-ordinate of <b>r</b></li><li><b>_vs</b> --- The <ahref="https://eips.ethereum.org/EIPS/eip-2098">compact representation</a> of the <b>s</b> and <b>v</b></li><li><b>recoveryParam</b> --- The normalized (i.e. 0 or 1) value of <b>v</b></li></ul></p>
<aname="signature-raw"></a><aname="byte-manipulation--types--signature-raw"></a><h3class="show-anchors"><div>Raw Signature<spanclass="inherits"> inherits string<<ahref="/v5/api/utils/bytes/#DataHexString">DataHexString</a><65>></span><divclass="anchors"><aclass="self"href="/v5/api/utils/bytes/#signature-raw"></a></div></div></h3><p>A <b>Raw Signature</b> is a common Signature format where the r, s and v are concanenated into a 65 byte (130 nibble) <ahref="/v5/api/utils/bytes/#DataHexString">DataHexString</a>.</p>
<aname="SignatureLike"></a><aname="byte-manipulation--types--SignatureLike"></a><h3class="show-anchors"><div>SignatureLike<divclass="anchors"><aclass="self"href="/v5/api/utils/bytes/#SignatureLike"></a></div></div></h3><p>A <b>SignatureLike</b> is similar to a <ahref="/v5/api/utils/bytes/#Signature">Signature</a>, except redundant properties may be omitted or it may be a <ahref="/v5/api/utils/bytes/#signature-raw">Raw Signature</a>.</p>
<p>For example, if <b>_vs</b> is specified, <b>s</b> and <b>v</b> may be omitted. Likewise, if <b>recoveryParam</b> is provided, <b>v</b> may be omitted (as in these cases the missing values can be computed).</p>
<aname="utils-isBytes"></a><divclass="property show-anchors"><divclass="signature"><spanclass="path">ethers</span><spanclass="symbol">.</span><spanclass="path">utils</span><spanclass="symbol">.</span><spanclass="method">isBytes</span><spanclass="symbol">(</span><spanclass="param">object</span><spanclass="symbol">)</span><spanclass="arrow">⇒</span><spanclass="returns">boolean</span><divclass="anchors"><aclass="self"href="/v5/api/utils/bytes/#utils-isBytes"></a><aclass="source"href="https://github.com/ethers-io/ethers.js/blob/master/packages/bytes/src.ts/index.ts#L73">source</a></div></div><divclass="body"><p>Returns true if and only if <i>object</i> is a valid <ahref="/v5/api/utils/bytes/#Bytes">Bytes</a>.</p>
</div></div><aname="utils-isBytesLike"></a><divclass="property show-anchors"><divclass="signature"><spanclass="path">ethers</span><spanclass="symbol">.</span><spanclass="path">utils</span><spanclass="symbol">.</span><spanclass="method">isBytesLike</span><spanclass="symbol">(</span><spanclass="param">object</span><spanclass="symbol">)</span><spanclass="arrow">⇒</span><spanclass="returns">boolean</span><divclass="anchors"><aclass="self"href="/v5/api/utils/bytes/#utils-isBytesLike"></a><aclass="source"href="https://github.com/ethers-io/ethers.js/blob/master/packages/bytes/src.ts/index.ts#L69">source</a></div></div><divclass="body"><p>Returns true if and only if <i>object</i> is a <ahref="/v5/api/utils/bytes/#Bytes">Bytes</a> or <ahref="/v5/api/utils/bytes/#DataHexString">DataHexString</a>.</p>
</div></div><aname="utils-isHexString"></a><divclass="property show-anchors"><divclass="signature"><spanclass="path">ethers</span><spanclass="symbol">.</span><spanclass="path">utils</span><spanclass="symbol">.</span><spanclass="method">isHexString</span><spanclass="symbol">(</span><spanclass="param">object</span><spanclass="symbol">,</span><spanclass="symbol">[</span><spanclass="param">length</span><spanclass="symbol">]</span><spanclass="symbol">)</span><spanclass="arrow">⇒</span><spanclass="returns">boolean</span><divclass="anchors"><aclass="self"href="/v5/api/utils/bytes/#utils-isHexString"></a><aclass="source"href="https://github.com/ethers-io/ethers.js/blob/master/packages/bytes/src.ts/index.ts#L184">source</a></div></div><divclass="body"><p>Returns true if and only if <i>object</i> is a valid hex string. If <i>length</i> is specified and <i>object</i> is not a valid <ahref="/v5/api/utils/bytes/#DataHexString">DataHexString</a> of <i>length</i> bytes, an InvalidArgument error is thrown.</p>
</div></div><aname="byte-manipulation--converting-between-arrays-and-hexstrings"></a><h2class="show-anchors"><div>Converting between Arrays and Hexstrings<divclass="anchors"><aclass="self"href="/v5/api/utils/bytes/#byte-manipulation--converting-between-arrays-and-hexstrings"></a></div></div></h2>
<aname="utils-arrayify"></a><divclass="property show-anchors"><divclass="signature"><spanclass="path">ethers</span><spanclass="symbol">.</span><spanclass="path">utils</span><spanclass="symbol">.</span><spanclass="method">arrayify</span><spanclass="symbol">(</span><spanclass="param">DataHexStringOrArrayish</span><spanclass="symbol">[</span><spanclass="symbol">,</span><spanclass="param">options</span><spanclass="symbol">]</span><spanclass="symbol">)</span><spanclass="arrow">⇒</span><spanclass="returns">Uint8Array</span><divclass="anchors"><aclass="self"href="/v5/api/utils/bytes/#utils-arrayify"></a><aclass="source"href="https://github.com/ethers-io/ethers.js/blob/master/packages/bytes/src.ts/index.ts#L91">source</a></div></div><divclass="body"><p>Converts <i>DataHexStringOrArrayish</i> to a Uint8Array.</p>
</div></div><aname="utils-hexlify"></a><divclass="property show-anchors"><divclass="signature"><spanclass="path">ethers</span><spanclass="symbol">.</span><spanclass="path">utils</span><spanclass="symbol">.</span><spanclass="method">hexlify</span><spanclass="symbol">(</span><spanclass="param">hexstringOrArrayish</span><spanclass="symbol">)</span><spanclass="arrow">⇒</span><spanclass="returns">string<<ahref="/v5/api/utils/bytes/#DataHexString">DataHexString</a>></span><divclass="anchors"><aclass="self"href="/v5/api/utils/bytes/#utils-hexlify"></a><aclass="source"href="https://github.com/ethers-io/ethers.js/blob/master/packages/bytes/src.ts/index.ts#L194">source</a></div></div><divclass="body"><p>Converts <i>hexstringOrArrayish</i> to a <ahref="/v5/api/utils/bytes/#DataHexString">DataHexString</a>.</p>
</div></div><aname="utils-hexValue"></a><divclass="property show-anchors"><divclass="signature"><spanclass="path">ethers</span><spanclass="symbol">.</span><spanclass="path">utils</span><spanclass="symbol">.</span><spanclass="method">hexValue</span><spanclass="symbol">(</span><spanclass="param">aBigNumberish</span><spanclass="symbol">)</span><spanclass="arrow">⇒</span><spanclass="returns">string<<ahref="/v5/api/utils/bytes/#HexString">HexString</a>></span><divclass="anchors"><aclass="self"href="/v5/api/utils/bytes/#utils-hexValue"></a><aclass="source"href="https://github.com/ethers-io/ethers.js/blob/master/packages/bytes/src.ts/index.ts#L287">source</a></div></div><divclass="body"><p>Converts <i>aBigNumberish</i> to a <ahref="/v5/api/utils/bytes/#HexString">HexString</a>, with no <u>unnecessary</u> leading zeros.</p>
<aname="utils-concat"></a><divclass="property show-anchors"><divclass="signature"><spanclass="path">ethers</span><spanclass="symbol">.</span><spanclass="path">utils</span><spanclass="symbol">.</span><spanclass="method">concat</span><spanclass="symbol">(</span><spanclass="param">arrayOfBytesLike</span><spanclass="symbol">)</span><spanclass="arrow">⇒</span><spanclass="returns">Uint8Array</span><divclass="anchors"><aclass="self"href="/v5/api/utils/bytes/#utils-concat"></a><aclass="source"href="https://github.com/ethers-io/ethers.js/blob/master/packages/bytes/src.ts/index.ts#L140">source</a></div></div><divclass="body"><p>Concatenates all the <ahref="/v5/api/utils/bytes/#BytesLike">BytesLike</a> in <i>arrayOfBytesLike</i> into a single Uint8Array.</p>
</div></div><aname="utils-stripZeros"></a><divclass="property show-anchors"><divclass="signature"><spanclass="path">ethers</span><spanclass="symbol">.</span><spanclass="path">utils</span><spanclass="symbol">.</span><spanclass="method">stripZeros</span><spanclass="symbol">(</span><spanclass="param">aBytesLike</span><spanclass="symbol">)</span><spanclass="arrow">⇒</span><spanclass="returns">Uint8Array</span><divclass="anchors"><aclass="self"href="/v5/api/utils/bytes/#utils-stripZeros"></a><aclass="source"href="https://github.com/ethers-io/ethers.js/blob/master/packages/bytes/src.ts/index.ts#L154">source</a></div></div><divclass="body"><p>Returns a Uint8Array with all leading <codeclass="inline">0</code> bytes of <i>aBtyesLike</i> removed.</p>
</div></div><aname="utils-zeroPad"></a><divclass="property show-anchors"><divclass="signature"><spanclass="path">ethers</span><spanclass="symbol">.</span><spanclass="path">utils</span><spanclass="symbol">.</span><spanclass="method">zeroPad</span><spanclass="symbol">(</span><spanclass="param">aBytesLike</span><spanclass="symbol">,</span><spanclass="param">length</span><spanclass="symbol">)</span><spanclass="arrow">⇒</span><spanclass="returns">Uint8Array</span><divclass="anchors"><aclass="self"href="/v5/api/utils/bytes/#utils-zeroPad"></a><aclass="source"href="https://github.com/ethers-io/ethers.js/blob/master/packages/bytes/src.ts/index.ts#L171">source</a></div></div><divclass="body"><p>Retutns a Uint8Array of the data in <i>aBytesLike</i> with <codeclass="inline">0</code> bytes prepended to <i>length</i> bytes long.</p>
<aname="utils-hexConcat"></a><divclass="property show-anchors"><divclass="signature"><spanclass="path">ethers</span><spanclass="symbol">.</span><spanclass="path">utils</span><spanclass="symbol">.</span><spanclass="method">hexConcat</span><spanclass="symbol">(</span><spanclass="param">arrayOfBytesLike</span><spanclass="symbol">)</span><spanclass="arrow">⇒</span><spanclass="returns">string<<ahref="/v5/api/utils/bytes/#DataHexString">DataHexString</a>></span><divclass="anchors"><aclass="self"href="/v5/api/utils/bytes/#utils-hexConcat"></a><aclass="source"href="https://github.com/ethers-io/ethers.js/blob/master/packages/bytes/src.ts/index.ts#L279">source</a></div></div><divclass="body"><p>Concatenates all the <ahref="/v5/api/utils/bytes/#BytesLike">BytesLike</a> in <i>arrayOfBytesLike</i> into a single <ahref="/v5/api/utils/bytes/#DataHexString">DataHexString</a></p>
</div></div><aname="utils-hexDataLength"></a><divclass="property show-anchors"><divclass="signature"><spanclass="path">ethers</span><spanclass="symbol">.</span><spanclass="path">utils</span><spanclass="symbol">.</span><spanclass="method">hexDataLength</span><spanclass="symbol">(</span><spanclass="param">aBytesLike</span><spanclass="symbol">)</span><spanclass="arrow">⇒</span><spanclass="returns">string<<ahref="/v5/api/utils/bytes/#DataHexString">DataHexString</a>></span><divclass="anchors"><aclass="self"href="/v5/api/utils/bytes/#utils-hexDataLength"></a><aclass="source"href="https://github.com/ethers-io/ethers.js/blob/master/packages/bytes/src.ts/index.ts#L253">source</a></div></div><divclass="body"><p>Returns the length (in bytes) of <i>aBytesLike</i>.</p>
</div></div><aname="utils-hexDataSlice"></a><divclass="property show-anchors"><divclass="signature"><spanclass="path">ethers</span><spanclass="symbol">.</span><spanclass="path">utils</span><spanclass="symbol">.</span><spanclass="method">hexDataSlice</span><spanclass="symbol">(</span><spanclass="param">aBytesLike</span><spanclass="symbol">,</span><spanclass="param">offset</span><spanclass="symbol">[</span><spanclass="symbol">,</span><spanclass="param">endOffset</span><spanclass="symbol">]</span><spanclass="symbol">)</span><spanclass="arrow">⇒</span><spanclass="returns">string<<ahref="/v5/api/utils/bytes/#DataHexString">DataHexString</a>></span><divclass="anchors"><aclass="self"href="/v5/api/utils/bytes/#utils-hexDataSlice"></a><aclass="source"href="https://github.com/ethers-io/ethers.js/blob/master/packages/bytes/src.ts/index.ts#L263">source</a></div></div><divclass="body"><p>Returns a <ahref="/v5/api/utils/bytes/#DataHexString">DataHexString</a> representation of a slice of <i>aBytesLike</i>, from <i>offset</i> (in bytes) to <i>endOffset</i> (in bytes). If <i>endOffset</i> is omitted, the length of <i>aBytesLike</i> is used.</p>
</div></div><aname="utils-hexStripZeros"></a><divclass="property show-anchors"><divclass="signature"><spanclass="path">ethers</span><spanclass="symbol">.</span><spanclass="path">utils</span><spanclass="symbol">.</span><spanclass="method">hexStripZeros</span><spanclass="symbol">(</span><spanclass="param">aBytesLike</span><spanclass="symbol">)</span><spanclass="arrow">⇒</span><spanclass="returns">string<<ahref="/v5/api/utils/bytes/#HexString">HexString</a>></span><divclass="anchors"><aclass="self"href="/v5/api/utils/bytes/#utils-hexStripZeros"></a><aclass="source"href="https://github.com/ethers-io/ethers.js/blob/master/packages/bytes/src.ts/index.ts#L293">source</a></div></div><divclass="body"><p>Returns a <ahref="/v5/api/utils/bytes/#HexString">HexString</a> representation of <i>aBytesLike</i> with all leading zeros removed.</p>
</div></div><aname="utils-hexZeroPad"></a><divclass="property show-anchors"><divclass="signature"><spanclass="path">ethers</span><spanclass="symbol">.</span><spanclass="path">utils</span><spanclass="symbol">.</span><spanclass="method">hexZeroPad</span><spanclass="symbol">(</span><spanclass="param">aBytesLike</span><spanclass="symbol">,</span><spanclass="param">length</span><spanclass="symbol">)</span><spanclass="arrow">⇒</span><spanclass="returns">string<<ahref="/v5/api/utils/bytes/#DataHexString">DataHexString</a>></span><divclass="anchors"><aclass="self"href="/v5/api/utils/bytes/#utils-hexZeroPad"></a><aclass="source"href="https://github.com/ethers-io/ethers.js/blob/master/packages/bytes/src.ts/index.ts#L305">source</a></div></div><divclass="body"><p>Returns a <ahref="/v5/api/utils/bytes/#DataHexString">DataHexString</a> representation of <i>aBytesLike</i> padded to <i>length</i> bytes.</p>
<aname="utils-joinSignature"></a><divclass="property show-anchors"><divclass="signature"><spanclass="path">ethers</span><spanclass="symbol">.</span><spanclass="path">utils</span><spanclass="symbol">.</span><spanclass="method">joinSignature</span><spanclass="symbol">(</span><spanclass="param">aSignatureLike</span><spanclass="symbol">)</span><spanclass="arrow">⇒</span><spanclass="returns">string<<ahref="/v5/api/utils/bytes/#signature-raw">RawSignature</a>></span><divclass="anchors"><aclass="self"href="/v5/api/utils/bytes/#utils-joinSignature"></a><aclass="source"href="https://github.com/ethers-io/ethers.js/blob/master/packages/bytes/src.ts/index.ts#L442">source</a></div></div><divclass="body"><p>Return the raw-format of <i>aSignaturelike</i>, which is 65 bytes (130 nibbles) long, concatenating the <b>r</b>, <b>s</b> and (normalized) <b>v</b> of a Signature.</p>
</div></div><aname="utils-splitSignature"></a><divclass="property show-anchors"><divclass="signature"><spanclass="path">ethers</span><spanclass="symbol">.</span><spanclass="path">utils</span><spanclass="symbol">.</span><spanclass="method">splitSignature</span><spanclass="symbol">(</span><spanclass="param">aSignatureLikeOrBytesLike</span><spanclass="symbol">)</span><spanclass="arrow">⇒</span><spanclass="returns"><ahref="/v5/api/utils/bytes/#Signature">Signature</a></span><divclass="anchors"><aclass="self"href="/v5/api/utils/bytes/#utils-splitSignature"></a><aclass="source"href="https://github.com/ethers-io/ethers.js/blob/master/packages/bytes/src.ts/index.ts#L323">source</a></div></div><divclass="body"><p>Return the full expanded-format of <i>aSignaturelike</i> or a raw-format <ahref="/v5/api/utils/bytes/#DataHexString">DataHexString</a>. Any missing properties will be computed.</p>
<aname="utils-randomBytes"></a><divclass="property show-anchors"><divclass="signature"><spanclass="path">ethers</span><spanclass="symbol">.</span><spanclass="path">utils</span><spanclass="symbol">.</span><spanclass="method">randomBytes</span><spanclass="symbol">(</span><spanclass="param">length</span><spanclass="symbol">)</span><spanclass="arrow">⇒</span><spanclass="returns">Uint8Array</span><divclass="anchors"><aclass="self"href="/v5/api/utils/bytes/#utils-randomBytes"></a><aclass="source"href="https://github.com/ethers-io/ethers.js/blob/master/packages/random/src.ts/index.ts#L9">source</a></div></div><divclass="body"><p>Return a new Uint8Array of <i>length</i> random bytes.</p>
</div></div><aname="utils-shuffled"></a><divclass="property show-anchors"><divclass="signature"><spanclass="path">ethers</span><spanclass="symbol">.</span><spanclass="path">utils</span><spanclass="symbol">.</span><spanclass="method">shuffled</span><spanclass="symbol">(</span><spanclass="param">array</span><spanclass="symbol">)</span><spanclass="arrow">⇒</span><spanclass="returns">Array< any ></span><divclass="anchors"><aclass="self"href="/v5/api/utils/bytes/#utils-shuffled"></a><aclass="source"href="https://github.com/ethers-io/ethers.js/blob/master/packages/random/src.ts/shuffle.ts#L3">source</a></div></div><divclass="body"><p>Return a copy of <i>array</i> shuffled using <ahref="https://en.wikipedia.org/wiki/Fisher-Yates_shuffle">Fisher-Yates Shuffle</a>.</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 July 3, 2020, 1:44am.</div>