{"id":21074802,"url":"https://github.com/dawsbot/essential-eth","last_synced_at":"2026-01-26T02:17:16.383Z","repository":{"id":37013701,"uuid":"405214928","full_name":"dawsbot/essential-eth","owner":"dawsbot","description":"🪶 An alternative to ethers \u0026 web3 that's 10x smaller","archived":false,"fork":false,"pushed_at":"2024-06-18T01:36:13.000Z","size":4839,"stargazers_count":309,"open_issues_count":34,"forks_count":34,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-10-09T03:49:42.042Z","etag":null,"topics":["crypto","ethereum","typescript","web3"],"latest_commit_sha":null,"homepage":"https://eeth.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dawsbot.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-10T21:17:42.000Z","updated_at":"2025-08-27T13:20:27.000Z","dependencies_parsed_at":"2024-04-30T22:41:22.703Z","dependency_job_id":"92dcacd3-3acf-4783-8505-7071185521e1","html_url":"https://github.com/dawsbot/essential-eth","commit_stats":{"total_commits":237,"total_committers":13,"mean_commits":18.23076923076923,"dds":"0.27004219409282704","last_synced_commit":"f2359be52361d8745483f0cd74053617bfc25feb"},"previous_names":[],"tags_count":69,"template":false,"template_full_name":null,"purl":"pkg:github/dawsbot/essential-eth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dawsbot%2Fessential-eth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dawsbot%2Fessential-eth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dawsbot%2Fessential-eth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dawsbot%2Fessential-eth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dawsbot","download_url":"https://codeload.github.com/dawsbot/essential-eth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dawsbot%2Fessential-eth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28764869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T00:37:26.264Z","status":"online","status_checked_at":"2026-01-26T02:00:08.215Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crypto","ethereum","typescript","web3"],"created_at":"2024-11-19T19:18:04.460Z","updated_at":"2026-01-26T02:17:16.376Z","avatar_url":"https://github.com/dawsbot.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/3408480/163274699-ae4fb0f4-fca0-4745-bcd7-4868f80deaf6.png\" height=\"220\" title=\"Logo\"/\u003e\n\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\n  \u003cb\u003e\n    🪶 Essential Eth 🪶\n  \u003c/b\u003e\n  \u003cbr/\u003e\n  \u003ci\u003eAn alternative for ethers \u0026 web3 that's 10x smaller\u003c/i\u003e\n  \u003cbr/\u003e\n\u003c/p\u003e\n\n\u003cbr/\u003e\n\n## Why you should replace Ethers.js and web3\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/3408480/133322814-f3d18424-4ba8-4a37-8cbc-c5e6828354a3.png\" title=\"Import size comparison\" width=\"900\"/\u003e\n\u003c/p\u003e\n\n---\n\n[![🧪 tests](https://github.com/Earnifi/essential-eth/actions/workflows/test.yml/badge.svg)](https://github.com/Earnifi/essential-eth/actions/workflows/test.yml) [![codecov](https://codecov.io/gh/Earnifi/essential-eth/branch/master/graph/badge.svg?token=E44EK6RWTZ)](https://codecov.io/gh/Earnifi/essential-eth) ![](https://badgen.net/bundlephobia/minzip/essential-eth) ![](https://badgen.net/bundlephobia/tree-shaking/essential-eth) ![](https://img.shields.io/npm/v/essential-eth)\n\n\u003cbr/\u003e\n\n- 🐜️ [tiny](https://bundlephobia.com/package/essential-eth)\n- 🔐 Strongly written TypeScript\n- 🧪 Matches both `ethers` and `web3`\n  - ⚡️ Near-identical API to `ethers`\n  - ⚡️ Similar but improved API to `web3`\n- 🙌 Works for all EVM chains\n  - 💎 Ethereum\n  - 🟣 Polygon\n  - 🔴 Optimism\n  - 🔵 Arbitrum\n  - [Many more](https://github.com/dawsbot/essential-eth/tree/master/src/providers/utils/chains-info.ts)\n- 🧪 Strongly tested\n- 🌲 Tree-shaking and no side-effects\n- 🙌 All common JS versions (CommonJS, ESM, \u0026 UMD)\n  - ✅ Node 24, 22, 20, \u0026 18\n  - ✅ Web\n\n\u003cbr/\u003e\n\n## Table of Contents\n\n\u003c!-- ⛔️ AUTO-GENERATED-CONTENT:START (TOC:collapse=true\u0026collapseText=Click to expand) --\u003e\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand\u003c/summary\u003e\n\n- [Why you should replace Ethers.js and web3](#why-you-should-replace-ethersjs-and-web3)\n- [Install](#install)\n- [🛠 Utils](#-utils)\n  - [`arrayify`](#arrayify)\n  - [`computeAddress`](#computeaddress)\n  - [`computePublicKey`](#computepublickey)\n  - [`concat`](#concat)\n  - [`etherToGwei`](#ethertogwei)\n  - [`etherToWei`](#ethertowei)\n  - [`gweiToEther`](#gweitoether)\n  - [`hashMessage`](#hashmessage)\n  - [`hexConcat`](#hexconcat)\n  - [`hexDataLength`](#hexdatalength)\n  - [`hexDataSlice`](#hexdataslice)\n  - [`hexStripZeros`](#hexstripzeros)\n  - [`hexValue`](#hexvalue)\n  - [`hexZeroPad`](#hexzeropad)\n  - [`hexlify`](#hexlify)\n  - [`isAddress`](#isaddress)\n  - [`isBytes`](#isbytes)\n  - [`isBytesLike`](#isbyteslike)\n  - [`isHexString`](#ishexstring)\n  - [`jsonRpcProvider`](#jsonrpcprovider)\n  - [`keccak256`](#keccak256)\n  - [`pack`](#pack)\n  - [`solidityKeccak256`](#soliditykeccak256)\n  - [`splitSignature`](#splitsignature)\n  - [`stripZeros`](#stripzeros)\n  - [`tinyBig`](#tinybig)\n  - [`toChecksumAddress`](#tochecksumaddress)\n  - [`toUtf8Bytes`](#toutf8bytes)\n  - [`weiToEther`](#weitoether)\n  - [`zeroPad`](#zeropad)\n- [Providers](#providers)\n  - [`call`](#call)\n  - [`estimateGas`](#estimategas)\n  - [`getBalance`](#getbalance)\n  - [`getBlock`](#getblock)\n  - [`getBlockNumber`](#getblocknumber)\n  - [`getCode`](#getcode)\n  - [`getFeeData`](#getfeedata)\n  - [`getGasPrice`](#getgasprice)\n  - [`getLogs`](#getlogs)\n  - [`getNetwork`](#getnetwork)\n  - [`getTransaction`](#gettransaction)\n  - [`getTransactionCount`](#gettransactioncount)\n  - [`getTransactionReceipt`](#gettransactionreceipt)\n- [Contract](#contract)\n  - [`contractFunctionName(args)`](#contractfunctionnameargs)\n- [More Info](#more-info)\n  - [Identical vs Similar vs Dissimilar {\u0026#035;isd}](#identical-vs-similar-vs-dissimilar-isd)\n  - [Miscellaneous](#miscellaneous)\n- [Contributing and GitPOAP](#contributing-and-gitpoap)\n\n\u003c/details\u003e\n\n\u003c!-- ⛔️ AUTO-GENERATED-CONTENT:END --\u003e\n\n  \u003cbr/\u003e\n\n## Install\n\n```sh\nnpm install --save essential-eth # TypeScript included\n\n# or yarn\nyarn add essential-eth # TypeScript included\n```\n\nBrowsers:\n\n\u003c!-- ⛔️ AUTO-GENERATED-CONTENT:START (UNPKG_SCRIPT_TAG) --\u003e\n\n```html\n\u003c!-- index.html --\u003e\n\u003cscript src=\"https://unpkg.com/essential-eth@0.11.1\"\u003e\u003c/script\u003e\n```\n\n\u003c!-- ⛔️ AUTO-GENERATED-CONTENT:END (UNPKG_SCRIPT_TAG) --\u003e\n\n\u003cbr/\u003e\n\n## 🛠 Utils\n\n```typescript\nimport { etherToWei } from 'essential-eth';\n\n// or in a non-import environment\nconst { etherToWei } = require('essential-eth');\n```\n\n\u003c!-- ⛔️ AUTO-GENERATED-CONTENT:START (FUNCTIONS) --\u003e\n\n#### [`arrayify`](https://eeth.dev/docs/api/modules#arrayify)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+arrayify+}])\n\n```typescript\narrayify(value: number | BytesLike | Hexable, options: DataOptions): Uint8Array\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { arrayify } from 'essential-eth';\n```\n\n```javascript\narrayify(1);\n// Uint8Array(1) [ 1 ]\n```\n\n```javascript\narrayify(0x1234);\n// Uint8Array(2) [ 18, 52 ]\n```\n\n```javascript\narrayify('0x1', { hexPad: 'right' });\n// Uint8Array(1) [ 16 ]\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`computeAddress`](https://eeth.dev/docs/api/modules#computeaddress)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+computeAddress+}])\n\n```typescript\ncomputeAddress(key: string): string\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { computeAddress } from 'essential-eth';\n```\n\n```javascript\ncomputeAddress(\n  '0x0458eb591f407aef12936bd2989ca699cf5061de9c4964dd6eb6005fd8f580c407434447e813969a1be6e9954b002cad84dfc67a69e032b273e4695e7d0db2d952',\n); // public key\n// '0xA2902059a7BF992f1450BACD7357CCAa5cC8336a'\n```\n\n```javascript\ncomputeAddress(\n  '0x2f2c419acf4a1da8c1ebea75bb3fcfbd3ec2aa3bf0162901ccdc2f38b8f92427',\n); // private key\n// '0xA2902059a7BF992f1450BACD7357CCAa5cC8336a'\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`computePublicKey`](https://eeth.dev/docs/api/modules#computepublickey)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+computePublicKey+}])\n\n```typescript\ncomputePublicKey(privKey: BytesLike): string\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { computePublicKey } from 'essential-eth';\n```\n\n```javascript\ncomputePublicKey(\n  '0xb27cc8dea0177d910110e8d3ec5480d56c723abf433529f4063f261ffdb9297c',\n);\n// '0x045cd0032015eecfde49f82f4e149d804e8ac6e3a0bface32e37c72a71ceac864fe84da7e8df84342f7b11dfb753c4d158f636142b46b29cf7f0f171ae0aa4fb87'\n```\n\n```javascript\ncomputePublicKey([\n  50, 102, 50, 99, 52, 49, 57, 97, 99, 102, 52, 97, 49, 100, 97, 56, 99, 49,\n  101, 98, 101, 97, 55, 53, 98, 98, 51, 102, 99, 102, 98, 100,\n]);\n// '0x04a9cea77eca949df84f661cee153426fb51f2294b9364b4fac240df57360b9b0ac9c99e4d7966491ab4c81f8c82e0cd24ec5759832ad4ab736d22c7d90b806ee8'\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`concat`](https://eeth.dev/docs/api/modules#concat)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+concat+}])\n\n```typescript\nconcat(arrayOfBytesLike: Array\u003cBytesLikeWithNumber\u003e): Uint8Array\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { concat } from 'essential-eth';\n```\n\n```javascript\nconcat([0, 1]);\n// Uint8Array(2) [ 0, 1 ]\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`etherToGwei`](https://eeth.dev/docs/api/modules#ethertogwei)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+etherToGwei+}])\n\n```typescript\netherToGwei(etherQuantity: string | number | TinyBig | Big): TinyBig\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { etherToGwei } from 'essential-eth';\n```\n\n```javascript\netherToGwei('1000').toString();\n// '1000000000000'\netherToGwei(1000).toString();\n// '1000000000000'\n```\n\n```javascript\netherToGwei('1000').toNumber();\n// 1000000000000\netherToGwei(1000).toNumber();\n// 1000000000000\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`etherToWei`](https://eeth.dev/docs/api/modules#ethertowei)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+etherToWei+}])\n\n```typescript\netherToWei(etherQuantity: string | number | TinyBig | Big): TinyBig\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { etherToWei } from 'essential-eth';\n```\n\n```javascript\netherToWei('1000').toString();\n// '1000000000000000000000'\netherToWei(1000).toString();\n// '1000000000000000000000'\n```\n\n```javascript\netherToWei('1000').toNumber();\n// 1000000000000000000000\netherToWei(1000).toNumber();\n// 1000000000000000000000\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`gweiToEther`](https://eeth.dev/docs/api/modules#gweitoether)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+gweiToEther+}])\n\n```typescript\ngweiToEther(gweiQuantity: string | number | TinyBig | Big): TinyBig\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { gweiToEther } from 'essential-eth';\n```\n\n```javascript\ngweiToEther('1000000000000').toString();\n// '1000'\ngweiToEther(1000000000000).toString();\n// '1000'\n```\n\n```javascript\ngweiToEther('1000000000000').toNumber();\n// 1000\ngweiToEther(1000000000000).toNumber();\n// 1000\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`hashMessage`](https://eeth.dev/docs/api/modules#hashmessage)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+hashMessage+}])\n\n```typescript\nhashMessage(message: string | Bytes): string\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { hashMessage } from 'essential-eth';\n```\n\n```javascript\nhashMessage('Hello World');\n// '0xa1de988600a42c4b4ab089b619297c17d53cffae5d5120d82d8a92d0bb3b78f2'\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`hexConcat`](https://eeth.dev/docs/api/modules#hexconcat)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+hexConcat+}])\n\n```typescript\nhexConcat(items: Array\u003cBytesLike\u003e): string\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { hexConcat } from 'essential-eth';\n```\n\n```javascript\nhexConcat([[2, 4, 0, 1], 9, '0x2934', '0x3947']);\n// '0x020400010929343947'\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`hexDataLength`](https://eeth.dev/docs/api/modules#hexdatalength)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+hexDataLength+}])\n\n```typescript\nhexDataLength(data: BytesLike): undefined\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { hexDataLength } from 'essential-eth';\n```\n\n```javascript\nhexDataLength([2, 4, 0, 1]);\n// 4\n```\n\n```javascript\nhexDataLength('0x3925');\n// 2\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`hexDataSlice`](https://eeth.dev/docs/api/modules#hexdataslice)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+hexDataSlice+}])\n\n```typescript\nhexDataSlice(data: BytesLikeWithNumber, offset: number, endOffset: number): string\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { hexDataSlice } from 'essential-eth';\n```\n\n```javascript\nhexDataSlice([20, 6, 48], 0, 2);\n// '0x1406'\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`hexStripZeros`](https://eeth.dev/docs/api/modules#hexstripzeros)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+hexStripZeros+}])\n\n```typescript\nhexStripZeros(value: BytesLike): string\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { hexStripZeros } from 'essential-eth';\n```\n\n```javascript\nhexStripZeros([0, 0, 0, 48]);\n// '0x30'\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`hexValue`](https://eeth.dev/docs/api/modules#hexvalue)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+hexValue+}])\n\n```typescript\nhexValue(value: number | bigint | BytesLike | Hexable): string\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { hexValue } from 'essential-eth';\n```\n\n```javascript\nhexValue(39);\n// '0x27'\n```\n\n```javascript\nhexValue([9, 4, 19, 4]);\n// '0x9041304'\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`hexZeroPad`](https://eeth.dev/docs/api/modules#hexzeropad)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+hexZeroPad+}])\n\n```typescript\nhexZeroPad(value: BytesLikeWithNumber, length: number): string\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { hexZeroPad } from 'essential-eth';\n```\n\n```javascript\nhexZeroPad('0x60', 2);\n// '0x0060'\n```\n\n```javascript\nhexZeroPad(0x60, 3);\n// '0x000060'\n```\n\n```javascript\nhexZeroPad('12345', 1);\n// Throws\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`hexlify`](https://eeth.dev/docs/api/modules#hexlify)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+hexlify+}])\n\n```typescript\nhexlify(value: number | bigint | BytesLike | Hexable, options: DataOptions): string\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { hexlify } from 'essential-eth';\n```\n\n```javascript\nhexlify(4);\n// '0x04'\n```\n\n```javascript\nhexlify(14);\n// '0x0e'\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`isAddress`](https://eeth.dev/docs/api/modules#isaddress)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+isAddress+}])\n\n```typescript\nisAddress(address: string): boolean\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { isAddress } from 'essential-eth';\n```\n\n```javascript\nisAddress('0xc0deaf6bd3f0c6574a6a625ef2f22f62a5150eab');\n// true\n```\n\n```javascript\nisAddress('bad');\n// false\n```\n\n```javascript\n// Does NOT support ENS.\nisAddress('vitalik.eth');\n// false\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`isBytes`](https://eeth.dev/docs/api/modules#isbytes)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+isBytes+}])\n\n```typescript\nisBytes(value: any): value\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { isBytes } from 'essential-eth';\n```\n\n```javascript\nisBytes([1, 2, 3]);\n// true\n```\n\n```javascript\nisBytes(false);\n// false\n```\n\n```javascript\nisBytes(new Uint8Array(1));\n// true\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`isBytesLike`](https://eeth.dev/docs/api/modules#isbyteslike)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+isBytesLike+}])\n\n```typescript\nisBytesLike(value: any): value\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { isBytesLike } from 'essential-eth';\n```\n\n```javascript\nisBytesLike([1, 2, 3]);\n// true\n```\n\n```javascript\nisBytesLike(false);\n// false\n```\n\n```javascript\nisBytesLike(new Uint8Array(1));\n// true\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`isHexString`](https://eeth.dev/docs/api/modules#ishexstring)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+isHexString+}])\n\n```typescript\nisHexString(value: any, length: number): boolean\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { isHexString } from 'essential-eth';\n```\n\n```javascript\nisHexString('0x4924');\n// true\n```\n\n```javascript\nisHexString('0x4924', 4);\n// false\n// length of 4 in bytes would mean a hex string with 8 characters\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`jsonRpcProvider`](https://eeth.dev/docs/api/modules#jsonrpcprovider)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+jsonRpcProvider+}])\n\n```typescript\njsonRpcProvider(rpcUrl: string): JsonRpcProvider\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { jsonRpcProvider } from 'essential-eth';\n```\n\n```javascript\njsonRpcProvider()\n  .getBlock('latest')\n  .then((block) =\u003e {\n    console.log(block.number);\n  });\n// 14530496\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`keccak256`](https://eeth.dev/docs/api/modules#keccak256)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+keccak256+}])\n\n```typescript\nkeccak256(data: BytesLike): string\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { keccak256 } from 'essential-eth';\n```\n\n```javascript\nkeccak256('essential-eth');\n// '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470'\n\nkeccak256('0x123');\n// '0x5fa2358263196dbbf23d1ca7a509451f7a2f64c15837bfbb81298b1e3e24e4fa'\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`pack`](https://eeth.dev/docs/api/modules#pack)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+pack+}])\n\n```typescript\npack(types: Array\u003cstring\u003e, values: Array\u003cany\u003e): string\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { pack } from 'essential-eth';\n```\n\n```javascript\nconst types = ['bool', 'string', 'uint64'];\nconst values = [true, 'text', 30];\npack(types, values);\n// '0x0174657874000000000000001e'\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`solidityKeccak256`](https://eeth.dev/docs/api/modules#soliditykeccak256)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+solidityKeccak256+}])\n\n```typescript\nsolidityKeccak256(types: Array\u003cstring\u003e, values: Array\u003cany\u003e): string\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { solidityKeccak256 } from 'essential-eth';\n```\n\n```javascript\nconst types = ['string', 'bool', 'uint32'];\nconst values = ['essential-eth is great', true, 14];\nsolidityKeccak256(types, values);\n// '0xe4d4c8e809faac09d58f468f0aeab9474fe8965d554c6c0f868c433c3fd6acab'\n```\n\n```javascript\nconst types = ['bytes4', 'uint32[5]'];\nconst values = [\n  [116, 101, 115, 116],\n  [5, 3, 4, 9, 18],\n];\nsolidityKeccak256(types, values);\n// '0x038707a887f09355dc545412b058e7ba8f3c74047050c7c5e5e52eec608053d9'\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`splitSignature`](https://eeth.dev/docs/api/modules#splitsignature)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+splitSignature+}])\n\n```typescript\nsplitSignature(signature: SignatureLike): Signature\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { splitSignature } from 'essential-eth';\n```\n\n```javascript\nconst signature = '0x60bc4ed91f2021aefe7045f3f77bd12f87eb733aee24bd1965343b3c27b3971647252185b7d2abb411b01b5d1ac4ab41ea486df1e9b396758c1aec6c1b6eee331b';\nsplitSignature(signature);\n{\n r: \"0x60bc4ed91f2021aefe7045f3f77bd12f87eb733aee24bd1965343b3c27b39716\",\n s: \"0x47252185b7d2abb411b01b5d1ac4ab41ea486df1e9b396758c1aec6c1b6eee33\",\n _vs: \"0x47252185b7d2abb411b01b5d1ac4ab41ea486df1e9b396758c1aec6c1b6eee33\",\n recoveryParam: 0,\n v: 27,\n yParityAndS: \"0x47252185b7d2abb411b01b5d1ac4ab41ea486df1e9b396758c1aec6c1b6eee33\",\n compact: \"0x60bc4ed91f2021aefe7045f3f77bd12f87eb733aee24bd1965343b3c27b3971647252185b7d2abb411b01b5d1ac4ab41ea486df1e9b396758c1aec6c1b6eee33\"\n}\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`stripZeros`](https://eeth.dev/docs/api/modules#stripzeros)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+stripZeros+}])\n\n```typescript\nstripZeros(value: BytesLike): Uint8Array\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { stripZeros } from 'essential-eth';\n```\n\n```javascript\nstripZeros('0x00002834');\n// Uint8Array { [Iterator]  0: 40, 1: 52 }\n// Equivalent to '0x2834'\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`tinyBig`](https://eeth.dev/docs/api/modules#tinybig)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+tinyBig+}])\n\n```typescript\ntinyBig(value: string | number | TinyBig | Big): TinyBig\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { tinyBig } from 'essential-eth';\n```\n\n```javascript\ntinyBig(10).times(3).toNumber();\n// 30\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`toChecksumAddress`](https://eeth.dev/docs/api/modules#tochecksumaddress)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+toChecksumAddress+}])\n\n```typescript\ntoChecksumAddress(address: string): string\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { toChecksumAddress } from 'essential-eth';\n```\n\n```javascript\ntoChecksumAddress('0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359');\n// '0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359'\n```\n\nSimilar to [\"getAddress\" in ethers.js](https://docs.ethers.io/v5/api/utils/address/#utils-getAddress)\n\nSimilar to [\"toChecksumAddress\" in web3.js](https://web3js.readthedocs.io/en/v1.7.1/web3-utils.html#tochecksumaddress)\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`toUtf8Bytes`](https://eeth.dev/docs/api/modules#toutf8bytes)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+toUtf8Bytes+}])\n\n```typescript\ntoUtf8Bytes(data: string): Uint8Array\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { toUtf8Bytes } from 'essential-eth';\n```\n\n```javascript\ntoUtf8Bytes('essential-eth');\n// Uint8Array { [Iterator] 0: 101, 1: 115, 2: 115, 3: 101, 4: 110, 5: 116, 6: 105, 7: 97, 8: 108, 9: 45, 10: 101, 11: 116, 12: 104 }\n\ntoUtf8Bytes('ethereum');\n// Uint8Array { [Iterator]  0: 101, 1: 116, 2: 104, 3: 101, 4: 114, 5: 101, 6: 117, 7: 109 }\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`weiToEther`](https://eeth.dev/docs/api/modules#weitoether)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+weiToEther+}])\n\n```typescript\nweiToEther(weiQuantity: string | number | TinyBig | Big): TinyBig\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { weiToEther } from 'essential-eth';\n```\n\n```javascript\nweiToEther('1000000000000000000000').toString();\n// '1000'\nweiToEther(1000000000000000000000).toString();\n// '1000'\n```\n\n```javascript\nweiToEther('1000000000000000000000').toNumber();\n// 1000\nweiToEther(1000000000000000000000).toNumber();\n// 1000\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`zeroPad`](https://eeth.dev/docs/api/modules#zeropad)\n\n![](https://deno.bundlejs.com/badge?q=essential-eth\u0026treeshake=[{+zeroPad+}])\n\n```typescript\nzeroPad(value: BytesLike, length: number): Uint8Array\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { zeroPad } from 'essential-eth';\n```\n\n```javascript\nzeroPad('0x039284');\n// Uint8Array { [Iterator]  0: 0, 1: 0, 2: 0, 3: 3, 4: 146, 5: 132 }\n// Equivalent to 0x000000039284\n```\n\n```javascript\nzeroPad([39, 25, 103, 45], 5);\n// Uint8Array { [Iterator]  0: 0, 1: 39, 2: 25, 3: 103, 4: 45 }\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n\u003c!-- ⛔️ AUTO-GENERATED-CONTENT:END --\u003e\n\n- _The return-type `TinyBig` is just [`Big`](https://github.com/MikeMcl/big.js) but expands scientific notation on `toNumber()` and `toString()`_\n\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n## Providers\n\n```typescript\nimport { JsonRpcProvider } from 'essential-eth';\nconst provider = new JsonRpcProvider('RPC URL HERE' /* Try POKT or Infura */);\n// OR for very quick testing (limited to 10,000 requests)\nconst provider = new JsonRpcProvider();\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003eWant a redundant provider that handles outages?\u003c/summary\u003e\n\n```typescript\nimport { FallthroughProvider } from 'essential-eth';\n\n// The FallthroughProvider handles falling through to the next valid URL.\n// It's dynamic to never trust one URL again when it fails * until it has tried all other provided URLs\n// The default timeout for a request is 8 seconds after which it moves to the next URL\nconst provider = new FallthroughProvider([\n  'https://bad.com',\n  'https://free-eth-node.com/api/eth',\n]);\nprovider.getGasPrice().toNumber();\n/*\n39695942769\n*/\n```\n\n\u003c/details\u003e\n\n \u003cbr/\u003e\n\n\u003c!-- ⛔️ AUTO-GENERATED-CONTENT:START (PROVIDER) --\u003e\n\n#### [`call`](https://eeth.dev/docs/api/classes/JsonRpcProvider#call)\n\n```typescript\nprovider.call(transaction: TransactionRequest, blockTag?: BlockTag): Promise\u003cstring\u003e\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { JsonRpcProvider } from 'essential-eth';\nconst provider = new JsonRpcProvider('RPC URL HERE' /* Try Infura or POKT */);\n```\n\n```javascript\nawait provider.call({\n  to: '0x6b175474e89094c44da98b954eedeac495271d0f',\n  data: '0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE',\n});\n// '0x0000000000000000000000000000000000000000000000000858898f93629000'\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`estimateGas`](https://eeth.dev/docs/api/classes/JsonRpcProvider#estimategas)\n\n```typescript\nprovider.estimateGas(transaction: TransactionRequest): Promise\u003cTinyBig\u003e\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { JsonRpcProvider } from 'essential-eth';\nconst provider = new JsonRpcProvider('RPC URL HERE' /* Try Infura or POKT */);\n```\n\n```javascript\nawait provider.estimateGas({\n  // Wrapped ETH address\n  to: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',\n  data: '0xd0e30db0',\n  value: etherToWei('1.0').toHexString(),\n});\n// { TinyBig: \"27938\" }\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`getBalance`](https://eeth.dev/docs/api/classes/JsonRpcProvider#getbalance)\n\n```typescript\nprovider.getBalance(address: string, blockTag?: BlockTag): Promise\u003cTinyBig\u003e\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { JsonRpcProvider } from 'essential-eth';\nconst provider = new JsonRpcProvider('RPC URL HERE' /* Try Infura or POKT */);\n```\n\n```javascript\nawait provider.getBalance('0x7cB57B5A97eAbe94205C07890BE4c1aD31E486A8');\n// 28798127851528138\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`getBlock`](https://eeth.dev/docs/api/classes/JsonRpcProvider#getblock)\n\n```typescript\nprovider.getBlock(timeFrame?: BlockTag, returnTransactionObjects?: boolean): Promise\u003cBlockResponse\u003e\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { JsonRpcProvider } from 'essential-eth';\nconst provider = new JsonRpcProvider('RPC URL HERE' /* Try Infura or POKT */);\n```\n\n```javascript\nawait provider.getBlock(14879862);\n// {\n//   baseFeePerGas: { TinyBig: 39095728776 },\n//   difficulty: { TinyBig: 14321294455359973 },\n//   extraData: \"0x486976656f6e2073672d6865617679\",\n//   gasLimit: { TinyBig: 29970620 },\n//   gasUsed: { TinyBig: 20951384 },\n//   hash: \"0x563b458ec3c4f87393b53f70bdddc0058497109b784d8cacd9247ddf267049ab\",\n//   logsBloom:\n//     \"0x9f38794fe80b521794df6efad8b0d2e9582f9ec3959a3f9384bda0fa371cfa5fac5af9d515c6bdf1ec325f5b5f7ebdd6a3a9fae17b38a86d4dc4b0971afc68d8086640550f4c156e6f923f4a1bb94fb0bed6cdcc474c5c64bfeff7a4a906f72b9a7b94004ee58efc53d63ac66961acd3a431b2d896cc9fd75f6072960bced45f770587caf130f57504decfcb63c6ca8fbc5bdbd749edd5a99a7375d2b81872289adb775fb3c928259f4be39c6d3f4d5b6217822979bb88c1f1fb62429b1b6d41cf4e3f77f9e1db3f5723108f1e5b1255dd734ad8cdb11e7ea22487c788e67c83777b6f395e504ca59c64f52245ee6de3804cf809e5caa4f0ea6a9aa9eb6ed801\",\n//   miner: \"0x1aD91ee08f21bE3dE0BA2ba6918E714dA6B45836\",\n//   mixHash: \"0x73cc9419bfb89c9d41c3a8c34ce56b5ebe468bdcf870258d2e77262275d580ec\",\n//   nonce: \"0x976f3f5d596ffb08\",\n//   number: 14879862,\n//   parentHash: \"0x95986ae14a71face8d9a6a379edd875b2e8bc73e4de0d9d460e7752bddb0f579\",\n//   receiptsRoot: \"0x8e6ba2fd9bee602b653dae6e3132f16538c2c5df24f1df8c000392053f73defa\",\n//   sha3Uncles: \"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347\",\n//   size: { TinyBig: 134483 },\n//   stateRoot: \"0xbf2bb67bd1c741f3d00904b8451d7c2cf4e3a2726f5a5884792ede2074747b85\",\n//   timestamp: { TinyBig: 1654016186 },\n//   totalDifficulty: { TinyBig: 50478104614257705213748 },\n//   transactions: [\n//     \"0xb3326a9149809603a2c28545e50e4f7d16e194bf5ee9764e0544603854c4a8d2\",\n//     \"0x8b42095f8d335404a4896b2817b8e5e3d86a5a87cb434a8eec295d5280a7f48e\",\n//     \"0x882f78fcb73f0f7ad0700bb0424a8b4beb366aaa93b88a3562c49a8d0ce4dcff\",\n//     ...\n//   ],\n//   transactionsRoot: \"0x5934902f3dcc263ec34f24318179bf6301f53f4834685792066026f3a4849d72\",\n//   uncles: [],\n// }\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`getBlockNumber`](https://eeth.dev/docs/api/classes/JsonRpcProvider#getblocknumber)\n\n```typescript\nprovider.getBlockNumber(): Promise\u003cnumber\u003e\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { JsonRpcProvider } from 'essential-eth';\nconst provider = new JsonRpcProvider('RPC URL HERE' /* Try Infura or POKT */);\n```\n\n```javascript\nawait provider.getBlockNumber();\n// 1053312\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`getCode`](https://eeth.dev/docs/api/classes/JsonRpcProvider#getcode)\n\n```typescript\nprovider.getCode(address: string, blockTag?: BlockTag): Promise\u003cstring\u003e\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { JsonRpcProvider } from 'essential-eth';\nconst provider = new JsonRpcProvider('RPC URL HERE' /* Try Infura or POKT */);\n```\n\n```javascript\nawait jsonRpcProvider().getCode(\n  '0xaC6095720221C79C6E7C638d260A2eFBC5D8d880',\n  'latest',\n);\n// '0x608060405234801561001057600080fd5b506004361061...'\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`getFeeData`](https://eeth.dev/docs/api/classes/JsonRpcProvider#getfeedata)\n\n```typescript\nprovider.getFeeData(): Promise\u003cFeeData\u003e\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { JsonRpcProvider } from 'essential-eth';\nconst provider = new JsonRpcProvider('RPC URL HERE' /* Try Infura or POKT */);\n```\n\n```javascript\nawait provider.getFeeData();\n// {\n//   gasPrice: { TinyBig: \"14184772639\" },\n//   lastBaseFeePerGas: { TinyBig: \"14038523098\" },\n//   maxFeePerGas: { TinyBig: \"29577046196\" },\n//   maxPriorityFeePerGas: { TinyBig: \"1500000000\" }\n// }\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`getGasPrice`](https://eeth.dev/docs/api/classes/JsonRpcProvider#getgasprice)\n\n```typescript\nprovider.getGasPrice(): Promise\u003cTinyBig\u003e\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { JsonRpcProvider } from 'essential-eth';\nconst provider = new JsonRpcProvider('RPC URL HERE' /* Try Infura or POKT */);\n```\n\n```javascript\nawait provider.getGasPrice();\n// 52493941856\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`getLogs`](https://eeth.dev/docs/api/classes/JsonRpcProvider#getlogs)\n\n```typescript\nprovider.getLogs(filter: Filter | FilterByBlockHash): Promise\u003cArray\u003cLog\u003e\u003e\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { JsonRpcProvider } from 'essential-eth';\nconst provider = new JsonRpcProvider('RPC URL HERE' /* Try Infura or POKT */);\n```\n\n```javascript\nprovider.getLogs({\n  address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',\n  topics: [\n    '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef',\n    '0x00000000000000000000000021b8065d10f73ee2e260e5b47d3344d3ced7596e',\n  ],\n  fromBlock: 14825027,\n  toBlock: 14825039,\n});\n\n[\n  {\n    address: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',\n    blockHash:\n      '0x8e0dfac2f704851960f866c8708b3bef2f66c0fee0329cf25ff0261b264ca6bc',\n    blockNumber: 14825029,\n    data: '0x000000000000000000000000000000000000000000000000005f862ee352a38a',\n    logIndex: 384,\n    removed: false,\n    topics: [\n      '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef',\n      '0x00000000000000000000000021b8065d10f73ee2e260e5b47d3344d3ced7596e',\n      '0x00000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45',\n    ],\n    transactionHash:\n      '0xbd49031be16f8fd1775f4e0fe79b408ffd8ae9c65b2827ee47e3238e3f51f4c0',\n    transactionIndex: 226,\n  },\n];\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`getNetwork`](https://eeth.dev/docs/api/classes/JsonRpcProvider#getnetwork)\n\n```typescript\nprovider.getNetwork(): Promise\u003cNetwork\u003e\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { JsonRpcProvider } from 'essential-eth';\nconst provider = new JsonRpcProvider('RPC URL HERE' /* Try Infura or POKT */);\n```\n\n```javascript\njsonRpcProvider('https://free-eth-node.com/api/eth').getNetwork();\n// { chainId: 1, name: 'eth', ensAddress: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e' }\n```\n\n```javascript\njsonRpcProvider('https://free-eth-node.com/api/MATIC').getNetwork();\n// { chainId: 137, name: 'MATIC', ensAddress: null }\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`getTransaction`](https://eeth.dev/docs/api/classes/JsonRpcProvider#gettransaction)\n\n```typescript\nprovider.getTransaction(transactionHash: string): Promise\u003cTransactionResponse\u003e\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { JsonRpcProvider } from 'essential-eth';\nconst provider = new JsonRpcProvider('RPC URL HERE' /* Try Infura or POKT */);\n```\n\n```javascript\nawait provider.getTransaction(\n  '0x9014ae6ef92464338355a79e5150e542ff9a83e2323318b21f40d6a3e65b4789',\n);\n// {\n//   accessList: [],\n//   blockHash: \"0x876810a013dbcd140f6fd6048c1dc33abbb901f1f96b394c2fa63aef3cb40b5d\",\n//   blockNumber: 14578286,\n//   chainId: 1,\n//   from: \"0xdfD9dE5f6FA60BD70636c0900752E93a6144AEd4\",\n//   gas: { TinyBig: 112163 },\n//   gasPrice: { TinyBig: 48592426858 },\n//   hash: \"0x9014ae6ef92464338355a79e5150e542ff9a83e2323318b21f40d6a3e65b4789\",\n//   input: \"0x83259f17000000000000000000000000000000000000000000...\",\n//   maxFeePerGas: { TinyBig: 67681261618 },\n//   maxPriorityFeePerGas: { TinyBig: 1500000000 },\n//   nonce: { TinyBig: 129 },\n//   r: \"0x59a7c15b12c18cd68d6c440963d959bff3e73831ffc938e75ecad07f7ee43fbc\",\n//   s: \"0x1ebaf05f0d9273b16c2a7748b150a79d22533a8cd74552611cbe620fee3dcf1c\",\n//   to: \"0x39B72d136ba3e4ceF35F48CD09587ffaB754DD8B\",\n//   transactionIndex: 29,\n//   type: 2,\n//   v: 0,\n//   value: { TinyBig: 0 },\n//   confirmations: 298140,\n// }\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`getTransactionCount`](https://eeth.dev/docs/api/classes/JsonRpcProvider#gettransactioncount)\n\n```typescript\nprovider.getTransactionCount(address: string, blockTag?: BlockTag): Promise\u003cnumber\u003e\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { JsonRpcProvider } from 'essential-eth';\nconst provider = new JsonRpcProvider('RPC URL HERE' /* Try Infura or POKT */);\n```\n\n```javascript\nawait provider.getTransactionCount(\n  '0x71660c4005ba85c37ccec55d0c4493e66fe775d3',\n);\n// 1060000\n```\n\n```javascript\nawait provider.getTransactionCount(\n  '0x71660c4005ba85c37ccec55d0c4493e66fe775d3',\n  'latest',\n);\n// 1060000\n```\n\n```javascript\nawait provider.getTransactionCount(\n  '0x71660c4005ba85c37ccec55d0c4493e66fe775d3',\n  14649390,\n);\n// 1053312\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n#### [`getTransactionReceipt`](https://eeth.dev/docs/api/classes/JsonRpcProvider#gettransactionreceipt)\n\n```typescript\nprovider.getTransactionReceipt(transactionHash: string): Promise\u003cTransactionReceipt\u003e\n```\n\n  \u003cdetails\u003e\n  \u003csummary\u003eView Example\u003c/summary\u003e\n\n```js\nimport { JsonRpcProvider } from 'essential-eth';\nconst provider = new JsonRpcProvider('RPC URL HERE' /* Try Infura or POKT */);\n```\n\n```javascript\nawait provider.getTransactionReceipt(\n  '0x9014ae6ef92464338355a79e5150e542ff9a83e2323318b21f40d6a3e65b4789',\n);\n// {\n//   blockHash: \"0x876810a013dbcd140f6fd6048c1dc33abbb901f1f96b394c2fa63aef3cb40b5d\",\n//   blockNumber: 14578286,\n//   contractAddress: null,\n//   cumulativeGasUsed: { TinyBig: 3067973 },\n//   effectiveGasPrice: { TinyBig: 48592426858 },\n//   from: \"0xdfD9dE5f6FA60BD70636c0900752E93a6144AEd4\",\n//   gasUsed: { TinyBig: 112163 },\n//   logs: [\n//     {\n//       address: \"0x0eDF9bc41Bbc1354c70e2107F80C42caE7FBBcA8\",\n//       blockHash: \"0x876810a013dbcd140f6fd6048c1dc33abbb901f1f96b394c2fa63aef3cb40b5d\",\n//       blockNumber: 14578286,\n//       data: \"0x0000000000000000000000000000000000000000000003a12ec797b5484968c1\",\n//       logIndex: 42,\n//       topics: [\n//         \"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\",\n//         \"0x00000000000000000000000039b72d136ba3e4cef35f48cd09587ffab754dd8b\",\n//         \"0x000000000000000000000000dfd9de5f6fa60bd70636c0900752e93a6144aed4\",\n//       ],\n//       transactionHash: \"0x9014ae6ef92464338355a79e5150e542ff9a83e2323318b21f40d6a3e65b4789\",\n//       transactionIndex: 29,\n//     },\n//     {\n//       address: \"0x39B72d136ba3e4ceF35F48CD09587ffaB754DD8B\",\n//       blockHash: \"0x876810a013dbcd140f6fd6048c1dc33abbb901f1f96b394c2fa63aef3cb40b5d\",\n//       blockNumber: 14578286,\n//       data: \"0x0000000000000000000000000000000000000000000003a12ec797b5484968c1\",\n//       logIndex: 43,\n//       topics: [\n//         \"0x34fcbac0073d7c3d388e51312faf357774904998eeb8fca628b9e6f65ee1cbf7\",\n//         \"0x000000000000000000000000dfd9de5f6fa60bd70636c0900752e93a6144aed4\",\n//         \"0x0000000000000000000000000000000000000000000000000000000000000003\",\n//       ],\n//       transactionHash: \"0x9014ae6ef92464338355a79e5150e542ff9a83e2323318b21f40d6a3e65b4789\",\n//       transactionIndex: 29,\n//     },\n//   ],\n//   logsBloom: \"0x00000000000000000000000000000...\",\n//   status: 1,\n//   to: \"0x39B72d136ba3e4ceF35F48CD09587ffaB754DD8B\",\n//   transactionHash: \"0x9014ae6ef92464338355a79e5150e542ff9a83e2323318b21f40d6a3e65b4789\",\n//   transactionIndex: 29,\n//   type: 2,\n//   byzantium: true,\n//   confirmations: 298171,\n// }\n```\n\n  \u003c/details\u003e\n\n  \u003cbr/\u003e\n\n\u003c!-- ⛔️ AUTO-GENERATED-CONTENT:END --\u003e\n\n\u003cbr/\u003e\n\n## Contract\n\n⚠️ Only read functions are currently supported. ⚠️\n\n- 🧪 `Contract` support is **experimental**, do not use this in production yet. (even though [earni.fi](https://earni.fi) does)\n\nEncoding support:\n\n- `bool`\n- `bytes`\n- `address`\n\nDecoding support:\n\n- `bool`\n- `address`\n- `uint256`\n- `bytes32`\n- `uint8`\n- `string` (only if there is one string output, not multiple yet)\n\n_Assume all types outside the above types will break for now_\n\n```typescript\nimport { Contract, jsonRpcProvider, JSONABI } from 'essential-eth';\n// UNI airdrop contract\nconst contractAddress = '0x090D4613473dEE047c3f2706764f49E0821D256e';\nconst provider = jsonRpcProvider(/* RPC URL optional */);\n\nconst abi: JSONABI = [\n  {\n    inputs: [\n      {\n        internalType: 'uint256',\n        name: 'index',\n        type: 'uint256',\n      },\n    ],\n    name: 'isClaimed',\n    outputs: [\n      {\n        internalType: 'bool',\n        name: '',\n        type: 'bool',\n      },\n    ],\n    stateMutability: 'view',\n    type: 'function',\n  },\n];\n\nconst contract = new Contract(contractAddress, abi, provider);\n\n(async () =\u003e {\n  // prints boolean as to whether index 0 has claimed airdrop or not\n  console.log(await contract.isClaimed(0));\n})();\n```\n\n#### `contractFunctionName(args)`\n\nAny function on a contract. Returns are the same as `ethers.js`, except that instead of BigNumber, `essential-eth` always returns a [`TinyBig`](https://eeth.dev/classes/TinyBig.html)\n\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n![Screen Shot 2022-01-12 at 10 25 29 AM](https://user-images.githubusercontent.com/3408480/149190699-9bc15719-9382-46af-a77b-45e138f37643.png)\n\n![Screen Shot 2022-01-12 at 10 24 57 AM](https://user-images.githubusercontent.com/3408480/149190691-ed2913b9-8c14-4a8e-b5f8-0895fbac279b.png)\n\n## More Info\n\n🧪 This repo is under active development. The API is less-fully featured than `web3` and `ethers`. More functions added often!\n\n👨🏻‍💻 Breaking changes will exist between minor versions until `1.0.0` (Versions go `major.minor.patch`)\n\n\u003cbr/\u003e\n\n![Alt](https://repobeats.axiom.co/api/embed/e479d8f777288a94cdde2fe3cdedf38d5243793d.svg 'Repobeats analytics image')\n\n\u003cbr/\u003e\n\n### Identical vs Similar vs Dissimilar {#isd}\n\nThroughout the documentation for `essential-eth`, you may notice that some functions are compared to `ethers.js` and `web3.js`. The keywords `identical`, `similar`, and `dissimilar` are used to help you migrate to `essential-eth`. Here's a guide on what these keywords mean:\n\n- Identical -- should behave exactly like the library you're already using, except the types might be different (`TinyBig` vs [`Bn.js`](https://github.com/indutny/bn.js)).\n- Similar -- can probably be used as a replacement to the library you're currently using, except there are some differences. Read the notes next to this keyword to see why these aren't considered `identical`.\n- Dissimilar -- _should not_ be used in place of the function you're currently using. Read the notes next to this keyword to see why these functions aren't considered `similar`, and potentially learn how to alter your implementation to make `essential-eth` work for you.\n\nNote: In `web3.js`, almost every method or function can be passed a callback. `essential-eth`, like `ethers.js`, does not include this functionality and trusts that users will rely on the much more modern [promise](https://javascript.info/promise-basics) and [async/await](https://javascript.info/async-await) patterns.\n\n### Miscellaneous\n\n- [📓 View full docs](https://eeth.dev)\n- [📓 View changelog (by looking at releases diff)](https://github.com/dawsbot/essential-eth/releases)\n- [📋 View our project board](https://github.com/dawsbot/essential-eth/projects/1)\n\n## Contributing and GitPOAP\n\nWe welcome and appreciate all contributions to Essential Eth! If you're interested in helping us improve this library, please read our [Contributing Guidelines](https://github.com/dawsbot/essential-eth/blob/master/CONTRIBUTING.md) to understand the types of contributions we're looking for and the process of making them.\n\nIn partnership with GitPOAP, Essential ETH wants to recognize **all** contributors for their contributions toward the growth of this library. More information about GitPOAP can be found on the [Contributing Guidelines](https://github.com/dawsbot/essential-eth/blob/master/CONTRIBUTING.md#GitPOAP).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdawsbot%2Fessential-eth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdawsbot%2Fessential-eth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdawsbot%2Fessential-eth/lists"}