essential-eth 0.4.6 → 0.4.9-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/..eslintrc.js.un~ +0 -0
- package/..npmignore.un~ +0 -0
- package/.env +1 -0
- package/.eslintignore +4 -0
- package/.eslintrc.js +34 -0
- package/.gitattributes +1 -0
- package/.github/workflows/.test.yml.un~ +0 -0
- package/.github/workflows/test.yml +29 -0
- package/.package.json.un~ +0 -0
- package/.prettierignore +7 -0
- package/.travis.yml +5 -0
- package/jest.config.js +9 -0
- package/package.json +34 -20
- package/readme.md +1 -2
- package/scripts/build-website.sh +4 -0
- package/scripts/bump-minor.sh +4 -0
- package/scripts/bump-patch.sh +4 -0
- package/scripts/fetch-chains-info.ts +70 -0
- package/scripts/pre-commit.sh +5 -0
- package/src/classes/Contract.ts +161 -0
- package/src/classes/test/Contract/crv-abi.ts +488 -0
- package/src/classes/test/Contract/crv.test.ts +56 -0
- package/src/classes/test/Contract/ens-abi.ts +452 -0
- package/src/classes/test/Contract/ens.test.ts +39 -0
- package/src/classes/test/Contract/fei-abi.ts +526 -0
- package/src/classes/test/Contract/fei.test.ts +86 -0
- package/src/classes/test/Contract/foo-abi.ts +42 -0
- package/src/classes/test/Contract/foo.test.ts +33 -0
- package/src/classes/test/Contract/uni.test.ts +72 -0
- package/src/classes/test/Contract/uniswap-abi.ts +121 -0
- package/src/classes/utils/clean-block.ts +49 -0
- package/src/classes/utils/clean-transaction.ts +35 -0
- package/src/classes/utils/encode-decode-transaction.ts +126 -0
- package/src/classes/utils/fetchers.ts +27 -0
- package/{lib/cjs/classes/utils/hex-to-decimal.d.ts → src/classes/utils/hex-to-decimal.ts} +3 -1
- package/src/index.ts +27 -0
- package/src/providers/JsonRpcProvider.ts +94 -0
- package/src/providers/test/get-block.test.ts +63 -0
- package/src/providers/test/get-network.test.ts +34 -0
- package/src/providers/utils/chains-info.ts +1079 -0
- package/src/shared/tiny-big/helpers.test.ts +30 -0
- package/src/shared/tiny-big/helpers.ts +89 -0
- package/src/shared/tiny-big/tiny-big.test.ts +10 -0
- package/src/shared/tiny-big/tiny-big.ts +36 -0
- package/src/shared/validate-type.ts +20 -0
- package/src/types/.Contract.types.ts.un~ +0 -0
- package/src/types/Block.types.ts +50 -0
- package/src/types/Contract.types.ts +67 -0
- package/src/types/Network.types.ts +8 -0
- package/src/types/Transaction.types.ts +35 -0
- package/{lib/cjs/utils/ether-to-wei.d.ts → src/utils/ether-to-wei.ts} +10 -2
- package/src/utils/index.ts +6 -0
- package/src/utils/is-address.ts +16 -0
- package/src/utils/tests/ether-to-wei.test.ts +65 -0
- package/src/utils/tests/is-address.test.ts +52 -0
- package/src/utils/tests/to-checksum-address.test.ts +43 -0
- package/src/utils/tests/wei-to-ether.test.ts +72 -0
- package/src/utils/to-checksum-address.ts +47 -0
- package/{lib/cjs/utils/wei-to-ether.d.ts → src/utils/wei-to-ether.ts} +8 -1
- package/test/global-setup.js +8 -0
- package/test/global-teardown.js +5 -0
- package/test/jest.setup-after-env.js +1 -0
- package/test/server.js +24 -0
- package/tsconfig-cjs.json +8 -0
- package/tsconfig.json +25 -0
- package/typedoc/options-new-version.js +8 -0
- package/typedoc/options.js +9 -0
- package/types/just-omit.d.ts +1 -0
- package/website/.nojekyll +1 -0
- package/website/assets/highlight.css +71 -0
- package/website/assets/icons.css +1043 -0
- package/website/assets/icons.png +0 -0
- package/website/assets/icons@2x.png +0 -0
- package/website/assets/main.js +52 -0
- package/website/assets/search.js +1 -0
- package/website/assets/style.css +1413 -0
- package/website/assets/widgets.png +0 -0
- package/website/assets/widgets@2x.png +0 -0
- package/website/classes/Contract.html +13 -0
- package/website/classes/JsonRpcProvider.html +8 -0
- package/website/classes/TinyBig.html +161 -0
- package/website/index.html +207 -0
- package/website/interfaces/Block.html +1 -0
- package/website/interfaces/JSONABIArgument.html +1 -0
- package/website/interfaces/Network.html +3 -0
- package/website/interfaces/Transaction.html +1 -0
- package/website/modules.html +32 -0
- package/website/versions/0.1.2/assets/highlight.css +57 -0
- package/website/versions/0.1.2/assets/icons.css +1043 -0
- package/website/versions/0.1.2/assets/icons.png +0 -0
- package/website/versions/0.1.2/assets/icons@2x.png +0 -0
- package/website/versions/0.1.2/assets/main.js +52 -0
- package/website/versions/0.1.2/assets/search.js +1 -0
- package/website/versions/0.1.2/assets/style.css +1341 -0
- package/website/versions/0.1.2/assets/widgets.png +0 -0
- package/website/versions/0.1.2/assets/widgets@2x.png +0 -0
- package/website/versions/0.1.2/classes/TinyBig.html +4 -0
- package/website/versions/0.1.2/index.html +20 -0
- package/website/versions/0.1.2/modules.html +23 -0
- package/website/versions/0.1.3/assets/highlight.css +64 -0
- package/website/versions/0.1.3/assets/icons.css +1043 -0
- package/website/versions/0.1.3/assets/icons.png +0 -0
- package/website/versions/0.1.3/assets/icons@2x.png +0 -0
- package/website/versions/0.1.3/assets/main.js +52 -0
- package/website/versions/0.1.3/assets/search.js +1 -0
- package/website/versions/0.1.3/assets/style.css +1341 -0
- package/website/versions/0.1.3/assets/widgets.png +0 -0
- package/website/versions/0.1.3/assets/widgets@2x.png +0 -0
- package/website/versions/0.1.3/classes/TinyBig.html +4 -0
- package/website/versions/0.1.3/index.html +53 -0
- package/website/versions/0.1.3/modules.html +23 -0
- package/website/versions/0.1.4/assets/highlight.css +64 -0
- package/website/versions/0.1.4/assets/icons.css +1043 -0
- package/website/versions/0.1.4/assets/icons.png +0 -0
- package/website/versions/0.1.4/assets/icons@2x.png +0 -0
- package/website/versions/0.1.4/assets/main.js +52 -0
- package/website/versions/0.1.4/assets/search.js +1 -0
- package/website/versions/0.1.4/assets/style.css +1341 -0
- package/website/versions/0.1.4/assets/widgets.png +0 -0
- package/website/versions/0.1.4/assets/widgets@2x.png +0 -0
- package/website/versions/0.1.4/classes/EssentialEth.html +1 -0
- package/website/versions/0.1.4/classes/TinyBig.html +4 -0
- package/website/versions/0.1.4/index.html +58 -0
- package/website/versions/0.1.4/modules.html +23 -0
- package/website/versions/0.2.0/assets/highlight.css +64 -0
- package/website/versions/0.2.0/assets/icons.css +1043 -0
- package/website/versions/0.2.0/assets/icons.png +0 -0
- package/website/versions/0.2.0/assets/icons@2x.png +0 -0
- package/website/versions/0.2.0/assets/main.js +52 -0
- package/website/versions/0.2.0/assets/search.js +1 -0
- package/website/versions/0.2.0/assets/style.css +1341 -0
- package/website/versions/0.2.0/assets/widgets.png +0 -0
- package/website/versions/0.2.0/assets/widgets@2x.png +0 -0
- package/website/versions/0.2.0/classes/EssentialEth.html +5 -0
- package/website/versions/0.2.0/classes/TinyBig.html +146 -0
- package/website/versions/0.2.0/index.html +89 -0
- package/website/versions/0.2.0/modules.html +25 -0
- package/website/versions/0.2.1/assets/highlight.css +64 -0
- package/website/versions/0.2.1/assets/icons.css +1043 -0
- package/website/versions/0.2.1/assets/icons.png +0 -0
- package/website/versions/0.2.1/assets/icons@2x.png +0 -0
- package/website/versions/0.2.1/assets/main.js +52 -0
- package/website/versions/0.2.1/assets/search.js +1 -0
- package/website/versions/0.2.1/assets/style.css +1341 -0
- package/website/versions/0.2.1/assets/widgets.png +0 -0
- package/website/versions/0.2.1/assets/widgets@2x.png +0 -0
- package/website/versions/0.2.1/classes/EssentialEth.html +5 -0
- package/website/versions/0.2.1/classes/TinyBig.html +146 -0
- package/website/versions/0.2.1/index.html +96 -0
- package/website/versions/0.2.1/modules.html +29 -0
- package/website/versions/0.2.2/assets/highlight.css +64 -0
- package/website/versions/0.2.2/assets/icons.css +1043 -0
- package/website/versions/0.2.2/assets/icons.png +0 -0
- package/website/versions/0.2.2/assets/icons@2x.png +0 -0
- package/website/versions/0.2.2/assets/main.js +52 -0
- package/website/versions/0.2.2/assets/search.js +1 -0
- package/website/versions/0.2.2/assets/style.css +1341 -0
- package/website/versions/0.2.2/assets/widgets.png +0 -0
- package/website/versions/0.2.2/assets/widgets@2x.png +0 -0
- package/website/versions/0.2.2/classes/EssentialEth.html +5 -0
- package/website/versions/0.2.2/classes/TinyBig.html +146 -0
- package/website/versions/0.2.2/index.html +96 -0
- package/website/versions/0.2.2/modules.html +29 -0
- package/website/versions/0.3.0/.nojekyll +1 -0
- package/website/versions/0.3.0/assets/highlight.css +71 -0
- package/website/versions/0.3.0/assets/icons.css +1043 -0
- package/website/versions/0.3.0/assets/icons.png +0 -0
- package/website/versions/0.3.0/assets/icons@2x.png +0 -0
- package/website/versions/0.3.0/assets/main.js +52 -0
- package/website/versions/0.3.0/assets/search.js +1 -0
- package/website/versions/0.3.0/assets/style.css +1384 -0
- package/website/versions/0.3.0/assets/widgets.png +0 -0
- package/website/versions/0.3.0/assets/widgets@2x.png +0 -0
- package/website/versions/0.3.0/classes/Contract.html +15 -0
- package/website/versions/0.3.0/classes/TinyBig.html +156 -0
- package/website/versions/0.3.0/index.html +123 -0
- package/website/versions/0.3.0/modules.html +32 -0
- package/website/versions/0.3.1/.nojekyll +1 -0
- package/website/versions/0.3.1/assets/highlight.css +71 -0
- package/website/versions/0.3.1/assets/icons.css +1043 -0
- package/website/versions/0.3.1/assets/icons.png +0 -0
- package/website/versions/0.3.1/assets/icons@2x.png +0 -0
- package/website/versions/0.3.1/assets/main.js +52 -0
- package/website/versions/0.3.1/assets/search.js +1 -0
- package/website/versions/0.3.1/assets/style.css +1384 -0
- package/website/versions/0.3.1/assets/widgets.png +0 -0
- package/website/versions/0.3.1/assets/widgets@2x.png +0 -0
- package/website/versions/0.3.1/classes/Contract.html +15 -0
- package/website/versions/0.3.1/classes/TinyBig.html +156 -0
- package/website/versions/0.3.1/index.html +123 -0
- package/website/versions/0.3.1/modules.html +32 -0
- package/website/versions/0.3.2/.nojekyll +1 -0
- package/website/versions/0.3.2/assets/highlight.css +71 -0
- package/website/versions/0.3.2/assets/icons.css +1043 -0
- package/website/versions/0.3.2/assets/icons.png +0 -0
- package/website/versions/0.3.2/assets/icons@2x.png +0 -0
- package/website/versions/0.3.2/assets/main.js +52 -0
- package/website/versions/0.3.2/assets/search.js +1 -0
- package/website/versions/0.3.2/assets/style.css +1384 -0
- package/website/versions/0.3.2/assets/widgets.png +0 -0
- package/website/versions/0.3.2/assets/widgets@2x.png +0 -0
- package/website/versions/0.3.2/classes/Contract.html +15 -0
- package/website/versions/0.3.2/classes/JsonRpcProvider.html +5 -0
- package/website/versions/0.3.2/classes/TinyBig.html +156 -0
- package/website/versions/0.3.2/index.html +123 -0
- package/website/versions/0.3.2/modules.html +32 -0
- package/website/versions/0.3.3/.nojekyll +1 -0
- package/website/versions/0.3.3/assets/highlight.css +71 -0
- package/website/versions/0.3.3/assets/icons.css +1043 -0
- package/website/versions/0.3.3/assets/icons.png +0 -0
- package/website/versions/0.3.3/assets/icons@2x.png +0 -0
- package/website/versions/0.3.3/assets/main.js +52 -0
- package/website/versions/0.3.3/assets/search.js +1 -0
- package/website/versions/0.3.3/assets/style.css +1384 -0
- package/website/versions/0.3.3/assets/widgets.png +0 -0
- package/website/versions/0.3.3/assets/widgets@2x.png +0 -0
- package/website/versions/0.3.3/classes/Contract.html +15 -0
- package/website/versions/0.3.3/classes/JsonRpcProvider.html +5 -0
- package/website/versions/0.3.3/classes/TinyBig.html +156 -0
- package/website/versions/0.3.3/index.html +123 -0
- package/website/versions/0.3.3/interfaces/Block.html +1 -0
- package/website/versions/0.3.3/interfaces/Transaction.html +1 -0
- package/website/versions/0.3.3/modules.html +32 -0
- package/website/versions/0.4.0/.nojekyll +1 -0
- package/website/versions/0.4.0/assets/highlight.css +71 -0
- package/website/versions/0.4.0/assets/icons.css +1043 -0
- package/website/versions/0.4.0/assets/icons.png +0 -0
- package/website/versions/0.4.0/assets/icons@2x.png +0 -0
- package/website/versions/0.4.0/assets/main.js +52 -0
- package/website/versions/0.4.0/assets/search.js +1 -0
- package/website/versions/0.4.0/assets/style.css +1384 -0
- package/website/versions/0.4.0/assets/widgets.png +0 -0
- package/website/versions/0.4.0/assets/widgets@2x.png +0 -0
- package/website/versions/0.4.0/classes/Contract.html +15 -0
- package/website/versions/0.4.0/classes/JsonRpcProvider.html +6 -0
- package/website/versions/0.4.0/classes/TinyBig.html +156 -0
- package/website/versions/0.4.0/index.html +148 -0
- package/website/versions/0.4.0/interfaces/Block.html +1 -0
- package/website/versions/0.4.0/interfaces/Transaction.html +1 -0
- package/website/versions/0.4.0/modules.html +32 -0
- package/website/versions/0.4.1/.nojekyll +1 -0
- package/website/versions/0.4.1/assets/highlight.css +71 -0
- package/website/versions/0.4.1/assets/icons.css +1043 -0
- package/website/versions/0.4.1/assets/icons.png +0 -0
- package/website/versions/0.4.1/assets/icons@2x.png +0 -0
- package/website/versions/0.4.1/assets/main.js +52 -0
- package/website/versions/0.4.1/assets/search.js +1 -0
- package/website/versions/0.4.1/assets/style.css +1384 -0
- package/website/versions/0.4.1/assets/widgets.png +0 -0
- package/website/versions/0.4.1/assets/widgets@2x.png +0 -0
- package/website/versions/0.4.1/classes/Contract.html +15 -0
- package/website/versions/0.4.1/classes/JsonRpcProvider.html +6 -0
- package/website/versions/0.4.1/classes/TinyBig.html +156 -0
- package/website/versions/0.4.1/index.html +148 -0
- package/website/versions/0.4.1/interfaces/Block.html +1 -0
- package/website/versions/0.4.1/interfaces/Transaction.html +1 -0
- package/website/versions/0.4.1/modules.html +32 -0
- package/website/versions/0.4.2/.nojekyll +1 -0
- package/website/versions/0.4.2/assets/highlight.css +71 -0
- package/website/versions/0.4.2/assets/icons.css +1043 -0
- package/website/versions/0.4.2/assets/icons.png +0 -0
- package/website/versions/0.4.2/assets/icons@2x.png +0 -0
- package/website/versions/0.4.2/assets/main.js +52 -0
- package/website/versions/0.4.2/assets/search.js +1 -0
- package/website/versions/0.4.2/assets/style.css +1384 -0
- package/website/versions/0.4.2/assets/widgets.png +0 -0
- package/website/versions/0.4.2/assets/widgets@2x.png +0 -0
- package/website/versions/0.4.2/classes/Contract.html +15 -0
- package/website/versions/0.4.2/classes/JsonRpcProvider.html +8 -0
- package/website/versions/0.4.2/classes/TinyBig.html +156 -0
- package/website/versions/0.4.2/index.html +199 -0
- package/website/versions/0.4.2/interfaces/Block.html +1 -0
- package/website/versions/0.4.2/interfaces/Transaction.html +1 -0
- package/website/versions/0.4.2/modules.html +34 -0
- package/website/versions/0.4.3/.nojekyll +1 -0
- package/website/versions/0.4.3/assets/highlight.css +71 -0
- package/website/versions/0.4.3/assets/icons.css +1043 -0
- package/website/versions/0.4.3/assets/icons.png +0 -0
- package/website/versions/0.4.3/assets/icons@2x.png +0 -0
- package/website/versions/0.4.3/assets/main.js +52 -0
- package/website/versions/0.4.3/assets/search.js +1 -0
- package/website/versions/0.4.3/assets/style.css +1384 -0
- package/website/versions/0.4.3/assets/widgets.png +0 -0
- package/website/versions/0.4.3/assets/widgets@2x.png +0 -0
- package/website/versions/0.4.3/classes/Contract.html +15 -0
- package/website/versions/0.4.3/classes/JsonRpcProvider.html +8 -0
- package/website/versions/0.4.3/classes/TinyBig.html +159 -0
- package/website/versions/0.4.3/index.html +199 -0
- package/website/versions/0.4.3/interfaces/Block.html +1 -0
- package/website/versions/0.4.3/interfaces/Transaction.html +1 -0
- package/website/versions/0.4.3/modules.html +34 -0
- package/website/versions/0.4.6/.nojekyll +1 -0
- package/website/versions/0.4.6/assets/highlight.css +71 -0
- package/website/versions/0.4.6/assets/icons.css +1043 -0
- package/website/versions/0.4.6/assets/icons.png +0 -0
- package/website/versions/0.4.6/assets/icons@2x.png +0 -0
- package/website/versions/0.4.6/assets/main.js +52 -0
- package/website/versions/0.4.6/assets/search.js +1 -0
- package/website/versions/0.4.6/assets/style.css +1413 -0
- package/website/versions/0.4.6/assets/widgets.png +0 -0
- package/website/versions/0.4.6/assets/widgets@2x.png +0 -0
- package/website/versions/0.4.6/classes/Contract.html +15 -0
- package/website/versions/0.4.6/classes/JsonRpcProvider.html +8 -0
- package/website/versions/0.4.6/classes/TinyBig.html +159 -0
- package/website/versions/0.4.6/index.html +207 -0
- package/website/versions/0.4.6/interfaces/Block.html +1 -0
- package/website/versions/0.4.6/interfaces/Transaction.html +1 -0
- package/website/versions/0.4.6/modules.html +34 -0
- package/website/versions/0.4.8/.nojekyll +1 -0
- package/website/versions/0.4.8/assets/highlight.css +71 -0
- package/website/versions/0.4.8/assets/icons.css +1043 -0
- package/website/versions/0.4.8/assets/icons.png +0 -0
- package/website/versions/0.4.8/assets/icons@2x.png +0 -0
- package/website/versions/0.4.8/assets/main.js +52 -0
- package/website/versions/0.4.8/assets/search.js +1 -0
- package/website/versions/0.4.8/assets/style.css +1413 -0
- package/website/versions/0.4.8/assets/widgets.png +0 -0
- package/website/versions/0.4.8/assets/widgets@2x.png +0 -0
- package/website/versions/0.4.8/classes/Contract.html +15 -0
- package/website/versions/0.4.8/classes/JsonRpcProvider.html +8 -0
- package/website/versions/0.4.8/classes/TinyBig.html +161 -0
- package/website/versions/0.4.8/index.html +207 -0
- package/website/versions/0.4.8/interfaces/Block.html +1 -0
- package/website/versions/0.4.8/interfaces/Transaction.html +1 -0
- package/website/versions/0.4.8/modules.html +34 -0
- package/website/versions/0.4.9-beta.0/.nojekyll +1 -0
- package/website/versions/0.4.9-beta.0/assets/highlight.css +71 -0
- package/website/versions/0.4.9-beta.0/assets/icons.css +1043 -0
- package/website/versions/0.4.9-beta.0/assets/icons.png +0 -0
- package/website/versions/0.4.9-beta.0/assets/icons@2x.png +0 -0
- package/website/versions/0.4.9-beta.0/assets/main.js +52 -0
- package/website/versions/0.4.9-beta.0/assets/search.js +1 -0
- package/website/versions/0.4.9-beta.0/assets/style.css +1413 -0
- package/website/versions/0.4.9-beta.0/assets/widgets.png +0 -0
- package/website/versions/0.4.9-beta.0/assets/widgets@2x.png +0 -0
- package/website/versions/0.4.9-beta.0/classes/Contract.html +13 -0
- package/website/versions/0.4.9-beta.0/classes/JsonRpcProvider.html +8 -0
- package/website/versions/0.4.9-beta.0/classes/TinyBig.html +161 -0
- package/website/versions/0.4.9-beta.0/index.html +207 -0
- package/website/versions/0.4.9-beta.0/interfaces/Block.html +1 -0
- package/website/versions/0.4.9-beta.0/interfaces/JSONABIArgument.html +1 -0
- package/website/versions/0.4.9-beta.0/interfaces/Network.html +3 -0
- package/website/versions/0.4.9-beta.0/interfaces/Transaction.html +1 -0
- package/website/versions/0.4.9-beta.0/modules.html +32 -0
- package/website/versions/versions/0.1.2/assets/highlight.css +57 -0
- package/website/versions/versions/0.1.2/assets/icons.css +1043 -0
- package/website/versions/versions/0.1.2/assets/icons.png +0 -0
- package/website/versions/versions/0.1.2/assets/icons@2x.png +0 -0
- package/website/versions/versions/0.1.2/assets/main.js +52 -0
- package/website/versions/versions/0.1.2/assets/search.js +1 -0
- package/website/versions/versions/0.1.2/assets/style.css +1341 -0
- package/website/versions/versions/0.1.2/assets/widgets.png +0 -0
- package/website/versions/versions/0.1.2/assets/widgets@2x.png +0 -0
- package/website/versions/versions/0.1.2/classes/TinyBig.html +4 -0
- package/website/versions/versions/0.1.2/index.html +20 -0
- package/website/versions/versions/0.1.2/modules.html +23 -0
- package/website/versions/versions/0.1.3/assets/highlight.css +64 -0
- package/website/versions/versions/0.1.3/assets/icons.css +1043 -0
- package/website/versions/versions/0.1.3/assets/icons.png +0 -0
- package/website/versions/versions/0.1.3/assets/icons@2x.png +0 -0
- package/website/versions/versions/0.1.3/assets/main.js +52 -0
- package/website/versions/versions/0.1.3/assets/search.js +1 -0
- package/website/versions/versions/0.1.3/assets/style.css +1341 -0
- package/website/versions/versions/0.1.3/assets/widgets.png +0 -0
- package/website/versions/versions/0.1.3/assets/widgets@2x.png +0 -0
- package/website/versions/versions/0.1.3/classes/TinyBig.html +4 -0
- package/website/versions/versions/0.1.3/index.html +53 -0
- package/website/versions/versions/0.1.3/modules.html +23 -0
- package/website/versions/versions/0.1.4/assets/highlight.css +64 -0
- package/website/versions/versions/0.1.4/assets/icons.css +1043 -0
- package/website/versions/versions/0.1.4/assets/icons.png +0 -0
- package/website/versions/versions/0.1.4/assets/icons@2x.png +0 -0
- package/website/versions/versions/0.1.4/assets/main.js +52 -0
- package/website/versions/versions/0.1.4/assets/search.js +1 -0
- package/website/versions/versions/0.1.4/assets/style.css +1341 -0
- package/website/versions/versions/0.1.4/assets/widgets.png +0 -0
- package/website/versions/versions/0.1.4/assets/widgets@2x.png +0 -0
- package/website/versions/versions/0.1.4/classes/TinyBig.html +4 -0
- package/website/versions/versions/0.1.4/index.html +58 -0
- package/website/versions/versions/0.1.4/modules.html +23 -0
- package/lib/cjs/classes/Contract.d.ts +0 -72
- package/lib/cjs/classes/Contract.js +0 -126
- package/lib/cjs/classes/test/Contract/crv-abi.d.ts +0 -2
- package/lib/cjs/classes/test/Contract/crv-abi.js +0 -488
- package/lib/cjs/classes/test/Contract/ens-abi.d.ts +0 -2
- package/lib/cjs/classes/test/Contract/ens-abi.js +0 -453
- package/lib/cjs/classes/test/Contract/fei-abi.d.ts +0 -2
- package/lib/cjs/classes/test/Contract/fei-abi.js +0 -526
- package/lib/cjs/classes/test/Contract/foo-abi.d.ts +0 -2
- package/lib/cjs/classes/test/Contract/foo-abi.js +0 -42
- package/lib/cjs/classes/test/Contract/uniswap-abi.d.ts +0 -2
- package/lib/cjs/classes/test/Contract/uniswap-abi.js +0 -121
- package/lib/cjs/classes/utils/clean-block.d.ts +0 -6
- package/lib/cjs/classes/utils/clean-block.js +0 -46
- package/lib/cjs/classes/utils/clean-transaction.d.ts +0 -5
- package/lib/cjs/classes/utils/clean-transaction.js +0 -38
- package/lib/cjs/classes/utils/encode-decode-transaction.d.ts +0 -3
- package/lib/cjs/classes/utils/encode-decode-transaction.js +0 -113
- package/lib/cjs/classes/utils/fetchers.d.ts +0 -9
- package/lib/cjs/classes/utils/fetchers.js +0 -33
- package/lib/cjs/classes/utils/hex-to-decimal.js +0 -11
- package/lib/cjs/index.d.ts +0 -12
- package/lib/cjs/index.js +0 -19
- package/lib/cjs/providers/JsonRpcProvider.d.ts +0 -22
- package/lib/cjs/providers/JsonRpcProvider.js +0 -69
- package/lib/cjs/providers/utils/chains-info.d.ts +0 -338
- package/lib/cjs/providers/utils/chains-info.js +0 -1015
- package/lib/cjs/shared/tiny-big/helpers.d.ts +0 -1
- package/lib/cjs/shared/tiny-big/helpers.js +0 -71
- package/lib/cjs/shared/tiny-big/tiny-big.d.ts +0 -19
- package/lib/cjs/shared/tiny-big/tiny-big.js +0 -41
- package/lib/cjs/shared/validate-type.d.ts +0 -3
- package/lib/cjs/shared/validate-type.js +0 -9
- package/lib/cjs/types/Block.types.d.ts +0 -47
- package/lib/cjs/types/Block.types.js +0 -2
- package/lib/cjs/types/Contract.types.d.ts +0 -24
- package/lib/cjs/types/Contract.types.js +0 -2
- package/lib/cjs/types/Network.types.d.ts +0 -8
- package/lib/cjs/types/Network.types.js +0 -2
- package/lib/cjs/types/Transaction.types.d.ts +0 -34
- package/lib/cjs/types/Transaction.types.js +0 -2
- package/lib/cjs/utils/ether-to-wei.js +0 -32
- package/lib/cjs/utils/is-address.d.ts +0 -5
- package/lib/cjs/utils/is-address.js +0 -20
- package/lib/cjs/utils/to-checksum-address.d.ts +0 -17
- package/lib/cjs/utils/to-checksum-address.js +0 -46
- package/lib/cjs/utils/wei-to-ether.js +0 -34
- package/lib/esm/classes/Contract.d.ts +0 -12
- package/lib/esm/classes/Contract.js +0 -63
- package/lib/esm/classes/test/Contract/crv-abi.d.ts +0 -2
- package/lib/esm/classes/test/Contract/crv-abi.js +0 -470
- package/lib/esm/classes/test/Contract/ens-abi.d.ts +0 -2
- package/lib/esm/classes/test/Contract/ens-abi.js +0 -435
- package/lib/esm/classes/test/Contract/fei-abi.d.ts +0 -2
- package/lib/esm/classes/test/Contract/fei-abi.js +0 -521
- package/lib/esm/classes/test/Contract/foo-abi.d.ts +0 -2
- package/lib/esm/classes/test/Contract/foo-abi.js +0 -33
- package/lib/esm/classes/test/Contract/uniswap-abi.d.ts +0 -2
- package/lib/esm/classes/test/Contract/uniswap-abi.js +0 -116
- package/lib/esm/classes/utils/clean-block.d.ts +0 -3
- package/lib/esm/classes/utils/clean-block.js +0 -35
- package/lib/esm/classes/utils/clean-transaction.d.ts +0 -2
- package/lib/esm/classes/utils/clean-transaction.js +0 -29
- package/lib/esm/classes/utils/encode-decode-transaction.d.ts +0 -3
- package/lib/esm/classes/utils/encode-decode-transaction.js +0 -98
- package/lib/esm/classes/utils/fetchers.d.ts +0 -9
- package/lib/esm/classes/utils/fetchers.js +0 -25
- package/lib/esm/classes/utils/hex-to-decimal.d.ts +0 -1
- package/lib/esm/classes/utils/hex-to-decimal.js +0 -3
- package/lib/esm/index.d.ts +0 -12
- package/lib/esm/index.js +0 -8
- package/lib/esm/providers/JsonRpcProvider.d.ts +0 -9
- package/lib/esm/providers/JsonRpcProvider.js +0 -49
- package/lib/esm/providers/utils/chains-info.d.ts +0 -338
- package/lib/esm/providers/utils/chains-info.js +0 -1011
- package/lib/esm/shared/tiny-big/helpers.d.ts +0 -1
- package/lib/esm/shared/tiny-big/helpers.js +0 -58
- package/lib/esm/shared/tiny-big/tiny-big.d.ts +0 -8
- package/lib/esm/shared/tiny-big/tiny-big.js +0 -22
- package/lib/esm/shared/validate-type.d.ts +0 -3
- package/lib/esm/shared/validate-type.js +0 -5
- package/lib/esm/types/Block.types.d.ts +0 -47
- package/lib/esm/types/Block.types.js +0 -1
- package/lib/esm/types/Contract.types.d.ts +0 -24
- package/lib/esm/types/Contract.types.js +0 -1
- package/lib/esm/types/Network.types.d.ts +0 -5
- package/lib/esm/types/Network.types.js +0 -1
- package/lib/esm/types/Transaction.types.d.ts +0 -34
- package/lib/esm/types/Transaction.types.js +0 -1
- package/lib/esm/utils/ether-to-wei.d.ts +0 -3
- package/lib/esm/utils/ether-to-wei.js +0 -7
- package/lib/esm/utils/is-address.d.ts +0 -1
- package/lib/esm/utils/is-address.js +0 -12
- package/lib/esm/utils/to-checksum-address.d.ts +0 -1
- package/lib/esm/utils/to-checksum-address.js +0 -25
- package/lib/esm/utils/wei-to-ether.d.ts +0 -3
- package/lib/esm/utils/wei-to-ether.js +0 -7
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default no-js"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>essential-eth - v0.4.1</title><meta name="description" content="Documentation for essential-eth - v0.4.1"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script async src="assets/search.js" id="search-script"></script></head><body><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base="."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">essential-eth - v0.4.1</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><h1>essential-eth - v0.4.1</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><div class="tsd-panel tsd-typography"><p align="center">
|
|
2
|
+
<a><img src="https://blog.ethereum.org/img/2018/08/grants_eth_logo.png" title="Logo" height="400"/></a>
|
|
3
|
+
</p>
|
|
4
|
+
<p align="center">
|
|
5
|
+
<b>
|
|
6
|
+
Essential Eth
|
|
7
|
+
</b>
|
|
8
|
+
<br>
|
|
9
|
+
<i>Ultralight Ethereum utilities for JS and TS</i>
|
|
10
|
+
<br>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<hr>
|
|
14
|
+
<p align="center">
|
|
15
|
+
<img src="https://user-images.githubusercontent.com/3408480/133322814-f3d18424-4ba8-4a37-8cbc-c5e6828354a3.png" title="Ethereum triangle" width="900"/>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<hr>
|
|
19
|
+
<br>
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
<ul>
|
|
23
|
+
<li>⚡️ A replacement for <code>web3</code> and <code>ethers</code></li>
|
|
24
|
+
<li>🏎 <a href="https://bundlephobia.com/package/essential-eth">The TINIEST code size possible</a></li>
|
|
25
|
+
<li>ʦ Fully typed with TypeScript (also works with JavaScript)</li>
|
|
26
|
+
<li>🧪 Tested to match both <code>web3</code> and <code>ethers</code></li>
|
|
27
|
+
<li>🌲 Tree-shaking and no side-effects</li>
|
|
28
|
+
<li>🙌 Supports multiple JS versions (CommonJS and ESM)<ul>
|
|
29
|
+
<li>✅ Node 14, 12, & 10</li>
|
|
30
|
+
<li>✅ Web</li>
|
|
31
|
+
</ul>
|
|
32
|
+
</li>
|
|
33
|
+
</ul>
|
|
34
|
+
<br/>
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
<a href="#more-info" id="more-info" style="color: inherit; text-decoration: none;">
|
|
38
|
+
<h2>More Info</h2>
|
|
39
|
+
</a>
|
|
40
|
+
<p>🧪 This repo is under active development. The API is less-fully featured than <code>web3</code> and <code>ethers</code>. More functions added often!</p>
|
|
41
|
+
<p><img src="https://badgen.net/bundlephobia/minzip/essential-eth" alt=""> <img src="https://badgen.net/bundlephobia/tree-shaking/essential-eth" alt=""> <img src="https://img.shields.io/npm/v/essential-eth" alt=""> <img src="https://badgen.net/bundlephobia/dependency-count/essential-eth" alt=""></p>
|
|
42
|
+
<p>👨🏻💻 Breaking changes will exist between minor versions until <code>1.0.0</code> (Versions go <code>major.minor.patch</code>)</p>
|
|
43
|
+
<br/>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<a href="#install" id="install" style="color: inherit; text-decoration: none;">
|
|
47
|
+
<h2>Install</h2>
|
|
48
|
+
</a>
|
|
49
|
+
<pre><code class="language-sh"><span class="hl-1">npm install --save essential-eth </span><span class="hl-3"># TypeScript types load automatically</span><br/><br/><span class="hl-3"># or if you prefer yarn</span><br/><span class="hl-1">yarn add essential-eth </span><span class="hl-3"># TypeScript types load automatically</span>
|
|
50
|
+
</code></pre>
|
|
51
|
+
<br/>
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
<a href="#utils-do-not-require-connecting-to-an-eth-node" id="utils-do-not-require-connecting-to-an-eth-node" style="color: inherit; text-decoration: none;">
|
|
55
|
+
<h2>Utils (do not require connecting to an Eth node)</h2>
|
|
56
|
+
</a>
|
|
57
|
+
<pre><code class="language-typescript"><span class="hl-5">import</span><span class="hl-1"> { etherToWei } </span><span class="hl-5">from</span><span class="hl-1"> </span><span class="hl-2">'essential-eth'</span><span class="hl-1">;</span><br/><br/><span class="hl-3">// or in a non-import environment</span><br/><span class="hl-5">const</span><span class="hl-1"> { </span><span class="hl-4">etherToWei</span><span class="hl-1"> } </span><span class="hl-5">=</span><span class="hl-1"> </span><span class="hl-4">require</span><span class="hl-1">(</span><span class="hl-2">'essential-eth'</span><span class="hl-1">);</span>
|
|
58
|
+
</code></pre>
|
|
59
|
+
<ul>
|
|
60
|
+
<li>The return-type <code>TinyBig</code> is just <a href="https://github.com/MikeMcl/big.js"><code>Big</code></a> but expands scientific notation on <code>toNumber()</code> and <code>toString()</code></li>
|
|
61
|
+
</ul>
|
|
62
|
+
|
|
63
|
+
<a href="#ethertowei" id="ethertowei" style="color: inherit; text-decoration: none;">
|
|
64
|
+
<h4><code>etherToWei</code></h4>
|
|
65
|
+
</a>
|
|
66
|
+
<pre><code class="language-typescript"><span class="hl-3">// convert ether to wei</span><br/><span class="hl-0">etherToWei</span><span class="hl-1">(etherQuantity: string </span><span class="hl-5">|</span><span class="hl-1"> number </span><span class="hl-5">|</span><span class="hl-1"> TinyBig </span><span class="hl-5">|</span><span class="hl-1"> Big): TinyBig</span>
|
|
67
|
+
</code></pre>
|
|
68
|
+
|
|
69
|
+
<a href="#weitoether" id="weitoether" style="color: inherit; text-decoration: none;">
|
|
70
|
+
<h4><code>weiToEther</code></h4>
|
|
71
|
+
</a>
|
|
72
|
+
<pre><code class="language-typescript"><span class="hl-3">// convert wei to ether</span><br/><span class="hl-0">weiToEther</span><span class="hl-1">(weiQuantity: string </span><span class="hl-5">|</span><span class="hl-1"> number </span><span class="hl-5">|</span><span class="hl-1"> TinyBig </span><span class="hl-5">|</span><span class="hl-1"> Big): TinyBig</span>
|
|
73
|
+
</code></pre>
|
|
74
|
+
|
|
75
|
+
<a href="#tochecksumaddress" id="tochecksumaddress" style="color: inherit; text-decoration: none;">
|
|
76
|
+
<h4><code>toChecksumAddress</code></h4>
|
|
77
|
+
</a>
|
|
78
|
+
<pre><code class="language-typescript"><span class="hl-3">// return proper mixed-case address</span><br/><span class="hl-3">// does not support ICAP addresses</span><br/><span class="hl-0">toChecksumAddress</span><span class="hl-1">(address: string): string</span>
|
|
79
|
+
</code></pre>
|
|
80
|
+
|
|
81
|
+
<a href="#isaddress" id="isaddress" style="color: inherit; text-decoration: none;">
|
|
82
|
+
<h4><code>isAddress</code></h4>
|
|
83
|
+
</a>
|
|
84
|
+
<pre><code class="language-typescript"><span class="hl-3">// returns boolean as to whether input is a valid address</span><br/><span class="hl-3">// does not support ENS nor ICAP</span><br/><span class="hl-0">isAddress</span><span class="hl-1">(address: string): boolean</span>
|
|
85
|
+
</code></pre>
|
|
86
|
+
<br/>
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
<a href="#rpc" id="rpc" style="color: inherit; text-decoration: none;">
|
|
90
|
+
<h2>RPC</h2>
|
|
91
|
+
</a>
|
|
92
|
+
<pre><code class="language-typescript"><span class="hl-5">import</span><span class="hl-1"> { JsonRpcProvider } </span><span class="hl-5">from</span><span class="hl-1"> </span><span class="hl-2">'essential-eth'</span><span class="hl-1">;</span><br/><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-4">essentialEth</span><span class="hl-1"> </span><span class="hl-5">=</span><span class="hl-1"> </span><span class="hl-5">new</span><span class="hl-1"> </span><span class="hl-0">JsonRpcProvider</span><span class="hl-1">(</span><br/><span class="hl-1"> </span><span class="hl-2">'RPC URL HERE'</span><span class="hl-1"> </span><span class="hl-3">/* Try POKT or Infura */</span><span class="hl-1">,</span><br/><span class="hl-1">);</span><br/><span class="hl-3">// OR for very quick testing (limited to 500 requests)</span><br/><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-4">essentialEth</span><span class="hl-1"> </span><span class="hl-5">=</span><span class="hl-1"> </span><span class="hl-5">new</span><span class="hl-1"> </span><span class="hl-0">JsonRpcProvider</span><span class="hl-1">();</span>
|
|
93
|
+
</code></pre>
|
|
94
|
+
|
|
95
|
+
<a href="#getblock" id="getblock" style="color: inherit; text-decoration: none;">
|
|
96
|
+
<h4><code>getBlock</code></h4>
|
|
97
|
+
</a>
|
|
98
|
+
<p>Returns a <a href="src/types/block.types.ts">Block</a></p>
|
|
99
|
+
<pre><code class="language-typescript"><span class="hl-3">// Same API as web3.eth.getBlock</span><br/><span class="hl-0">getBlock</span><span class="hl-1">(timeFrame: number </span><span class="hl-5">|</span><span class="hl-1"> </span><span class="hl-2">"latest"</span><span class="hl-1"> </span><span class="hl-5">|</span><span class="hl-1"> </span><span class="hl-2">"earliest"</span><span class="hl-1"> </span><span class="hl-5">|</span><span class="hl-1"> </span><span class="hl-2">"pending"</span><span class="hl-1">, returnTransactionObjects</span><span class="hl-5">?:</span><span class="hl-1"> boolean): </span><span class="hl-4">Promise</span><span class="hl-5"><</span><span class="hl-1">Block</span><span class="hl-5">></span>
|
|
100
|
+
</code></pre>
|
|
101
|
+
<details>
|
|
102
|
+
<summary>View Example</summary>
|
|
103
|
+
|
|
104
|
+
<pre><code class="language-typescript"><span class="hl-5">import</span><span class="hl-1"> { JsonRpcProvider } </span><span class="hl-5">from</span><span class="hl-1"> </span><span class="hl-2">'essential-eth'</span><span class="hl-1">;</span><br/><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-4">essentialEth</span><span class="hl-1"> </span><span class="hl-5">=</span><span class="hl-1"> </span><span class="hl-5">new</span><span class="hl-1"> </span><span class="hl-0">JsonRpcProvider</span><span class="hl-1">();</span><br/><span class="hl-1">essentialEth.</span><span class="hl-0">getBlock</span><span class="hl-1">(</span><span class="hl-2">'latest'</span><span class="hl-1">);</span><br/><br/><span class="hl-3">/*</span><br/><span class="hl-3">{</span><br/><span class="hl-3">"baseFeePerGas": "0xf639de71c",</span><br/><span class="hl-3">"extraData": "0x4b75436f696e506f6f6c201360d0ff24ef3c3c",</span><br/><span class="hl-3">"gasLimit": 30000000,</span><br/><span class="hl-3">"gasUsed": 1344062,</span><br/><span class="hl-3">"hash": "0xd61a202c828a67085a08a69c4b1e5e096781d7169eaccb47be26147a15145f38",</span><br/><span class="hl-3">"logsBloom": "0x00a001060000000000a00000800810010600000040100000000200000020000000c800000000000000004a8000000101020080100800200040400000102061080000048000000918c800400c0800406000000000004010000440120080200008820009000800000004001804000000000041802010000400008200900808a010110000416010201100900008010480050000100101400008040010420010200002101240000020800000008080000000406000880000003000200602100200000001000260000240240000800020100400200000000a0010001000020680000000102008080081400004000800000004000000212000c0500148089002000000",</span><br/><span class="hl-3">"miner": "0xd757fd54b273BB1234d4d9993f27699d28d0EDD2",</span><br/><span class="hl-3">"mixHash": "0x363138be56fd5304ca6f0ce56d24d6469f4a5a88c771da1ddf7e69fb23c7d599",</span><br/><span class="hl-3">"nonce": "0xdb88082877e8b003",</span><br/><span class="hl-3">"number": 13402040,</span><br/><span class="hl-3">"parentHash": "0xfb7ef17413a17f07791301897f406a05eb3e99acb495bf3bab146a30af5615eb",</span><br/><span class="hl-3">"receiptsRoot": "0xfc35fd7463baadc116202ef7a87ddba23a80bd277dd44a4bd3a2b2f48b469be8",</span><br/><span class="hl-3">"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",</span><br/><span class="hl-3">"size": 7672,</span><br/><span class="hl-3">"stateRoot": "0x8fef1cb4b33ce55f43e8d3e2d19a6db55a8311aead0a25b359eef4d6e8ab6870",</span><br/><span class="hl-3">"timestamp": 1634019741,</span><br/><span class="hl-3">"transactions": Array [</span><br/><span class="hl-3">"0x4b5ee005588efa1881d4bdd97c20fb1b311896bd150a62f0379256c12b4d3243",</span><br/><span class="hl-3">"0xe28945b5b7bb1963e765b117a88b2fd785ef751bb141fbdf03435994ebd22383",</span><br/><span class="hl-3">"0xb15b9d44303f0f7a10e5c27320421aa790e12af6bb4f300963da43d5c2ad3a3c",</span><br/><span class="hl-3">"0x67296bb97ab2accb35b9b73d2fb856f7f28081a469b8ff7e17a89799af9fb729",</span><br/><span class="hl-3">"0xe8530f6c51c4efe9e15bdcc90b5f879895e0f6682de543c92c5d3d09ec149bd7",</span><br/><span class="hl-3">"0xbbefd1fc51bac8e10998ccfa2601643a063c68c16cf4b6a91756936084849f36",</span><br/><span class="hl-3">"0x37c8ae4037b833936163b22c17f39f11169fbeb2cfc249830b0514411d2a2859",</span><br/><span class="hl-3">"0xe47b2ba6979470bc5aa6529fda7969e0758b3123a91b65d9da49b133f196eaa6",</span><br/><span class="hl-3">"0x738d2ca35f180a42af6407cb2b724b0c589168740a39e7e1719e30c644766a55",</span><br/><span class="hl-3">"0x60df73109fc534c3a2126df1a4ed4cb4946a188bb6d34a49025ec4e41d0ee601",</span><br/><span class="hl-3">"0xaf51a25e70321b5c8987acb3e4a2d5e9e8869f9bb74303984e56c37090dbd8ba",</span><br/><span class="hl-3">"0xb42bd613800595b21717ea55ea5c2390ffe0ba12297aae0811f6938fbd86c605",</span><br/><span class="hl-3">"0x628d637eae8f3bf4c3867fffadfb6c6f09228f0d037abc921d30cb4a7e28fa57",</span><br/><span class="hl-3">"0xf6f19b03636250610e9a724eff7b265cbeed737b0a018500ebbe91e3aaf9ebaf",</span><br/><span class="hl-3">"0x2376f3a78b63d482d4edcfd7903faeaee49e95b0fb12894f49e6c0ed6709d51a",</span><br/><span class="hl-3">"0xbbc5634af5882ec73d713f6a3c34a6ff6915c18ab445c9c6d5ff1fb185dcb2d2",</span><br/><span class="hl-3">"0x15349a7d15861d7f50310a392397a3c7c43a19d70c5543738943b6222460633a",</span><br/><span class="hl-3">"0x2a166ca1491a05decf2c107050877c62e194c3bdc95a72de79acb39271ebfea1",</span><br/><span class="hl-3">"0x55efd630c466b58e2051afb55f66f8f415c93c330c7e48e439f0667cf67407c1",</span><br/><span class="hl-3">"0xbd095088949d323b4ab7cbeeba2534693c14d2a9c25e923bf87cd5c1edfce00a",</span><br/><span class="hl-3">"0xeb4f9d928020962c6a13ac7de0fb09d0d5c0a0064060d11f2e8cebc6d60443f0",</span><br/><span class="hl-3">"0x482fb59cef1804ff20752c50b737ab44b4db942e7816d4ff38827109f79c5b6c",</span><br/><span class="hl-3">"0xf0d87f44454bf2f2d23c72c775ca9051848bf8fe4ce293c8d0a7160a5c7b366d",</span><br/><span class="hl-3">],</span><br/><span class="hl-3">"transactionsRoot": "0x7fd87cbada35409e8a235c7d087d8bb7af6cfa0c7985d825ca69851b4192879f",</span><br/><span class="hl-3">"uncles": Array [],</span><br/><span class="hl-3">*/</span>
|
|
105
|
+
</code></pre>
|
|
106
|
+
</details>
|
|
107
|
+
|
|
108
|
+
<br/>
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
<a href="#contract" id="contract" style="color: inherit; text-decoration: none;">
|
|
112
|
+
<h2>Contract</h2>
|
|
113
|
+
</a>
|
|
114
|
+
<p>⚠️ Only read functions are currently supported. ⚠️</p>
|
|
115
|
+
<ul>
|
|
116
|
+
<li>🧪 This is <strong>highly experimental</strong>, do not use this in production yet. (even though <a href="https://earni.fi">earni.fi</a> does)</li>
|
|
117
|
+
</ul>
|
|
118
|
+
<p>Encoding support:</p>
|
|
119
|
+
<ul>
|
|
120
|
+
<li><code>bool</code></li>
|
|
121
|
+
<li><code>bytes</code></li>
|
|
122
|
+
<li><code>address</code></li>
|
|
123
|
+
</ul>
|
|
124
|
+
<p>Decoding support:</p>
|
|
125
|
+
<ul>
|
|
126
|
+
<li><code>bool</code></li>
|
|
127
|
+
<li><code>address</code></li>
|
|
128
|
+
<li><code>uint256</code></li>
|
|
129
|
+
<li><code>bytes32</code></li>
|
|
130
|
+
<li><code>uint8</code></li>
|
|
131
|
+
</ul>
|
|
132
|
+
<p><em>Assume any smart-contract method outside the above types will break</em></p>
|
|
133
|
+
<pre><code class="language-typescript"><span class="hl-5">import</span><span class="hl-1"> { Contract, jsonRpcProvider, JSONABI } </span><span class="hl-5">from</span><span class="hl-1"> </span><span class="hl-2">'essential-eth'</span><span class="hl-1">;</span><br/><span class="hl-3">// UNI airdrop contract</span><br/><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-4">contractAddress</span><span class="hl-1"> </span><span class="hl-5">=</span><span class="hl-1"> </span><span class="hl-2">'0x090D4613473dEE047c3f2706764f49E0821D256e'</span><span class="hl-1">;</span><br/><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-4">provider</span><span class="hl-1"> </span><span class="hl-5">=</span><span class="hl-1"> </span><span class="hl-0">jsonRpcProvider</span><span class="hl-1">(</span><span class="hl-3">/* RPC URL optional */</span><span class="hl-1">);</span><br/><br/><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-4">abi</span><span class="hl-5">:</span><span class="hl-1"> </span><span class="hl-6">JSONABI</span><span class="hl-1"> </span><span class="hl-5">=</span><span class="hl-1"> [</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> inputs: [</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> internalType: </span><span class="hl-2">'uint256'</span><span class="hl-1">,</span><br/><span class="hl-1"> name: </span><span class="hl-2">'index'</span><span class="hl-1">,</span><br/><span class="hl-1"> type: </span><span class="hl-2">'uint256'</span><span class="hl-1">,</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> ],</span><br/><span class="hl-1"> name: </span><span class="hl-2">'isClaimed'</span><span class="hl-1">,</span><br/><span class="hl-1"> outputs: [</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> internalType: </span><span class="hl-2">'bool'</span><span class="hl-1">,</span><br/><span class="hl-1"> name: </span><span class="hl-2">''</span><span class="hl-1">,</span><br/><span class="hl-1"> type: </span><span class="hl-2">'bool'</span><span class="hl-1">,</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> ],</span><br/><span class="hl-1"> stateMutability: </span><span class="hl-2">'view'</span><span class="hl-1">,</span><br/><span class="hl-1"> type: </span><span class="hl-2">'function'</span><span class="hl-1">,</span><br/><span class="hl-1"> },</span><br/><span class="hl-1">];</span><br/><br/><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-4">contract</span><span class="hl-1"> </span><span class="hl-5">=</span><span class="hl-1"> </span><span class="hl-5">new</span><span class="hl-1"> </span><span class="hl-0">Contract</span><span class="hl-1">(contractAddress, abi, provider);</span><br/><br/><span class="hl-1">(</span><span class="hl-5">async</span><span class="hl-1"> () </span><span class="hl-5">=></span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">// prints boolean as to whether index 0 has claimed airdrop or not</span><br/><span class="hl-1"> console.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-5">await</span><span class="hl-1"> contract.</span><span class="hl-0">isClaimed</span><span class="hl-1">(</span><span class="hl-4">0</span><span class="hl-1">));</span><br/><span class="hl-1">})();</span>
|
|
134
|
+
</code></pre>
|
|
135
|
+
|
|
136
|
+
<a href="#contractfunctionnameargs" id="contractfunctionnameargs" style="color: inherit; text-decoration: none;">
|
|
137
|
+
<h4><code>contractFunctionName(args)</code></h4>
|
|
138
|
+
</a>
|
|
139
|
+
<p>Any function on a contract. Returns are the same as <code>ethers.js</code>, except that instead of BigNumber, <code>essential-eth</code> always returns a <a href="https://essential-eth.vercel.app/classes/TinyBig.html"><code>TinyBig</code></a></p>
|
|
140
|
+
<br/>
|
|
141
|
+
<br/>
|
|
142
|
+
|
|
143
|
+
<ul>
|
|
144
|
+
<li><a href="https://essential-eth.vercel.app">📓 View full docs</a></li>
|
|
145
|
+
<li><a href="https://github.com/dawsbot/essential-eth/releases">📓 View changelog (by looking at releases diff)</a></li>
|
|
146
|
+
<li><a href="https://essential-eth.vercel.app/versions">📓 View docs for an older version</a></li>
|
|
147
|
+
</ul>
|
|
148
|
+
</div></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class="current"><a href="modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="tsd-kind-class"><a href="classes/Contract.html" class="tsd-kind-icon">Contract</a></li><li class="tsd-kind-class"><a href="classes/JsonRpcProvider.html" class="tsd-kind-icon">Json<wbr/>Rpc<wbr/>Provider</a></li><li class="tsd-kind-class"><a href="classes/TinyBig.html" class="tsd-kind-icon">Tiny<wbr/>Big</a></li><li class="tsd-kind-interface"><a href="interfaces/Block.html" class="tsd-kind-icon">Block</a></li><li class="tsd-kind-interface"><a href="interfaces/Transaction.html" class="tsd-kind-icon">Transaction</a></li><li class="tsd-kind-type-alias"><a href="modules.html#ContractTypes" class="tsd-kind-icon">Contract<wbr/>Types</a></li><li class="tsd-kind-type-alias"><a href="modules.html#JSONABI" class="tsd-kind-icon">JSONABI</a></li><li class="tsd-kind-type-alias"><a href="modules.html#JSONABIArgument" class="tsd-kind-icon">JSONABIArgument</a></li><li class="tsd-kind-function"><a href="modules.html#etherToWei" class="tsd-kind-icon">ether<wbr/>To<wbr/>Wei</a></li><li class="tsd-kind-function"><a href="modules.html#isAddress" class="tsd-kind-icon">is<wbr/>Address</a></li><li class="tsd-kind-function"><a href="modules.html#jsonRpcProvider" class="tsd-kind-icon">json<wbr/>Rpc<wbr/>Provider</a></li><li class="tsd-kind-function"><a href="modules.html#tinyBig" class="tsd-kind-icon">tiny<wbr/>Big</a></li><li class="tsd-kind-function"><a href="modules.html#toChecksumAddress" class="tsd-kind-icon">to<wbr/>Checksum<wbr/>Address</a></li><li class="tsd-kind-function"><a href="modules.html#weiToEther" class="tsd-kind-icon">wei<wbr/>To<wbr/>Ether</a></li></ul></nav></div></div></div><footer class=""><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="overlay"></div><script src="assets/main.js"></script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default no-js"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Block | essential-eth - v0.4.1</title><meta name="description" content="Documentation for essential-eth - v0.4.1"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">essential-eth - v0.4.1</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">essential-eth - v0.4.1</a></li><li><a href="Block.html">Block</a></li></ul><h1>Interface Block</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">Block</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#baseFeePerGas" class="tsd-kind-icon">base<wbr/>Fee<wbr/>Per<wbr/>Gas</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#difficulty" class="tsd-kind-icon">difficulty</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#extraData" class="tsd-kind-icon">extra<wbr/>Data</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#gasLimit" class="tsd-kind-icon">gas<wbr/>Limit</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#gasUsed" class="tsd-kind-icon">gas<wbr/>Used</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#hash" class="tsd-kind-icon">hash</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#logsBloom" class="tsd-kind-icon">logs<wbr/>Bloom</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#miner" class="tsd-kind-icon">miner</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#mixHash" class="tsd-kind-icon">mix<wbr/>Hash</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#nonce" class="tsd-kind-icon">nonce</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#number" class="tsd-kind-icon">number</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#parentHash" class="tsd-kind-icon">parent<wbr/>Hash</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#receiptsRoot" class="tsd-kind-icon">receipts<wbr/>Root</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#sha3Uncles" class="tsd-kind-icon">sha3<wbr/>Uncles</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#size" class="tsd-kind-icon">size</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#stateRoot" class="tsd-kind-icon">state<wbr/>Root</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#timestamp" class="tsd-kind-icon">timestamp</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#totalDifficulty" class="tsd-kind-icon">total<wbr/>Difficulty</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#transactions" class="tsd-kind-icon">transactions</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#transactionsRoot" class="tsd-kind-icon">transactions<wbr/>Root</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#uncles" class="tsd-kind-icon">uncles</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="baseFeePerGas" class="tsd-anchor"></a><h3>base<wbr/>Fee<wbr/>Per<wbr/>Gas</h3><div class="tsd-signature tsd-kind-icon">base<wbr/>Fee<wbr/>Per<wbr/>Gas<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/block.types.ts#L4">src/types/block.types.ts:4</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="difficulty" class="tsd-anchor"></a><h3>difficulty</h3><div class="tsd-signature tsd-kind-icon">difficulty<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/block.types.ts#L5">src/types/block.types.ts:5</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="extraData" class="tsd-anchor"></a><h3>extra<wbr/>Data</h3><div class="tsd-signature tsd-kind-icon">extra<wbr/>Data<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/block.types.ts#L6">src/types/block.types.ts:6</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="gasLimit" class="tsd-anchor"></a><h3>gas<wbr/>Limit</h3><div class="tsd-signature tsd-kind-icon">gas<wbr/>Limit<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/block.types.ts#L7">src/types/block.types.ts:7</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="gasUsed" class="tsd-anchor"></a><h3>gas<wbr/>Used</h3><div class="tsd-signature tsd-kind-icon">gas<wbr/>Used<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/block.types.ts#L8">src/types/block.types.ts:8</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="hash" class="tsd-anchor"></a><h3>hash</h3><div class="tsd-signature tsd-kind-icon">hash<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/block.types.ts#L9">src/types/block.types.ts:9</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="logsBloom" class="tsd-anchor"></a><h3>logs<wbr/>Bloom</h3><div class="tsd-signature tsd-kind-icon">logs<wbr/>Bloom<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/block.types.ts#L10">src/types/block.types.ts:10</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="miner" class="tsd-anchor"></a><h3>miner</h3><div class="tsd-signature tsd-kind-icon">miner<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/block.types.ts#L11">src/types/block.types.ts:11</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="mixHash" class="tsd-anchor"></a><h3>mix<wbr/>Hash</h3><div class="tsd-signature tsd-kind-icon">mix<wbr/>Hash<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/block.types.ts#L12">src/types/block.types.ts:12</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="nonce" class="tsd-anchor"></a><h3>nonce</h3><div class="tsd-signature tsd-kind-icon">nonce<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/block.types.ts#L13">src/types/block.types.ts:13</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="number" class="tsd-anchor"></a><h3>number</h3><div class="tsd-signature tsd-kind-icon">number<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/block.types.ts#L14">src/types/block.types.ts:14</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="parentHash" class="tsd-anchor"></a><h3>parent<wbr/>Hash</h3><div class="tsd-signature tsd-kind-icon">parent<wbr/>Hash<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/block.types.ts#L15">src/types/block.types.ts:15</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="receiptsRoot" class="tsd-anchor"></a><h3>receipts<wbr/>Root</h3><div class="tsd-signature tsd-kind-icon">receipts<wbr/>Root<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/block.types.ts#L16">src/types/block.types.ts:16</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="sha3Uncles" class="tsd-anchor"></a><h3>sha3<wbr/>Uncles</h3><div class="tsd-signature tsd-kind-icon">sha3<wbr/>Uncles<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/block.types.ts#L17">src/types/block.types.ts:17</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="size" class="tsd-anchor"></a><h3>size</h3><div class="tsd-signature tsd-kind-icon">size<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/block.types.ts#L18">src/types/block.types.ts:18</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="stateRoot" class="tsd-anchor"></a><h3>state<wbr/>Root</h3><div class="tsd-signature tsd-kind-icon">state<wbr/>Root<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/block.types.ts#L19">src/types/block.types.ts:19</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="timestamp" class="tsd-anchor"></a><h3>timestamp</h3><div class="tsd-signature tsd-kind-icon">timestamp<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/block.types.ts#L20">src/types/block.types.ts:20</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="totalDifficulty" class="tsd-anchor"></a><h3>total<wbr/>Difficulty</h3><div class="tsd-signature tsd-kind-icon">total<wbr/>Difficulty<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/block.types.ts#L21">src/types/block.types.ts:21</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="transactions" class="tsd-anchor"></a><h3>transactions</h3><div class="tsd-signature tsd-kind-icon">transactions<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> | </span><a href="Transaction.html" class="tsd-signature-type" data-tsd-kind="Interface">Transaction</a><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/block.types.ts#L22">src/types/block.types.ts:22</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="transactionsRoot" class="tsd-anchor"></a><h3>transactions<wbr/>Root</h3><div class="tsd-signature tsd-kind-icon">transactions<wbr/>Root<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/block.types.ts#L23">src/types/block.types.ts:23</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="uncles" class="tsd-anchor"></a><h3>uncles</h3><div class="tsd-signature tsd-kind-icon">uncles<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/block.types.ts#L24">src/types/block.types.ts:24</a></li></ul></aside></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="Block.html" class="tsd-kind-icon">Block</a><ul><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#baseFeePerGas" class="tsd-kind-icon">base<wbr/>Fee<wbr/>Per<wbr/>Gas</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#difficulty" class="tsd-kind-icon">difficulty</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#extraData" class="tsd-kind-icon">extra<wbr/>Data</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#gasLimit" class="tsd-kind-icon">gas<wbr/>Limit</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#gasUsed" class="tsd-kind-icon">gas<wbr/>Used</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#hash" class="tsd-kind-icon">hash</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#logsBloom" class="tsd-kind-icon">logs<wbr/>Bloom</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#miner" class="tsd-kind-icon">miner</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#mixHash" class="tsd-kind-icon">mix<wbr/>Hash</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#nonce" class="tsd-kind-icon">nonce</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#number" class="tsd-kind-icon">number</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#parentHash" class="tsd-kind-icon">parent<wbr/>Hash</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#receiptsRoot" class="tsd-kind-icon">receipts<wbr/>Root</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#sha3Uncles" class="tsd-kind-icon">sha3<wbr/>Uncles</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#size" class="tsd-kind-icon">size</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#stateRoot" class="tsd-kind-icon">state<wbr/>Root</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#timestamp" class="tsd-kind-icon">timestamp</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#totalDifficulty" class="tsd-kind-icon">total<wbr/>Difficulty</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#transactions" class="tsd-kind-icon">transactions</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#transactionsRoot" class="tsd-kind-icon">transactions<wbr/>Root</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Block.html#uncles" class="tsd-kind-icon">uncles</a></li></ul></li></ul></nav></div></div></div><footer class=""><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default no-js"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Transaction | essential-eth - v0.4.1</title><meta name="description" content="Documentation for essential-eth - v0.4.1"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">essential-eth - v0.4.1</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">essential-eth - v0.4.1</a></li><li><a href="Transaction.html">Transaction</a></li></ul><h1>Interface Transaction</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">Transaction</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#blockHash" class="tsd-kind-icon">block<wbr/>Hash</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#blockNumber" class="tsd-kind-icon">block<wbr/>Number</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#from" class="tsd-kind-icon">from</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#gas" class="tsd-kind-icon">gas</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#gasPrice" class="tsd-kind-icon">gas<wbr/>Price</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#hash" class="tsd-kind-icon">hash</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#input" class="tsd-kind-icon">input</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#nonce" class="tsd-kind-icon">nonce</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#r" class="tsd-kind-icon">r</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#s" class="tsd-kind-icon">s</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#to" class="tsd-kind-icon">to</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#transactionIndex" class="tsd-kind-icon">transaction<wbr/>Index</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#type" class="tsd-kind-icon">type</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#v" class="tsd-kind-icon">v</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#value" class="tsd-kind-icon">value</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="blockHash" class="tsd-anchor"></a><h3>block<wbr/>Hash</h3><div class="tsd-signature tsd-kind-icon">block<wbr/>Hash<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/transaction.types.ts#L2">src/types/transaction.types.ts:2</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="blockNumber" class="tsd-anchor"></a><h3>block<wbr/>Number</h3><div class="tsd-signature tsd-kind-icon">block<wbr/>Number<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/transaction.types.ts#L3">src/types/transaction.types.ts:3</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="from" class="tsd-anchor"></a><h3>from</h3><div class="tsd-signature tsd-kind-icon">from<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/transaction.types.ts#L4">src/types/transaction.types.ts:4</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="gas" class="tsd-anchor"></a><h3>gas</h3><div class="tsd-signature tsd-kind-icon">gas<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/transaction.types.ts#L5">src/types/transaction.types.ts:5</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="gasPrice" class="tsd-anchor"></a><h3>gas<wbr/>Price</h3><div class="tsd-signature tsd-kind-icon">gas<wbr/>Price<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/transaction.types.ts#L6">src/types/transaction.types.ts:6</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="hash" class="tsd-anchor"></a><h3>hash</h3><div class="tsd-signature tsd-kind-icon">hash<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/transaction.types.ts#L7">src/types/transaction.types.ts:7</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="input" class="tsd-anchor"></a><h3>input</h3><div class="tsd-signature tsd-kind-icon">input<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/transaction.types.ts#L8">src/types/transaction.types.ts:8</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="nonce" class="tsd-anchor"></a><h3>nonce</h3><div class="tsd-signature tsd-kind-icon">nonce<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/transaction.types.ts#L9">src/types/transaction.types.ts:9</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="r" class="tsd-anchor"></a><h3>r</h3><div class="tsd-signature tsd-kind-icon">r<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/transaction.types.ts#L10">src/types/transaction.types.ts:10</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="s" class="tsd-anchor"></a><h3>s</h3><div class="tsd-signature tsd-kind-icon">s<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/transaction.types.ts#L11">src/types/transaction.types.ts:11</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="to" class="tsd-anchor"></a><h3>to</h3><div class="tsd-signature tsd-kind-icon">to<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/transaction.types.ts#L12">src/types/transaction.types.ts:12</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="transactionIndex" class="tsd-anchor"></a><h3>transaction<wbr/>Index</h3><div class="tsd-signature tsd-kind-icon">transaction<wbr/>Index<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/transaction.types.ts#L13">src/types/transaction.types.ts:13</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="type" class="tsd-anchor"></a><h3>type</h3><div class="tsd-signature tsd-kind-icon">type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/transaction.types.ts#L14">src/types/transaction.types.ts:14</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="v" class="tsd-anchor"></a><h3>v</h3><div class="tsd-signature tsd-kind-icon">v<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/transaction.types.ts#L15">src/types/transaction.types.ts:15</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="value" class="tsd-anchor"></a><h3>value</h3><div class="tsd-signature tsd-kind-icon">value<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/transaction.types.ts#L16">src/types/transaction.types.ts:16</a></li></ul></aside></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="Transaction.html" class="tsd-kind-icon">Transaction</a><ul><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#blockHash" class="tsd-kind-icon">block<wbr/>Hash</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#blockNumber" class="tsd-kind-icon">block<wbr/>Number</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#from" class="tsd-kind-icon">from</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#gas" class="tsd-kind-icon">gas</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#gasPrice" class="tsd-kind-icon">gas<wbr/>Price</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#hash" class="tsd-kind-icon">hash</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#input" class="tsd-kind-icon">input</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#nonce" class="tsd-kind-icon">nonce</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#r" class="tsd-kind-icon">r</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#s" class="tsd-kind-icon">s</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#to" class="tsd-kind-icon">to</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#transactionIndex" class="tsd-kind-icon">transaction<wbr/>Index</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#type" class="tsd-kind-icon">type</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#v" class="tsd-kind-icon">v</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Transaction.html#value" class="tsd-kind-icon">value</a></li></ul></li></ul></nav></div></div></div><footer class=""><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default no-js"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>essential-eth - v0.4.1</title><meta name="description" content="Documentation for essential-eth - v0.4.1"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script async src="assets/search.js" id="search-script"></script></head><body><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base="."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">essential-eth - v0.4.1</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><h1>essential-eth - v0.4.1</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Classes</h3><ul class="tsd-index-list"><li class="tsd-kind-class"><a href="classes/Contract.html" class="tsd-kind-icon">Contract</a></li><li class="tsd-kind-class"><a href="classes/JsonRpcProvider.html" class="tsd-kind-icon">Json<wbr/>Rpc<wbr/>Provider</a></li><li class="tsd-kind-class"><a href="classes/TinyBig.html" class="tsd-kind-icon">Tiny<wbr/>Big</a></li></ul></section><section class="tsd-index-section "><h3>Interfaces</h3><ul class="tsd-index-list"><li class="tsd-kind-interface"><a href="interfaces/Block.html" class="tsd-kind-icon">Block</a></li><li class="tsd-kind-interface"><a href="interfaces/Transaction.html" class="tsd-kind-icon">Transaction</a></li></ul></section><section class="tsd-index-section "><h3>Type aliases</h3><ul class="tsd-index-list"><li class="tsd-kind-type-alias"><a href="modules.html#ContractTypes" class="tsd-kind-icon">Contract<wbr/>Types</a></li><li class="tsd-kind-type-alias"><a href="modules.html#JSONABI" class="tsd-kind-icon">JSONABI</a></li><li class="tsd-kind-type-alias"><a href="modules.html#JSONABIArgument" class="tsd-kind-icon">JSONABIArgument</a></li></ul></section><section class="tsd-index-section "><h3>Functions</h3><ul class="tsd-index-list"><li class="tsd-kind-function"><a href="modules.html#etherToWei" class="tsd-kind-icon">ether<wbr/>To<wbr/>Wei</a></li><li class="tsd-kind-function"><a href="modules.html#isAddress" class="tsd-kind-icon">is<wbr/>Address</a></li><li class="tsd-kind-function"><a href="modules.html#jsonRpcProvider" class="tsd-kind-icon">json<wbr/>Rpc<wbr/>Provider</a></li><li class="tsd-kind-function"><a href="modules.html#tinyBig" class="tsd-kind-icon">tiny<wbr/>Big</a></li><li class="tsd-kind-function"><a href="modules.html#toChecksumAddress" class="tsd-kind-icon">to<wbr/>Checksum<wbr/>Address</a></li><li class="tsd-kind-function"><a href="modules.html#weiToEther" class="tsd-kind-icon">wei<wbr/>To<wbr/>Ether</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Type aliases</h2><section class="tsd-panel tsd-member tsd-kind-type-alias"><a name="ContractTypes" class="tsd-anchor"></a><h3>Contract<wbr/>Types</h3><div class="tsd-signature tsd-kind-icon">Contract<wbr/>Types<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"bool"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes1"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes2"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes3"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes4"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes5"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes6"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes7"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes8"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes9"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes10"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes11"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes12"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes13"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes14"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes15"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes16"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes17"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes18"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes19"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes20"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes21"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes22"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes23"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes24"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes25"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes26"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes27"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes28"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes29"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes30"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes31"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes32"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bytes32[]"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"address"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"address payable"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"address[4]"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"address[100]"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"uint256"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"uint256[100]"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"uint8"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"uint32"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/Contract.types.ts#L1">src/types/Contract.types.ts:1</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-type-alias"><a name="JSONABI" class="tsd-anchor"></a><h3>JSONABI</h3><div class="tsd-signature tsd-kind-icon">JSONABI<span class="tsd-signature-symbol">:</span> <a href="modules.html#JSONABIArgument" class="tsd-signature-type" data-tsd-kind="Type alias">JSONABIArgument</a><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/Contract.types.ts#L65">src/types/Contract.types.ts:65</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-type-alias"><a name="JSONABIArgument" class="tsd-anchor"></a><h3>JSONABIArgument</h3><div class="tsd-signature tsd-kind-icon">JSONABIArgument<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>anonymous<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">false</span><span class="tsd-signature-symbol">; </span>gas<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>inputs<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>indexed<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span>internalType<span class="tsd-signature-symbol">?: </span><a href="modules.html#ContractTypes" class="tsd-signature-type" data-tsd-kind="Type alias">ContractTypes</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>type<span class="tsd-signature-symbol">: </span><a href="modules.html#ContractTypes" class="tsd-signature-type" data-tsd-kind="Type alias">ContractTypes</a><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">; </span>name<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>outputs<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">{ </span>internalType<span class="tsd-signature-symbol">?: </span><a href="modules.html#ContractTypes" class="tsd-signature-type" data-tsd-kind="Type alias">ContractTypes</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>type<span class="tsd-signature-symbol">: </span><a href="modules.html#ContractTypes" class="tsd-signature-type" data-tsd-kind="Type alias">ContractTypes</a><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">; </span>stateMutability<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">"view"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"nonpayable"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"function"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"event"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"constructor"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"error"</span><span class="tsd-signature-symbol"> }</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/types/Contract.types.ts#L47">src/types/Contract.types.ts:47</a></li></ul></aside><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-flag ts-flagOptional">Optional</span> anonymous<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">false</span></h5></li><li class="tsd-parameter"><h5><span class="tsd-flag ts-flagOptional">Optional</span> gas<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span></h5></li><li class="tsd-parameter"><h5>inputs<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>indexed<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span>internalType<span class="tsd-signature-symbol">?: </span><a href="modules.html#ContractTypes" class="tsd-signature-type" data-tsd-kind="Type alias">ContractTypes</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>type<span class="tsd-signature-symbol">: </span><a href="modules.html#ContractTypes" class="tsd-signature-type" data-tsd-kind="Type alias">ContractTypes</a><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">[]</span></h5></li><li class="tsd-parameter"><h5><span class="tsd-flag ts-flagOptional">Optional</span> name<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5></li><li class="tsd-parameter"><h5><span class="tsd-flag ts-flagOptional">Optional</span> outputs<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">{ </span>internalType<span class="tsd-signature-symbol">?: </span><a href="modules.html#ContractTypes" class="tsd-signature-type" data-tsd-kind="Type alias">ContractTypes</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>type<span class="tsd-signature-symbol">: </span><a href="modules.html#ContractTypes" class="tsd-signature-type" data-tsd-kind="Type alias">ContractTypes</a><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">[]</span></h5></li><li class="tsd-parameter"><h5><span class="tsd-flag ts-flagOptional">Optional</span> state<wbr/>Mutability<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">"view"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"nonpayable"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></h5></li><li class="tsd-parameter"><h5>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"function"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"event"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"constructor"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"error"</span></h5></li></ul></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Functions</h2><section class="tsd-panel tsd-member tsd-kind-function"><a name="etherToWei" class="tsd-anchor"></a><h3>ether<wbr/>To<wbr/>Wei</h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">ether<wbr/>To<wbr/>Wei<span class="tsd-signature-symbol">(</span>etherQuantity<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><a href="classes/TinyBig.html" class="tsd-signature-type" data-tsd-kind="Class">TinyBig</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Big</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="classes/TinyBig.html" class="tsd-signature-type" data-tsd-kind="Class">TinyBig</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/utils/ether-to-wei.ts#L26">src/utils/ether-to-wei.ts:26</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
2
|
+
<p>Similar to <a href="https://docs.ethers.io/v4/api-utils.html#ether-strings-and-wei">"parseEther" in ethers.js</a></p>
|
|
3
|
+
</div><div><p>Similar to <a href="https://web3js.readthedocs.io/en/v1.2.11/web3-utils.html?highlight=towei#towei">"toWei" in web3</a></p>
|
|
4
|
+
</div><dl class="tsd-comment-tags"><dt>example</dt><dd><pre><code class="language-javascript"><span class="hl-0">etherToWei</span><span class="hl-1">(</span><span class="hl-2">'1000'</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">()</span><br/><span class="hl-3">// '1000000000000000000000'</span><br/><span class="hl-0">etherToWei</span><span class="hl-1">(</span><span class="hl-4">1000</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">()</span><br/><span class="hl-3">// '1000000000000000000000'</span>
|
|
5
|
+
</code></pre>
|
|
6
|
+
</dd><dt>example</dt><dd><pre><code class="language-javascript"><span class="hl-0">etherToWei</span><span class="hl-1">(</span><span class="hl-2">'1000'</span><span class="hl-1">).</span><span class="hl-0">toNumber</span><span class="hl-1">()</span><br/><span class="hl-3">// 1000000000000000000000</span><br/><span class="hl-0">etherToWei</span><span class="hl-1">(</span><span class="hl-4">1000</span><span class="hl-1">).</span><span class="hl-0">toNumber</span><span class="hl-1">()</span><br/><span class="hl-3">// 1000000000000000000000</span>
|
|
7
|
+
</code></pre>
|
|
8
|
+
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>etherQuantity: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><a href="classes/TinyBig.html" class="tsd-signature-type" data-tsd-kind="Class">TinyBig</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Big</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="classes/TinyBig.html" class="tsd-signature-type" data-tsd-kind="Class">TinyBig</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function"><a name="isAddress" class="tsd-anchor"></a><h3>is<wbr/>Address</h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">is<wbr/>Address<span class="tsd-signature-symbol">(</span>address<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/utils/is-address.ts#L8">src/utils/is-address.ts:8</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
9
|
+
<p>Returns a boolean as to whether the input is a valid address.
|
|
10
|
+
Does NOT support ICAP addresses</p>
|
|
11
|
+
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>address: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function"><a name="jsonRpcProvider" class="tsd-anchor"></a><h3>json<wbr/>Rpc<wbr/>Provider</h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">json<wbr/>Rpc<wbr/>Provider<span class="tsd-signature-symbol">(</span>rpcUrl<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="classes/JsonRpcProvider.html" class="tsd-signature-type" data-tsd-kind="Class">JsonRpcProvider</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/providers/JsonRpcProvider.ts#L48">src/providers/JsonRpcProvider.ts:48</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
12
|
+
<p>Helper function to avoid "new"</p>
|
|
13
|
+
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> rpcUrl: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="classes/JsonRpcProvider.html" class="tsd-signature-type" data-tsd-kind="Class">JsonRpcProvider</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function"><a name="tinyBig" class="tsd-anchor"></a><h3>tiny<wbr/>Big</h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">tiny<wbr/>Big<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><a href="classes/TinyBig.html" class="tsd-signature-type" data-tsd-kind="Class">TinyBig</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="classes/TinyBig.html" class="tsd-signature-type" data-tsd-kind="Class">TinyBig</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/shared/tiny-big/tiny-big.ts#L27">src/shared/tiny-big/tiny-big.ts:27</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
14
|
+
<p>Helper factory function so that you don't have to type "new" when instantiating a new TinyBig</p>
|
|
15
|
+
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><a href="classes/TinyBig.html" class="tsd-signature-type" data-tsd-kind="Class">TinyBig</a></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="classes/TinyBig.html" class="tsd-signature-type" data-tsd-kind="Class">TinyBig</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function"><a name="toChecksumAddress" class="tsd-anchor"></a><h3>to<wbr/>Checksum<wbr/>Address</h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">to<wbr/>Checksum<wbr/>Address<span class="tsd-signature-symbol">(</span>address<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/utils/to-checksum-address.ts#L20">src/utils/to-checksum-address.ts:20</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
16
|
+
<p>Returns an Ethereum address in proper mixed-case checksum.
|
|
17
|
+
Does NOT support ICAP</p>
|
|
18
|
+
</div><dl class="tsd-comment-tags"><dt>example</dt><dd><pre><code class="language-javascript"><span class="hl-0">toChecksumAddress</span><span class="hl-1">(</span><span class="hl-2">'0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359'</span><span class="hl-1">);</span><br/><span class="hl-3">// '0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359'</span>
|
|
19
|
+
</code></pre>
|
|
20
|
+
<p>Similar to <a href="https://docs.ethers.io/v4/api-utils.html#utils-getaddress">"getAddress" in ethers.js</a></p>
|
|
21
|
+
<p>Similar to <a href="https://web3js.readthedocs.io/en/v1.2.11/web3-utils.html#tochecksumaddress">"toChecksumAddress" in web3</a></p>
|
|
22
|
+
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>address: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
23
|
+
<p>An Ethereum address. Mixed, lower, and uppercase are all valid</p>
|
|
24
|
+
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function"><a name="weiToEther" class="tsd-anchor"></a><h3>wei<wbr/>To<wbr/>Ether</h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">wei<wbr/>To<wbr/>Ether<span class="tsd-signature-symbol">(</span>weiQuantity<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><a href="classes/TinyBig.html" class="tsd-signature-type" data-tsd-kind="Class">TinyBig</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Big</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="classes/TinyBig.html" class="tsd-signature-type" data-tsd-kind="Class">TinyBig</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dawsbot/essential-eth/blob/8022b89/src/utils/wei-to-ether.ts#L29">src/utils/wei-to-ether.ts:29</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
25
|
+
<p>Convert from Ether to Wei</p>
|
|
26
|
+
</div><div><p>Similar to <a href="https://docs.ethers.io/v4/api-utils.html#ether-strings-and-wei">"formatEther" in ethers.js</a></p>
|
|
27
|
+
<p>Similar to <a href="https://web3js.readthedocs.io/en/v1.2.11/web3-utils.html#fromwei">"fromWei" in web3</a></p>
|
|
28
|
+
</div><dl class="tsd-comment-tags"><dt>example</dt><dd><pre><code class="language-javascript"><span class="hl-0">etherToWei</span><span class="hl-1">(</span><span class="hl-2">'1000'</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">()</span><br/><span class="hl-3">// '1000000000000000000000'</span><br/><span class="hl-0">etherToWei</span><span class="hl-1">(</span><span class="hl-4">1000</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">()</span><br/><span class="hl-2">'1000000000000000000000'</span>
|
|
29
|
+
</code></pre>
|
|
30
|
+
</dd><dt>example</dt><dd><pre><code class="language-javascript"><span class="hl-0">etherToWei</span><span class="hl-1">(</span><span class="hl-2">'1000'</span><span class="hl-1">).</span><span class="hl-0">toNumber</span><span class="hl-1">()</span><br/><span class="hl-3">// 1000000000000000000000</span><br/><span class="hl-0">etherToWei</span><span class="hl-1">(</span><span class="hl-4">1000</span><span class="hl-1">).</span><span class="hl-0">toNumber</span><span class="hl-1">()</span><br/><span class="hl-3">// 1000000000000000000000</span>
|
|
31
|
+
</code></pre>
|
|
32
|
+
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>weiQuantity: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><a href="classes/TinyBig.html" class="tsd-signature-type" data-tsd-kind="Class">TinyBig</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Big</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="classes/TinyBig.html" class="tsd-signature-type" data-tsd-kind="Class">TinyBig</a></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class="current"><a href="modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="tsd-kind-class"><a href="classes/Contract.html" class="tsd-kind-icon">Contract</a></li><li class="tsd-kind-class"><a href="classes/JsonRpcProvider.html" class="tsd-kind-icon">Json<wbr/>Rpc<wbr/>Provider</a></li><li class="tsd-kind-class"><a href="classes/TinyBig.html" class="tsd-kind-icon">Tiny<wbr/>Big</a></li><li class="tsd-kind-interface"><a href="interfaces/Block.html" class="tsd-kind-icon">Block</a></li><li class="tsd-kind-interface"><a href="interfaces/Transaction.html" class="tsd-kind-icon">Transaction</a></li><li class="tsd-kind-type-alias"><a href="modules.html#ContractTypes" class="tsd-kind-icon">Contract<wbr/>Types</a></li><li class="tsd-kind-type-alias"><a href="modules.html#JSONABI" class="tsd-kind-icon">JSONABI</a></li><li class="tsd-kind-type-alias"><a href="modules.html#JSONABIArgument" class="tsd-kind-icon">JSONABIArgument</a></li><li class="tsd-kind-function"><a href="modules.html#etherToWei" class="tsd-kind-icon">ether<wbr/>To<wbr/>Wei</a></li><li class="tsd-kind-function"><a href="modules.html#isAddress" class="tsd-kind-icon">is<wbr/>Address</a></li><li class="tsd-kind-function"><a href="modules.html#jsonRpcProvider" class="tsd-kind-icon">json<wbr/>Rpc<wbr/>Provider</a></li><li class="tsd-kind-function"><a href="modules.html#tinyBig" class="tsd-kind-icon">tiny<wbr/>Big</a></li><li class="tsd-kind-function"><a href="modules.html#toChecksumAddress" class="tsd-kind-icon">to<wbr/>Checksum<wbr/>Address</a></li><li class="tsd-kind-function"><a href="modules.html#weiToEther" class="tsd-kind-icon">wei<wbr/>To<wbr/>Ether</a></li></ul></nav></div></div></div><footer class=""><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="overlay"></div><script src="assets/main.js"></script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--light-hl-0: #6F42C1;
|
|
3
|
+
--dark-hl-0: #D2A8FF;
|
|
4
|
+
--light-hl-1: #24292E;
|
|
5
|
+
--dark-hl-1: #C9D1D9;
|
|
6
|
+
--light-hl-2: #032F62;
|
|
7
|
+
--dark-hl-2: #A5D6FF;
|
|
8
|
+
--light-hl-3: #6A737D;
|
|
9
|
+
--dark-hl-3: #8B949E;
|
|
10
|
+
--light-hl-4: #005CC5;
|
|
11
|
+
--dark-hl-4: #79C0FF;
|
|
12
|
+
--light-hl-5: #D73A49;
|
|
13
|
+
--dark-hl-5: #FF7B72;
|
|
14
|
+
--light-hl-6: #E36209;
|
|
15
|
+
--dark-hl-6: #FFA657;
|
|
16
|
+
--light-code-background: #ffffff;
|
|
17
|
+
--dark-code-background: #0d1117;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@media (prefers-color-scheme: light) { :root {
|
|
21
|
+
--hl-0: var(--light-hl-0);
|
|
22
|
+
--hl-1: var(--light-hl-1);
|
|
23
|
+
--hl-2: var(--light-hl-2);
|
|
24
|
+
--hl-3: var(--light-hl-3);
|
|
25
|
+
--hl-4: var(--light-hl-4);
|
|
26
|
+
--hl-5: var(--light-hl-5);
|
|
27
|
+
--hl-6: var(--light-hl-6);
|
|
28
|
+
--code-background: var(--light-code-background);
|
|
29
|
+
} }
|
|
30
|
+
|
|
31
|
+
@media (prefers-color-scheme: dark) { :root {
|
|
32
|
+
--hl-0: var(--dark-hl-0);
|
|
33
|
+
--hl-1: var(--dark-hl-1);
|
|
34
|
+
--hl-2: var(--dark-hl-2);
|
|
35
|
+
--hl-3: var(--dark-hl-3);
|
|
36
|
+
--hl-4: var(--dark-hl-4);
|
|
37
|
+
--hl-5: var(--dark-hl-5);
|
|
38
|
+
--hl-6: var(--dark-hl-6);
|
|
39
|
+
--code-background: var(--dark-code-background);
|
|
40
|
+
} }
|
|
41
|
+
|
|
42
|
+
body.light {
|
|
43
|
+
--hl-0: var(--light-hl-0);
|
|
44
|
+
--hl-1: var(--light-hl-1);
|
|
45
|
+
--hl-2: var(--light-hl-2);
|
|
46
|
+
--hl-3: var(--light-hl-3);
|
|
47
|
+
--hl-4: var(--light-hl-4);
|
|
48
|
+
--hl-5: var(--light-hl-5);
|
|
49
|
+
--hl-6: var(--light-hl-6);
|
|
50
|
+
--code-background: var(--light-code-background);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
body.dark {
|
|
54
|
+
--hl-0: var(--dark-hl-0);
|
|
55
|
+
--hl-1: var(--dark-hl-1);
|
|
56
|
+
--hl-2: var(--dark-hl-2);
|
|
57
|
+
--hl-3: var(--dark-hl-3);
|
|
58
|
+
--hl-4: var(--dark-hl-4);
|
|
59
|
+
--hl-5: var(--dark-hl-5);
|
|
60
|
+
--hl-6: var(--dark-hl-6);
|
|
61
|
+
--code-background: var(--dark-code-background);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.hl-0 { color: var(--hl-0); }
|
|
65
|
+
.hl-1 { color: var(--hl-1); }
|
|
66
|
+
.hl-2 { color: var(--hl-2); }
|
|
67
|
+
.hl-3 { color: var(--hl-3); }
|
|
68
|
+
.hl-4 { color: var(--hl-4); }
|
|
69
|
+
.hl-5 { color: var(--hl-5); }
|
|
70
|
+
.hl-6 { color: var(--hl-6); }
|
|
71
|
+
pre, code { background: var(--code-background); }
|