eteres 0.0.1-security → 6.7.1
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.
Potentially problematic release.
This version of eteres might be problematic. Click here for more details.
- package/CHANGELOG.md +247 -0
- package/LICENSE.md +21 -0
- package/README.md +137 -5
- package/SECURITY.md +34 -0
- package/dist/README.md +22 -0
- package/dist/ethers.js +23758 -0
- package/dist/ethers.js.map +1 -0
- package/dist/ethers.min.js +1 -0
- package/dist/ethers.umd.js +23954 -0
- package/dist/ethers.umd.js.map +1 -0
- package/dist/ethers.umd.min.js +1 -0
- package/dist/wordlists-extra.js +1595 -0
- package/dist/wordlists-extra.js.map +1 -0
- package/dist/wordlists-extra.min.js +1 -0
- package/lib.commonjs/README.md +16 -0
- package/lib.commonjs/_version.d.ts +5 -0
- package/lib.commonjs/_version.d.ts.map +1 -0
- package/lib.commonjs/_version.js +9 -0
- package/lib.commonjs/_version.js.map +1 -0
- package/lib.commonjs/abi/abi-coder.d.ts +60 -0
- package/lib.commonjs/abi/abi-coder.d.ts.map +1 -0
- package/lib.commonjs/abi/abi-coder.js +205 -0
- package/lib.commonjs/abi/abi-coder.js.map +1 -0
- package/lib.commonjs/abi/bytes32.d.ts +15 -0
- package/lib.commonjs/abi/bytes32.d.ts.map +1 -0
- package/lib.commonjs/abi/bytes32.js +45 -0
- package/lib.commonjs/abi/bytes32.js.map +1 -0
- package/lib.commonjs/abi/coders/abstract-coder.d.ts +121 -0
- package/lib.commonjs/abi/coders/abstract-coder.d.ts.map +1 -0
- package/lib.commonjs/abi/coders/abstract-coder.js +407 -0
- package/lib.commonjs/abi/coders/abstract-coder.js.map +1 -0
- package/lib.commonjs/abi/coders/address.d.ts +13 -0
- package/lib.commonjs/abi/coders/address.d.ts.map +1 -0
- package/lib.commonjs/abi/coders/address.js +33 -0
- package/lib.commonjs/abi/coders/address.js.map +1 -0
- package/lib.commonjs/abi/coders/anonymous.d.ts +15 -0
- package/lib.commonjs/abi/coders/anonymous.d.ts.map +1 -0
- package/lib.commonjs/abi/coders/anonymous.js +27 -0
- package/lib.commonjs/abi/coders/anonymous.js.map +1 -0
- package/lib.commonjs/abi/coders/array.d.ts +25 -0
- package/lib.commonjs/abi/coders/array.d.ts.map +1 -0
- package/lib.commonjs/abi/coders/array.js +165 -0
- package/lib.commonjs/abi/coders/array.js.map +1 -0
- package/lib.commonjs/abi/coders/boolean.d.ts +13 -0
- package/lib.commonjs/abi/coders/boolean.d.ts.map +1 -0
- package/lib.commonjs/abi/coders/boolean.js +25 -0
- package/lib.commonjs/abi/coders/boolean.js.map +1 -0
- package/lib.commonjs/abi/coders/bytes.d.ts +19 -0
- package/lib.commonjs/abi/coders/bytes.d.ts.map +1 -0
- package/lib.commonjs/abi/coders/bytes.js +39 -0
- package/lib.commonjs/abi/coders/bytes.js.map +1 -0
- package/lib.commonjs/abi/coders/fixed-bytes.d.ts +15 -0
- package/lib.commonjs/abi/coders/fixed-bytes.d.ts.map +1 -0
- package/lib.commonjs/abi/coders/fixed-bytes.js +32 -0
- package/lib.commonjs/abi/coders/fixed-bytes.js.map +1 -0
- package/lib.commonjs/abi/coders/null.d.ts +12 -0
- package/lib.commonjs/abi/coders/null.d.ts.map +1 -0
- package/lib.commonjs/abi/coders/null.js +28 -0
- package/lib.commonjs/abi/coders/null.js.map +1 -0
- package/lib.commonjs/abi/coders/number.d.ts +16 -0
- package/lib.commonjs/abi/coders/number.d.ts.map +1 -0
- package/lib.commonjs/abi/coders/number.js +49 -0
- package/lib.commonjs/abi/coders/number.js.map +1 -0
- package/lib.commonjs/abi/coders/string.d.ts +13 -0
- package/lib.commonjs/abi/coders/string.d.ts.map +1 -0
- package/lib.commonjs/abi/coders/string.js +25 -0
- package/lib.commonjs/abi/coders/string.js.map +1 -0
- package/lib.commonjs/abi/coders/tuple.d.ts +16 -0
- package/lib.commonjs/abi/coders/tuple.d.ts.map +1 -0
- package/lib.commonjs/abi/coders/tuple.js +67 -0
- package/lib.commonjs/abi/coders/tuple.js.map +1 -0
- package/lib.commonjs/abi/fragments.d.ts +466 -0
- package/lib.commonjs/abi/fragments.d.ts.map +1 -0
- package/lib.commonjs/abi/fragments.js +1331 -0
- package/lib.commonjs/abi/fragments.js.map +1 -0
- package/lib.commonjs/abi/index.d.ts +18 -0
- package/lib.commonjs/abi/index.d.ts.map +1 -0
- package/lib.commonjs/abi/index.js +40 -0
- package/lib.commonjs/abi/index.js.map +1 -0
- package/lib.commonjs/abi/interface.d.ts +382 -0
- package/lib.commonjs/abi/interface.d.ts.map +1 -0
- package/lib.commonjs/abi/interface.js +1106 -0
- package/lib.commonjs/abi/interface.js.map +1 -0
- package/lib.commonjs/abi/typed.d.ts +570 -0
- package/lib.commonjs/abi/typed.d.ts.map +1 -0
- package/lib.commonjs/abi/typed.js +606 -0
- package/lib.commonjs/abi/typed.js.map +1 -0
- package/lib.commonjs/address/address.d.ts +56 -0
- package/lib.commonjs/address/address.d.ts.map +1 -0
- package/lib.commonjs/address/address.js +161 -0
- package/lib.commonjs/address/address.js.map +1 -0
- package/lib.commonjs/address/checks.d.ts +81 -0
- package/lib.commonjs/address/checks.d.ts.map +1 -0
- package/lib.commonjs/address/checks.js +120 -0
- package/lib.commonjs/address/checks.js.map +1 -0
- package/lib.commonjs/address/contract-address.d.ts +48 -0
- package/lib.commonjs/address/contract-address.d.ts.map +1 -0
- package/lib.commonjs/address/contract-address.js +74 -0
- package/lib.commonjs/address/contract-address.js.map +1 -0
- package/lib.commonjs/address/index.d.ts +49 -0
- package/lib.commonjs/address/index.d.ts.map +1 -0
- package/lib.commonjs/address/index.js +29 -0
- package/lib.commonjs/address/index.js.map +1 -0
- package/lib.commonjs/constants/addresses.d.ts +7 -0
- package/lib.commonjs/constants/addresses.d.ts.map +1 -0
- package/lib.commonjs/constants/addresses.js +10 -0
- package/lib.commonjs/constants/addresses.js.map +1 -0
- package/lib.commonjs/constants/hashes.d.ts +7 -0
- package/lib.commonjs/constants/hashes.d.ts.map +1 -0
- package/lib.commonjs/constants/hashes.js +10 -0
- package/lib.commonjs/constants/hashes.js.map +1 -0
- package/lib.commonjs/constants/index.d.ts +10 -0
- package/lib.commonjs/constants/index.d.ts.map +1 -0
- package/lib.commonjs/constants/index.js +22 -0
- package/lib.commonjs/constants/index.js.map +1 -0
- package/lib.commonjs/constants/numbers.d.ts +31 -0
- package/lib.commonjs/constants/numbers.d.ts.map +1 -0
- package/lib.commonjs/constants/numbers.js +34 -0
- package/lib.commonjs/constants/numbers.js.map +1 -0
- package/lib.commonjs/constants/strings.d.ts +13 -0
- package/lib.commonjs/constants/strings.d.ts.map +1 -0
- package/lib.commonjs/constants/strings.js +17 -0
- package/lib.commonjs/constants/strings.js.map +1 -0
- package/lib.commonjs/contract/contract.d.ts +168 -0
- package/lib.commonjs/contract/contract.d.ts.map +1 -0
- package/lib.commonjs/contract/contract.js +943 -0
- package/lib.commonjs/contract/contract.js.map +1 -0
- package/lib.commonjs/contract/factory.d.ts +62 -0
- package/lib.commonjs/contract/factory.d.ts.map +1 -0
- package/lib.commonjs/contract/factory.js +116 -0
- package/lib.commonjs/contract/factory.js.map +1 -0
- package/lib.commonjs/contract/index.d.ts +13 -0
- package/lib.commonjs/contract/index.d.ts.map +1 -0
- package/lib.commonjs/contract/index.js +24 -0
- package/lib.commonjs/contract/index.js.map +1 -0
- package/lib.commonjs/contract/types.d.ts +193 -0
- package/lib.commonjs/contract/types.d.ts.map +1 -0
- package/lib.commonjs/contract/types.js +6 -0
- package/lib.commonjs/contract/types.js.map +1 -0
- package/lib.commonjs/contract/wrappers.d.ts +143 -0
- package/lib.commonjs/contract/wrappers.d.ts.map +1 -0
- package/lib.commonjs/contract/wrappers.js +186 -0
- package/lib.commonjs/contract/wrappers.js.map +1 -0
- package/lib.commonjs/crypto/crypto-browser.d.ts +15 -0
- package/lib.commonjs/crypto/crypto-browser.d.ts.map +1 -0
- package/lib.commonjs/crypto/crypto-browser.js +55 -0
- package/lib.commonjs/crypto/crypto-browser.js.map +1 -0
- package/lib.commonjs/crypto/crypto.d.ts +2 -0
- package/lib.commonjs/crypto/crypto.d.ts.map +1 -0
- package/lib.commonjs/crypto/crypto.js +9 -0
- package/lib.commonjs/crypto/crypto.js.map +1 -0
- package/lib.commonjs/crypto/hmac.d.ts +25 -0
- package/lib.commonjs/crypto/hmac.d.ts.map +1 -0
- package/lib.commonjs/crypto/hmac.js +51 -0
- package/lib.commonjs/crypto/hmac.js.map +1 -0
- package/lib.commonjs/crypto/index.d.ts +25 -0
- package/lib.commonjs/crypto/index.d.ts.map +1 -0
- package/lib.commonjs/crypto/index.js +49 -0
- package/lib.commonjs/crypto/index.js.map +1 -0
- package/lib.commonjs/crypto/keccak.d.ts +35 -0
- package/lib.commonjs/crypto/keccak.d.ts.map +1 -0
- package/lib.commonjs/crypto/keccak.js +52 -0
- package/lib.commonjs/crypto/keccak.js.map +1 -0
- package/lib.commonjs/crypto/pbkdf2.d.ts +35 -0
- package/lib.commonjs/crypto/pbkdf2.d.ts.map +1 -0
- package/lib.commonjs/crypto/pbkdf2.js +53 -0
- package/lib.commonjs/crypto/pbkdf2.js.map +1 -0
- package/lib.commonjs/crypto/random.d.ts +14 -0
- package/lib.commonjs/crypto/random.d.ts.map +1 -0
- package/lib.commonjs/crypto/random.js +38 -0
- package/lib.commonjs/crypto/random.js.map +1 -0
- package/lib.commonjs/crypto/ripemd160.d.ts +25 -0
- package/lib.commonjs/crypto/ripemd160.d.ts.map +1 -0
- package/lib.commonjs/crypto/ripemd160.js +42 -0
- package/lib.commonjs/crypto/ripemd160.js.map +1 -0
- package/lib.commonjs/crypto/scrypt.d.ts +82 -0
- package/lib.commonjs/crypto/scrypt.d.ts.map +1 -0
- package/lib.commonjs/crypto/scrypt.js +104 -0
- package/lib.commonjs/crypto/scrypt.js.map +1 -0
- package/lib.commonjs/crypto/sha2.d.ts +47 -0
- package/lib.commonjs/crypto/sha2.d.ts.map +1 -0
- package/lib.commonjs/crypto/sha2.js +76 -0
- package/lib.commonjs/crypto/sha2.js.map +1 -0
- package/lib.commonjs/crypto/signature.d.ts +158 -0
- package/lib.commonjs/crypto/signature.d.ts.map +1 -0
- package/lib.commonjs/crypto/signature.js +305 -0
- package/lib.commonjs/crypto/signature.js.map +1 -0
- package/lib.commonjs/crypto/signing-key.d.ts +122 -0
- package/lib.commonjs/crypto/signing-key.d.ts.map +1 -0
- package/lib.commonjs/crypto/signing-key.js +178 -0
- package/lib.commonjs/crypto/signing-key.js.map +1 -0
- package/lib.commonjs/ethers.d.ts +22 -0
- package/lib.commonjs/ethers.d.ts.map +1 -0
- package/lib.commonjs/ethers.js +209 -0
- package/lib.commonjs/ethers.js.map +1 -0
- package/lib.commonjs/hash/id.d.ts +13 -0
- package/lib.commonjs/hash/id.d.ts.map +1 -0
- package/lib.commonjs/hash/id.js +21 -0
- package/lib.commonjs/hash/id.js.map +1 -0
- package/lib.commonjs/hash/index.d.ts +13 -0
- package/lib.commonjs/hash/index.d.ts.map +1 -0
- package/lib.commonjs/hash/index.js +27 -0
- package/lib.commonjs/hash/index.js.map +1 -0
- package/lib.commonjs/hash/message.d.ts +36 -0
- package/lib.commonjs/hash/message.d.ts.map +1 -0
- package/lib.commonjs/hash/message.js +56 -0
- package/lib.commonjs/hash/message.js.map +1 -0
- package/lib.commonjs/hash/namehash.d.ts +20 -0
- package/lib.commonjs/hash/namehash.d.ts.map +1 -0
- package/lib.commonjs/hash/namehash.js +88 -0
- package/lib.commonjs/hash/namehash.js.map +1 -0
- package/lib.commonjs/hash/solidity.d.ts +31 -0
- package/lib.commonjs/hash/solidity.d.ts.map +1 -0
- package/lib.commonjs/hash/solidity.js +109 -0
- package/lib.commonjs/hash/solidity.js.map +1 -0
- package/lib.commonjs/hash/typed-data.d.ts +150 -0
- package/lib.commonjs/hash/typed-data.d.ts.map +1 -0
- package/lib.commonjs/hash/typed-data.js +493 -0
- package/lib.commonjs/hash/typed-data.js.map +1 -0
- package/lib.commonjs/index.d.ts +11 -0
- package/lib.commonjs/index.d.ts.map +1 -0
- package/lib.commonjs/index.js +15 -0
- package/lib.commonjs/index.js.map +1 -0
- package/lib.commonjs/package.json +12 -0
- package/lib.commonjs/providers/abstract-provider.d.ts +449 -0
- package/lib.commonjs/providers/abstract-provider.d.ts.map +1 -0
- package/lib.commonjs/providers/abstract-provider.js +1382 -0
- package/lib.commonjs/providers/abstract-provider.js.map +1 -0
- package/lib.commonjs/providers/abstract-signer.d.ts +67 -0
- package/lib.commonjs/providers/abstract-signer.d.ts.map +1 -0
- package/lib.commonjs/providers/abstract-signer.js +228 -0
- package/lib.commonjs/providers/abstract-signer.js.map +1 -0
- package/lib.commonjs/providers/community.d.ts +29 -0
- package/lib.commonjs/providers/community.d.ts.map +1 -0
- package/lib.commonjs/providers/community.js +40 -0
- package/lib.commonjs/providers/community.js.map +1 -0
- package/lib.commonjs/providers/contracts.d.ts +36 -0
- package/lib.commonjs/providers/contracts.d.ts.map +1 -0
- package/lib.commonjs/providers/contracts.js +3 -0
- package/lib.commonjs/providers/contracts.js.map +1 -0
- package/lib.commonjs/providers/default-provider.d.ts +5 -0
- package/lib.commonjs/providers/default-provider.d.ts.map +1 -0
- package/lib.commonjs/providers/default-provider.js +138 -0
- package/lib.commonjs/providers/default-provider.js.map +1 -0
- package/lib.commonjs/providers/ens-resolver.d.ts +147 -0
- package/lib.commonjs/providers/ens-resolver.d.ts.map +1 -0
- package/lib.commonjs/providers/ens-resolver.js +502 -0
- package/lib.commonjs/providers/ens-resolver.js.map +1 -0
- package/lib.commonjs/providers/format.d.ts +15 -0
- package/lib.commonjs/providers/format.d.ts.map +1 -0
- package/lib.commonjs/providers/format.js +273 -0
- package/lib.commonjs/providers/format.js.map +1 -0
- package/lib.commonjs/providers/formatting.d.ts +268 -0
- package/lib.commonjs/providers/formatting.d.ts.map +1 -0
- package/lib.commonjs/providers/formatting.js +10 -0
- package/lib.commonjs/providers/formatting.js.map +1 -0
- package/lib.commonjs/providers/index.d.ts +47 -0
- package/lib.commonjs/providers/index.d.ts.map +1 -0
- package/lib.commonjs/providers/index.js +80 -0
- package/lib.commonjs/providers/index.js.map +1 -0
- package/lib.commonjs/providers/network.d.ts +99 -0
- package/lib.commonjs/providers/network.d.ts.map +1 -0
- package/lib.commonjs/providers/network.js +378 -0
- package/lib.commonjs/providers/network.js.map +1 -0
- package/lib.commonjs/providers/pagination.d.ts +6 -0
- package/lib.commonjs/providers/pagination.d.ts.map +1 -0
- package/lib.commonjs/providers/pagination.js +3 -0
- package/lib.commonjs/providers/pagination.js.map +1 -0
- package/lib.commonjs/providers/plugin-fallback.d.ts +13 -0
- package/lib.commonjs/providers/plugin-fallback.d.ts.map +1 -0
- package/lib.commonjs/providers/plugin-fallback.js +31 -0
- package/lib.commonjs/providers/plugin-fallback.js.map +1 -0
- package/lib.commonjs/providers/plugins-network.d.ts +170 -0
- package/lib.commonjs/providers/plugins-network.d.ts.map +1 -0
- package/lib.commonjs/providers/plugins-network.js +216 -0
- package/lib.commonjs/providers/plugins-network.js.map +1 -0
- package/lib.commonjs/providers/provider-alchemy.d.ts +31 -0
- package/lib.commonjs/providers/provider-alchemy.d.ts.map +1 -0
- package/lib.commonjs/providers/provider-alchemy.js +120 -0
- package/lib.commonjs/providers/provider-alchemy.js.map +1 -0
- package/lib.commonjs/providers/provider-ankr.d.ts +51 -0
- package/lib.commonjs/providers/provider-ankr.d.ts.map +1 -0
- package/lib.commonjs/providers/provider-ankr.js +107 -0
- package/lib.commonjs/providers/provider-ankr.js.map +1 -0
- package/lib.commonjs/providers/provider-browser.d.ts +56 -0
- package/lib.commonjs/providers/provider-browser.d.ts.map +1 -0
- package/lib.commonjs/providers/provider-browser.js +102 -0
- package/lib.commonjs/providers/provider-browser.js.map +1 -0
- package/lib.commonjs/providers/provider-cloudflare.d.ts +14 -0
- package/lib.commonjs/providers/provider-cloudflare.d.ts.map +1 -0
- package/lib.commonjs/providers/provider-cloudflare.js +26 -0
- package/lib.commonjs/providers/provider-cloudflare.js.map +1 -0
- package/lib.commonjs/providers/provider-etherscan.d.ts +141 -0
- package/lib.commonjs/providers/provider-etherscan.d.ts.map +1 -0
- package/lib.commonjs/providers/provider-etherscan.js +522 -0
- package/lib.commonjs/providers/provider-etherscan.js.map +1 -0
- package/lib.commonjs/providers/provider-fallback.d.ts +115 -0
- package/lib.commonjs/providers/provider-fallback.d.ts.map +1 -0
- package/lib.commonjs/providers/provider-fallback.js +573 -0
- package/lib.commonjs/providers/provider-fallback.js.map +1 -0
- package/lib.commonjs/providers/provider-infura.d.ts +90 -0
- package/lib.commonjs/providers/provider-infura.d.ts.map +1 -0
- package/lib.commonjs/providers/provider-infura.js +176 -0
- package/lib.commonjs/providers/provider-infura.js.map +1 -0
- package/lib.commonjs/providers/provider-ipcsocket-browser.d.ts +3 -0
- package/lib.commonjs/providers/provider-ipcsocket-browser.d.ts.map +1 -0
- package/lib.commonjs/providers/provider-ipcsocket-browser.js +6 -0
- package/lib.commonjs/providers/provider-ipcsocket-browser.js.map +1 -0
- package/lib.commonjs/providers/provider-ipcsocket.d.ts +20 -0
- package/lib.commonjs/providers/provider-ipcsocket.d.ts.map +1 -0
- package/lib.commonjs/providers/provider-ipcsocket.js +69 -0
- package/lib.commonjs/providers/provider-ipcsocket.js.map +1 -0
- package/lib.commonjs/providers/provider-jsonrpc.d.ts +350 -0
- package/lib.commonjs/providers/provider-jsonrpc.d.ts.map +1 -0
- package/lib.commonjs/providers/provider-jsonrpc.js +880 -0
- package/lib.commonjs/providers/provider-jsonrpc.js.map +1 -0
- package/lib.commonjs/providers/provider-pocket.d.ts +54 -0
- package/lib.commonjs/providers/provider-pocket.d.ts.map +1 -0
- package/lib.commonjs/providers/provider-pocket.js +109 -0
- package/lib.commonjs/providers/provider-pocket.js.map +1 -0
- package/lib.commonjs/providers/provider-quicknode.d.ts +50 -0
- package/lib.commonjs/providers/provider-quicknode.d.ts.map +1 -0
- package/lib.commonjs/providers/provider-quicknode.js +109 -0
- package/lib.commonjs/providers/provider-quicknode.js.map +1 -0
- package/lib.commonjs/providers/provider-socket.d.ts +113 -0
- package/lib.commonjs/providers/provider-socket.d.ts.map +1 -0
- package/lib.commonjs/providers/provider-socket.js +293 -0
- package/lib.commonjs/providers/provider-socket.js.map +1 -0
- package/lib.commonjs/providers/provider-websocket.d.ts +36 -0
- package/lib.commonjs/providers/provider-websocket.d.ts.map +1 -0
- package/lib.commonjs/providers/provider-websocket.js +80 -0
- package/lib.commonjs/providers/provider-websocket.js.map +1 -0
- package/lib.commonjs/providers/provider.d.ts +1131 -0
- package/lib.commonjs/providers/provider.d.ts.map +1 -0
- package/lib.commonjs/providers/provider.js +1226 -0
- package/lib.commonjs/providers/provider.js.map +1 -0
- package/lib.commonjs/providers/signer-noncemanager.d.ts +38 -0
- package/lib.commonjs/providers/signer-noncemanager.d.ts.map +1 -0
- package/lib.commonjs/providers/signer-noncemanager.js +78 -0
- package/lib.commonjs/providers/signer-noncemanager.js.map +1 -0
- package/lib.commonjs/providers/signer.d.ts +118 -0
- package/lib.commonjs/providers/signer.d.ts.map +1 -0
- package/lib.commonjs/providers/signer.js +3 -0
- package/lib.commonjs/providers/signer.js.map +1 -0
- package/lib.commonjs/providers/subscriber-connection.d.ts +25 -0
- package/lib.commonjs/providers/subscriber-connection.d.ts.map +1 -0
- package/lib.commonjs/providers/subscriber-connection.js +56 -0
- package/lib.commonjs/providers/subscriber-connection.js.map +1 -0
- package/lib.commonjs/providers/subscriber-filterid.d.ts +64 -0
- package/lib.commonjs/providers/subscriber-filterid.d.ts.map +1 -0
- package/lib.commonjs/providers/subscriber-filterid.js +177 -0
- package/lib.commonjs/providers/subscriber-filterid.js.map +1 -0
- package/lib.commonjs/providers/subscriber-polling.d.ts +94 -0
- package/lib.commonjs/providers/subscriber-polling.d.ts.map +1 -0
- package/lib.commonjs/providers/subscriber-polling.js +274 -0
- package/lib.commonjs/providers/subscriber-polling.js.map +1 -0
- package/lib.commonjs/providers/ws-browser.d.ts +3 -0
- package/lib.commonjs/providers/ws-browser.d.ts.map +1 -0
- package/lib.commonjs/providers/ws-browser.js +19 -0
- package/lib.commonjs/providers/ws-browser.js.map +1 -0
- package/lib.commonjs/providers/ws.d.ts +2 -0
- package/lib.commonjs/providers/ws.d.ts.map +1 -0
- package/lib.commonjs/providers/ws.js +6 -0
- package/lib.commonjs/providers/ws.js.map +1 -0
- package/lib.commonjs/transaction/accesslist.d.ts +6 -0
- package/lib.commonjs/transaction/accesslist.d.ts.map +1 -0
- package/lib.commonjs/transaction/accesslist.js +41 -0
- package/lib.commonjs/transaction/accesslist.js.map +1 -0
- package/lib.commonjs/transaction/address.d.ts +15 -0
- package/lib.commonjs/transaction/address.d.ts.map +1 -0
- package/lib.commonjs/transaction/address.js +30 -0
- package/lib.commonjs/transaction/address.js.map +1 -0
- package/lib.commonjs/transaction/index.d.ts +25 -0
- package/lib.commonjs/transaction/index.d.ts.map +1 -0
- package/lib.commonjs/transaction/index.js +17 -0
- package/lib.commonjs/transaction/index.js.map +1 -0
- package/lib.commonjs/transaction/transaction.d.ts +269 -0
- package/lib.commonjs/transaction/transaction.d.ts.map +1 -0
- package/lib.commonjs/transaction/transaction.js +708 -0
- package/lib.commonjs/transaction/transaction.js.map +1 -0
- package/lib.commonjs/utils/base58.d.ts +23 -0
- package/lib.commonjs/utils/base58.d.ts.map +1 -0
- package/lib.commonjs/utils/base58.js +60 -0
- package/lib.commonjs/utils/base58.js.map +1 -0
- package/lib.commonjs/utils/base64-browser.d.ts +4 -0
- package/lib.commonjs/utils/base64-browser.d.ts.map +1 -0
- package/lib.commonjs/utils/base64-browser.js +24 -0
- package/lib.commonjs/utils/base64-browser.js.map +1 -0
- package/lib.commonjs/utils/base64.d.ts +40 -0
- package/lib.commonjs/utils/base64.d.ts.map +1 -0
- package/lib.commonjs/utils/base64.js +58 -0
- package/lib.commonjs/utils/base64.js.map +1 -0
- package/lib.commonjs/utils/data.d.ts +93 -0
- package/lib.commonjs/utils/data.d.ts.map +1 -0
- package/lib.commonjs/utils/data.js +184 -0
- package/lib.commonjs/utils/data.js.map +1 -0
- package/lib.commonjs/utils/errors.d.ts +505 -0
- package/lib.commonjs/utils/errors.d.ts.map +1 -0
- package/lib.commonjs/utils/errors.js +228 -0
- package/lib.commonjs/utils/errors.js.map +1 -0
- package/lib.commonjs/utils/events.d.ts +77 -0
- package/lib.commonjs/utils/events.d.ts.map +1 -0
- package/lib.commonjs/utils/events.js +46 -0
- package/lib.commonjs/utils/events.js.map +1 -0
- package/lib.commonjs/utils/fetch.d.ts +334 -0
- package/lib.commonjs/utils/fetch.d.ts.map +1 -0
- package/lib.commonjs/utils/fetch.js +804 -0
- package/lib.commonjs/utils/fetch.js.map +1 -0
- package/lib.commonjs/utils/fixednumber.d.ts +252 -0
- package/lib.commonjs/utils/fixednumber.d.ts.map +1 -0
- package/lib.commonjs/utils/fixednumber.js +530 -0
- package/lib.commonjs/utils/fixednumber.js.map +1 -0
- package/lib.commonjs/utils/geturl-browser.d.ts +21 -0
- package/lib.commonjs/utils/geturl-browser.d.ts.map +1 -0
- package/lib.commonjs/utils/geturl-browser.js +41 -0
- package/lib.commonjs/utils/geturl-browser.js.map +1 -0
- package/lib.commonjs/utils/geturl.d.ts +6 -0
- package/lib.commonjs/utils/geturl.d.ts.map +1 -0
- package/lib.commonjs/utils/geturl.js +83 -0
- package/lib.commonjs/utils/geturl.js.map +1 -0
- package/lib.commonjs/utils/index.d.ts +30 -0
- package/lib.commonjs/utils/index.d.ts.map +1 -0
- package/lib.commonjs/utils/index.js +78 -0
- package/lib.commonjs/utils/index.js.map +1 -0
- package/lib.commonjs/utils/maths.d.ts +66 -0
- package/lib.commonjs/utils/maths.d.ts.map +1 -0
- package/lib.commonjs/utils/maths.js +229 -0
- package/lib.commonjs/utils/maths.js.map +1 -0
- package/lib.commonjs/utils/properties.d.ts +23 -0
- package/lib.commonjs/utils/properties.d.ts.map +1 -0
- package/lib.commonjs/utils/properties.js +59 -0
- package/lib.commonjs/utils/properties.js.map +1 -0
- package/lib.commonjs/utils/rlp-decode.d.ts +6 -0
- package/lib.commonjs/utils/rlp-decode.d.ts.map +1 -0
- package/lib.commonjs/utils/rlp-decode.js +83 -0
- package/lib.commonjs/utils/rlp-decode.js.map +1 -0
- package/lib.commonjs/utils/rlp-encode.d.ts +6 -0
- package/lib.commonjs/utils/rlp-encode.d.ts.map +1 -0
- package/lib.commonjs/utils/rlp-encode.js +53 -0
- package/lib.commonjs/utils/rlp-encode.js.map +1 -0
- package/lib.commonjs/utils/rlp.d.ts +13 -0
- package/lib.commonjs/utils/rlp.d.ts.map +1 -0
- package/lib.commonjs/utils/rlp.js +14 -0
- package/lib.commonjs/utils/rlp.js.map +1 -0
- package/lib.commonjs/utils/units.d.ts +24 -0
- package/lib.commonjs/utils/units.d.ts.map +1 -0
- package/lib.commonjs/utils/units.js +90 -0
- package/lib.commonjs/utils/units.js.map +1 -0
- package/lib.commonjs/utils/utf8.d.ts +96 -0
- package/lib.commonjs/utils/utf8.d.ts.map +1 -0
- package/lib.commonjs/utils/utf8.js +226 -0
- package/lib.commonjs/utils/utf8.js.map +1 -0
- package/lib.commonjs/utils/uuid.d.ts +8 -0
- package/lib.commonjs/utils/uuid.d.ts.map +1 -0
- package/lib.commonjs/utils/uuid.js +34 -0
- package/lib.commonjs/utils/uuid.js.map +1 -0
- package/lib.commonjs/wallet/base-wallet.d.ts +48 -0
- package/lib.commonjs/wallet/base-wallet.d.ts.map +1 -0
- package/lib.commonjs/wallet/base-wallet.js +105 -0
- package/lib.commonjs/wallet/base-wallet.js.map +1 -0
- package/lib.commonjs/wallet/hdwallet.d.ts +248 -0
- package/lib.commonjs/wallet/hdwallet.d.ts.map +1 -0
- package/lib.commonjs/wallet/hdwallet.js +505 -0
- package/lib.commonjs/wallet/hdwallet.js.map +1 -0
- package/lib.commonjs/wallet/index.d.ts +27 -0
- package/lib.commonjs/wallet/index.d.ts.map +1 -0
- package/lib.commonjs/wallet/index.js +43 -0
- package/lib.commonjs/wallet/index.js.map +1 -0
- package/lib.commonjs/wallet/json-crowdsale.d.ts +27 -0
- package/lib.commonjs/wallet/json-crowdsale.d.ts.map +1 -0
- package/lib.commonjs/wallet/json-crowdsale.js +60 -0
- package/lib.commonjs/wallet/json-crowdsale.js.map +1 -0
- package/lib.commonjs/wallet/json-keystore.d.ts +89 -0
- package/lib.commonjs/wallet/json-keystore.d.ts.map +1 -0
- package/lib.commonjs/wallet/json-keystore.js +295 -0
- package/lib.commonjs/wallet/json-keystore.js.map +1 -0
- package/lib.commonjs/wallet/mnemonic.d.ts +65 -0
- package/lib.commonjs/wallet/mnemonic.d.ts.map +1 -0
- package/lib.commonjs/wallet/mnemonic.js +169 -0
- package/lib.commonjs/wallet/mnemonic.js.map +1 -0
- package/lib.commonjs/wallet/utils.d.ts +8 -0
- package/lib.commonjs/wallet/utils.d.ts.map +1 -0
- package/lib.commonjs/wallet/utils.js +149 -0
- package/lib.commonjs/wallet/utils.js.map +1 -0
- package/lib.commonjs/wallet/wallet.d.ts +71 -0
- package/lib.commonjs/wallet/wallet.d.ts.map +1 -0
- package/lib.commonjs/wallet/wallet.js +148 -0
- package/lib.commonjs/wallet/wallet.js.map +1 -0
- package/lib.commonjs/wordlists/bit-reader.d.ts +5 -0
- package/lib.commonjs/wordlists/bit-reader.d.ts.map +1 -0
- package/lib.commonjs/wordlists/bit-reader.js +36 -0
- package/lib.commonjs/wordlists/bit-reader.js.map +1 -0
- package/lib.commonjs/wordlists/decode-owl.d.ts +9 -0
- package/lib.commonjs/wordlists/decode-owl.d.ts.map +1 -0
- package/lib.commonjs/wordlists/decode-owl.js +60 -0
- package/lib.commonjs/wordlists/decode-owl.js.map +1 -0
- package/lib.commonjs/wordlists/decode-owla.d.ts +5 -0
- package/lib.commonjs/wordlists/decode-owla.d.ts.map +1 -0
- package/lib.commonjs/wordlists/decode-owla.js +32 -0
- package/lib.commonjs/wordlists/decode-owla.js.map +1 -0
- package/lib.commonjs/wordlists/generation/encode-latin.d.ts +25 -0
- package/lib.commonjs/wordlists/generation/encode-latin.d.ts.map +1 -0
- package/lib.commonjs/wordlists/generation/encode-latin.js +351 -0
- package/lib.commonjs/wordlists/generation/encode-latin.js.map +1 -0
- package/lib.commonjs/wordlists/index.d.ts +25 -0
- package/lib.commonjs/wordlists/index.d.ts.map +1 -0
- package/lib.commonjs/wordlists/index.js +33 -0
- package/lib.commonjs/wordlists/index.js.map +1 -0
- package/lib.commonjs/wordlists/lang-cz.d.ts +23 -0
- package/lib.commonjs/wordlists/lang-cz.d.ts.map +1 -0
- package/lib.commonjs/wordlists/lang-cz.js +35 -0
- package/lib.commonjs/wordlists/lang-cz.js.map +1 -0
- package/lib.commonjs/wordlists/lang-en.d.ts +23 -0
- package/lib.commonjs/wordlists/lang-en.d.ts.map +1 -0
- package/lib.commonjs/wordlists/lang-en.js +35 -0
- package/lib.commonjs/wordlists/lang-en.js.map +1 -0
- package/lib.commonjs/wordlists/lang-es.d.ts +23 -0
- package/lib.commonjs/wordlists/lang-es.d.ts.map +1 -0
- package/lib.commonjs/wordlists/lang-es.js +36 -0
- package/lib.commonjs/wordlists/lang-es.js.map +1 -0
- package/lib.commonjs/wordlists/lang-fr.d.ts +23 -0
- package/lib.commonjs/wordlists/lang-fr.d.ts.map +1 -0
- package/lib.commonjs/wordlists/lang-fr.js +36 -0
- package/lib.commonjs/wordlists/lang-fr.js.map +1 -0
- package/lib.commonjs/wordlists/lang-it.d.ts +23 -0
- package/lib.commonjs/wordlists/lang-it.d.ts.map +1 -0
- package/lib.commonjs/wordlists/lang-it.js +35 -0
- package/lib.commonjs/wordlists/lang-it.js.map +1 -0
- package/lib.commonjs/wordlists/lang-ja.d.ts +27 -0
- package/lib.commonjs/wordlists/lang-ja.d.ts.map +1 -0
- package/lib.commonjs/wordlists/lang-ja.js +158 -0
- package/lib.commonjs/wordlists/lang-ja.js.map +1 -0
- package/lib.commonjs/wordlists/lang-ko.d.ts +25 -0
- package/lib.commonjs/wordlists/lang-ko.d.ts.map +1 -0
- package/lib.commonjs/wordlists/lang-ko.js +93 -0
- package/lib.commonjs/wordlists/lang-ko.js.map +1 -0
- package/lib.commonjs/wordlists/lang-pt.d.ts +23 -0
- package/lib.commonjs/wordlists/lang-pt.d.ts.map +1 -0
- package/lib.commonjs/wordlists/lang-pt.js +35 -0
- package/lib.commonjs/wordlists/lang-pt.js.map +1 -0
- package/lib.commonjs/wordlists/lang-zh.d.ts +32 -0
- package/lib.commonjs/wordlists/lang-zh.d.ts.map +1 -0
- package/lib.commonjs/wordlists/lang-zh.js +96 -0
- package/lib.commonjs/wordlists/lang-zh.js.map +1 -0
- package/lib.commonjs/wordlists/wordlist-owl.d.ts +32 -0
- package/lib.commonjs/wordlists/wordlist-owl.d.ts.map +1 -0
- package/lib.commonjs/wordlists/wordlist-owl.js +70 -0
- package/lib.commonjs/wordlists/wordlist-owl.js.map +1 -0
- package/lib.commonjs/wordlists/wordlist-owla.d.ts +30 -0
- package/lib.commonjs/wordlists/wordlist-owla.d.ts.map +1 -0
- package/lib.commonjs/wordlists/wordlist-owla.js +40 -0
- package/lib.commonjs/wordlists/wordlist-owla.js.map +1 -0
- package/lib.commonjs/wordlists/wordlist.d.ts +47 -0
- package/lib.commonjs/wordlists/wordlist.d.ts.map +1 -0
- package/lib.commonjs/wordlists/wordlist.js +46 -0
- package/lib.commonjs/wordlists/wordlist.js.map +1 -0
- package/lib.commonjs/wordlists/wordlists-browser.d.ts +3 -0
- package/lib.commonjs/wordlists/wordlists-browser.d.ts.map +1 -0
- package/lib.commonjs/wordlists/wordlists-browser.js +8 -0
- package/lib.commonjs/wordlists/wordlists-browser.js.map +1 -0
- package/lib.commonjs/wordlists/wordlists-extra.d.ts +9 -0
- package/lib.commonjs/wordlists/wordlists-extra.d.ts.map +1 -0
- package/lib.commonjs/wordlists/wordlists-extra.js +20 -0
- package/lib.commonjs/wordlists/wordlists-extra.js.map +1 -0
- package/lib.commonjs/wordlists/wordlists.d.ts +16 -0
- package/lib.commonjs/wordlists/wordlists.d.ts.map +1 -0
- package/lib.commonjs/wordlists/wordlists.js +38 -0
- package/lib.commonjs/wordlists/wordlists.js.map +1 -0
- package/lib.esm/README.md +16 -0
- package/lib.esm/_version.d.ts +5 -0
- package/lib.esm/_version.d.ts.map +1 -0
- package/lib.esm/_version.js +6 -0
- package/lib.esm/_version.js.map +1 -0
- package/lib.esm/abi/abi-coder.d.ts +60 -0
- package/lib.esm/abi/abi-coder.d.ts.map +1 -0
- package/lib.esm/abi/abi-coder.js +201 -0
- package/lib.esm/abi/abi-coder.js.map +1 -0
- package/lib.esm/abi/bytes32.d.ts +15 -0
- package/lib.esm/abi/bytes32.d.ts.map +1 -0
- package/lib.esm/abi/bytes32.js +40 -0
- package/lib.esm/abi/bytes32.js.map +1 -0
- package/lib.esm/abi/coders/abstract-coder.d.ts +121 -0
- package/lib.esm/abi/coders/abstract-coder.d.ts.map +1 -0
- package/lib.esm/abi/coders/abstract-coder.js +399 -0
- package/lib.esm/abi/coders/abstract-coder.js.map +1 -0
- package/lib.esm/abi/coders/address.d.ts +13 -0
- package/lib.esm/abi/coders/address.d.ts.map +1 -0
- package/lib.esm/abi/coders/address.js +29 -0
- package/lib.esm/abi/coders/address.js.map +1 -0
- package/lib.esm/abi/coders/anonymous.d.ts +15 -0
- package/lib.esm/abi/coders/anonymous.d.ts.map +1 -0
- package/lib.esm/abi/coders/anonymous.js +23 -0
- package/lib.esm/abi/coders/anonymous.js.map +1 -0
- package/lib.esm/abi/coders/array.d.ts +25 -0
- package/lib.esm/abi/coders/array.d.ts.map +1 -0
- package/lib.esm/abi/coders/array.js +159 -0
- package/lib.esm/abi/coders/array.js.map +1 -0
- package/lib.esm/abi/coders/boolean.d.ts +13 -0
- package/lib.esm/abi/coders/boolean.d.ts.map +1 -0
- package/lib.esm/abi/coders/boolean.js +21 -0
- package/lib.esm/abi/coders/boolean.js.map +1 -0
- package/lib.esm/abi/coders/bytes.d.ts +19 -0
- package/lib.esm/abi/coders/bytes.d.ts.map +1 -0
- package/lib.esm/abi/coders/bytes.js +34 -0
- package/lib.esm/abi/coders/bytes.js.map +1 -0
- package/lib.esm/abi/coders/fixed-bytes.d.ts +15 -0
- package/lib.esm/abi/coders/fixed-bytes.d.ts.map +1 -0
- package/lib.esm/abi/coders/fixed-bytes.js +28 -0
- package/lib.esm/abi/coders/fixed-bytes.js.map +1 -0
- package/lib.esm/abi/coders/null.d.ts +12 -0
- package/lib.esm/abi/coders/null.d.ts.map +1 -0
- package/lib.esm/abi/coders/null.js +24 -0
- package/lib.esm/abi/coders/null.js.map +1 -0
- package/lib.esm/abi/coders/number.d.ts +16 -0
- package/lib.esm/abi/coders/number.d.ts.map +1 -0
- package/lib.esm/abi/coders/number.js +45 -0
- package/lib.esm/abi/coders/number.js.map +1 -0
- package/lib.esm/abi/coders/string.d.ts +13 -0
- package/lib.esm/abi/coders/string.d.ts.map +1 -0
- package/lib.esm/abi/coders/string.js +21 -0
- package/lib.esm/abi/coders/string.js.map +1 -0
- package/lib.esm/abi/coders/tuple.d.ts +16 -0
- package/lib.esm/abi/coders/tuple.d.ts.map +1 -0
- package/lib.esm/abi/coders/tuple.js +63 -0
- package/lib.esm/abi/coders/tuple.js.map +1 -0
- package/lib.esm/abi/fragments.d.ts +466 -0
- package/lib.esm/abi/fragments.d.ts.map +1 -0
- package/lib.esm/abi/fragments.js +1319 -0
- package/lib.esm/abi/fragments.js.map +1 -0
- package/lib.esm/abi/index.d.ts +18 -0
- package/lib.esm/abi/index.d.ts.map +1 -0
- package/lib.esm/abi/index.js +17 -0
- package/lib.esm/abi/index.js.map +1 -0
- package/lib.esm/abi/interface.d.ts +382 -0
- package/lib.esm/abi/interface.d.ts.map +1 -0
- package/lib.esm/abi/interface.js +1097 -0
- package/lib.esm/abi/interface.js.map +1 -0
- package/lib.esm/abi/typed.d.ts +570 -0
- package/lib.esm/abi/typed.d.ts.map +1 -0
- package/lib.esm/abi/typed.js +602 -0
- package/lib.esm/abi/typed.js.map +1 -0
- package/lib.esm/address/address.d.ts +56 -0
- package/lib.esm/address/address.d.ts.map +1 -0
- package/lib.esm/address/address.js +156 -0
- package/lib.esm/address/address.js.map +1 -0
- package/lib.esm/address/checks.d.ts +81 -0
- package/lib.esm/address/checks.d.ts.map +1 -0
- package/lib.esm/address/checks.js +114 -0
- package/lib.esm/address/checks.js.map +1 -0
- package/lib.esm/address/contract-address.d.ts +48 -0
- package/lib.esm/address/contract-address.d.ts.map +1 -0
- package/lib.esm/address/contract-address.js +69 -0
- package/lib.esm/address/contract-address.js.map +1 -0
- package/lib.esm/address/index.d.ts +49 -0
- package/lib.esm/address/index.d.ts.map +1 -0
- package/lib.esm/address/index.js +19 -0
- package/lib.esm/address/index.js.map +1 -0
- package/lib.esm/constants/addresses.d.ts +7 -0
- package/lib.esm/constants/addresses.d.ts.map +1 -0
- package/lib.esm/constants/addresses.js +7 -0
- package/lib.esm/constants/addresses.js.map +1 -0
- package/lib.esm/constants/hashes.d.ts +7 -0
- package/lib.esm/constants/hashes.d.ts.map +1 -0
- package/lib.esm/constants/hashes.js +7 -0
- package/lib.esm/constants/hashes.js.map +1 -0
- package/lib.esm/constants/index.d.ts +10 -0
- package/lib.esm/constants/index.d.ts.map +1 -0
- package/lib.esm/constants/index.js +10 -0
- package/lib.esm/constants/index.js.map +1 -0
- package/lib.esm/constants/numbers.d.ts +31 -0
- package/lib.esm/constants/numbers.d.ts.map +1 -0
- package/lib.esm/constants/numbers.js +31 -0
- package/lib.esm/constants/numbers.js.map +1 -0
- package/lib.esm/constants/strings.d.ts +13 -0
- package/lib.esm/constants/strings.d.ts.map +1 -0
- package/lib.esm/constants/strings.js +14 -0
- package/lib.esm/constants/strings.js.map +1 -0
- package/lib.esm/contract/contract.d.ts +168 -0
- package/lib.esm/contract/contract.d.ts.map +1 -0
- package/lib.esm/contract/contract.js +936 -0
- package/lib.esm/contract/contract.js.map +1 -0
- package/lib.esm/contract/factory.d.ts +62 -0
- package/lib.esm/contract/factory.d.ts.map +1 -0
- package/lib.esm/contract/factory.js +112 -0
- package/lib.esm/contract/factory.js.map +1 -0
- package/lib.esm/contract/index.d.ts +13 -0
- package/lib.esm/contract/index.d.ts.map +1 -0
- package/lib.esm/contract/index.js +12 -0
- package/lib.esm/contract/index.js.map +1 -0
- package/lib.esm/contract/types.d.ts +193 -0
- package/lib.esm/contract/types.d.ts.map +1 -0
- package/lib.esm/contract/types.js +5 -0
- package/lib.esm/contract/types.js.map +1 -0
- package/lib.esm/contract/wrappers.d.ts +143 -0
- package/lib.esm/contract/wrappers.d.ts.map +1 -0
- package/lib.esm/contract/wrappers.js +177 -0
- package/lib.esm/contract/wrappers.js.map +1 -0
- package/lib.esm/crypto/crypto-browser.d.ts +15 -0
- package/lib.esm/crypto/crypto-browser.d.ts.map +1 -0
- package/lib.esm/crypto/crypto-browser.js +48 -0
- package/lib.esm/crypto/crypto-browser.js.map +1 -0
- package/lib.esm/crypto/crypto.d.ts +2 -0
- package/lib.esm/crypto/crypto.d.ts.map +1 -0
- package/lib.esm/crypto/crypto.js +2 -0
- package/lib.esm/crypto/crypto.js.map +1 -0
- package/lib.esm/crypto/hmac.d.ts +25 -0
- package/lib.esm/crypto/hmac.d.ts.map +1 -0
- package/lib.esm/crypto/hmac.js +47 -0
- package/lib.esm/crypto/hmac.js.map +1 -0
- package/lib.esm/crypto/index.d.ts +25 -0
- package/lib.esm/crypto/index.d.ts.map +1 -0
- package/lib.esm/crypto/index.js +36 -0
- package/lib.esm/crypto/index.js.map +1 -0
- package/lib.esm/crypto/keccak.d.ts +35 -0
- package/lib.esm/crypto/keccak.d.ts.map +1 -0
- package/lib.esm/crypto/keccak.js +48 -0
- package/lib.esm/crypto/keccak.js.map +1 -0
- package/lib.esm/crypto/pbkdf2.d.ts +35 -0
- package/lib.esm/crypto/pbkdf2.d.ts.map +1 -0
- package/lib.esm/crypto/pbkdf2.js +49 -0
- package/lib.esm/crypto/pbkdf2.js.map +1 -0
- package/lib.esm/crypto/random.d.ts +14 -0
- package/lib.esm/crypto/random.d.ts.map +1 -0
- package/lib.esm/crypto/random.js +34 -0
- package/lib.esm/crypto/random.js.map +1 -0
- package/lib.esm/crypto/ripemd160.d.ts +25 -0
- package/lib.esm/crypto/ripemd160.d.ts.map +1 -0
- package/lib.esm/crypto/ripemd160.js +38 -0
- package/lib.esm/crypto/ripemd160.js.map +1 -0
- package/lib.esm/crypto/scrypt.d.ts +82 -0
- package/lib.esm/crypto/scrypt.d.ts.map +1 -0
- package/lib.esm/crypto/scrypt.js +99 -0
- package/lib.esm/crypto/scrypt.js.map +1 -0
- package/lib.esm/crypto/sha2.d.ts +47 -0
- package/lib.esm/crypto/sha2.d.ts.map +1 -0
- package/lib.esm/crypto/sha2.js +71 -0
- package/lib.esm/crypto/sha2.js.map +1 -0
- package/lib.esm/crypto/signature.d.ts +158 -0
- package/lib.esm/crypto/signature.d.ts.map +1 -0
- package/lib.esm/crypto/signature.js +301 -0
- package/lib.esm/crypto/signature.js.map +1 -0
- package/lib.esm/crypto/signing-key.d.ts +122 -0
- package/lib.esm/crypto/signing-key.d.ts.map +1 -0
- package/lib.esm/crypto/signing-key.js +173 -0
- package/lib.esm/crypto/signing-key.js.map +1 -0
- package/lib.esm/ethers.d.ts +22 -0
- package/lib.esm/ethers.d.ts.map +1 -0
- package/lib.esm/ethers.js +15 -0
- package/lib.esm/ethers.js.map +1 -0
- package/lib.esm/hash/id.d.ts +13 -0
- package/lib.esm/hash/id.d.ts.map +1 -0
- package/lib.esm/hash/id.js +17 -0
- package/lib.esm/hash/id.js.map +1 -0
- package/lib.esm/hash/index.d.ts +13 -0
- package/lib.esm/hash/index.d.ts.map +1 -0
- package/lib.esm/hash/index.js +12 -0
- package/lib.esm/hash/index.js.map +1 -0
- package/lib.esm/hash/message.d.ts +36 -0
- package/lib.esm/hash/message.d.ts.map +1 -0
- package/lib.esm/hash/message.js +51 -0
- package/lib.esm/hash/message.js.map +1 -0
- package/lib.esm/hash/namehash.d.ts +20 -0
- package/lib.esm/hash/namehash.d.ts.map +1 -0
- package/lib.esm/hash/namehash.js +81 -0
- package/lib.esm/hash/namehash.js.map +1 -0
- package/lib.esm/hash/solidity.d.ts +31 -0
- package/lib.esm/hash/solidity.d.ts.map +1 -0
- package/lib.esm/hash/solidity.js +103 -0
- package/lib.esm/hash/solidity.js.map +1 -0
- package/lib.esm/hash/typed-data.d.ts +150 -0
- package/lib.esm/hash/typed-data.d.ts.map +1 -0
- package/lib.esm/hash/typed-data.js +488 -0
- package/lib.esm/hash/typed-data.js.map +1 -0
- package/lib.esm/index.d.ts +11 -0
- package/lib.esm/index.d.ts.map +1 -0
- package/lib.esm/index.js +11 -0
- package/lib.esm/index.js.map +1 -0
- package/lib.esm/package.json +12 -0
- package/lib.esm/providers/abstract-provider.d.ts +449 -0
- package/lib.esm/providers/abstract-provider.d.ts.map +1 -0
- package/lib.esm/providers/abstract-provider.js +1377 -0
- package/lib.esm/providers/abstract-provider.js.map +1 -0
- package/lib.esm/providers/abstract-signer.d.ts +67 -0
- package/lib.esm/providers/abstract-signer.d.ts.map +1 -0
- package/lib.esm/providers/abstract-signer.js +223 -0
- package/lib.esm/providers/abstract-signer.js.map +1 -0
- package/lib.esm/providers/community.d.ts +29 -0
- package/lib.esm/providers/community.d.ts.map +1 -0
- package/lib.esm/providers/community.js +36 -0
- package/lib.esm/providers/community.js.map +1 -0
- package/lib.esm/providers/contracts.d.ts +36 -0
- package/lib.esm/providers/contracts.d.ts.map +1 -0
- package/lib.esm/providers/contracts.js +2 -0
- package/lib.esm/providers/contracts.js.map +1 -0
- package/lib.esm/providers/default-provider.d.ts +5 -0
- package/lib.esm/providers/default-provider.d.ts.map +1 -0
- package/lib.esm/providers/default-provider.js +134 -0
- package/lib.esm/providers/default-provider.js.map +1 -0
- package/lib.esm/providers/ens-resolver.d.ts +147 -0
- package/lib.esm/providers/ens-resolver.d.ts.map +1 -0
- package/lib.esm/providers/ens-resolver.js +496 -0
- package/lib.esm/providers/ens-resolver.js.map +1 -0
- package/lib.esm/providers/format.d.ts +15 -0
- package/lib.esm/providers/format.d.ts.map +1 -0
- package/lib.esm/providers/format.js +258 -0
- package/lib.esm/providers/format.js.map +1 -0
- package/lib.esm/providers/formatting.d.ts +268 -0
- package/lib.esm/providers/formatting.d.ts.map +1 -0
- package/lib.esm/providers/formatting.js +9 -0
- package/lib.esm/providers/formatting.js.map +1 -0
- package/lib.esm/providers/index.d.ts +47 -0
- package/lib.esm/providers/index.d.ts.map +1 -0
- package/lib.esm/providers/index.js +38 -0
- package/lib.esm/providers/index.js.map +1 -0
- package/lib.esm/providers/network.d.ts +99 -0
- package/lib.esm/providers/network.d.ts.map +1 -0
- package/lib.esm/providers/network.js +374 -0
- package/lib.esm/providers/network.js.map +1 -0
- package/lib.esm/providers/pagination.d.ts +6 -0
- package/lib.esm/providers/pagination.d.ts.map +1 -0
- package/lib.esm/providers/pagination.js +2 -0
- package/lib.esm/providers/pagination.js.map +1 -0
- package/lib.esm/providers/plugin-fallback.d.ts +13 -0
- package/lib.esm/providers/plugin-fallback.d.ts.map +1 -0
- package/lib.esm/providers/plugin-fallback.js +26 -0
- package/lib.esm/providers/plugin-fallback.js.map +1 -0
- package/lib.esm/providers/plugins-network.d.ts +170 -0
- package/lib.esm/providers/plugins-network.d.ts.map +1 -0
- package/lib.esm/providers/plugins-network.js +208 -0
- package/lib.esm/providers/plugins-network.js.map +1 -0
- package/lib.esm/providers/provider-alchemy.d.ts +31 -0
- package/lib.esm/providers/provider-alchemy.d.ts.map +1 -0
- package/lib.esm/providers/provider-alchemy.js +116 -0
- package/lib.esm/providers/provider-alchemy.js.map +1 -0
- package/lib.esm/providers/provider-ankr.d.ts +51 -0
- package/lib.esm/providers/provider-ankr.d.ts.map +1 -0
- package/lib.esm/providers/provider-ankr.js +103 -0
- package/lib.esm/providers/provider-ankr.js.map +1 -0
- package/lib.esm/providers/provider-browser.d.ts +56 -0
- package/lib.esm/providers/provider-browser.d.ts.map +1 -0
- package/lib.esm/providers/provider-browser.js +98 -0
- package/lib.esm/providers/provider-browser.js.map +1 -0
- package/lib.esm/providers/provider-cloudflare.d.ts +14 -0
- package/lib.esm/providers/provider-cloudflare.d.ts.map +1 -0
- package/lib.esm/providers/provider-cloudflare.js +22 -0
- package/lib.esm/providers/provider-cloudflare.js.map +1 -0
- package/lib.esm/providers/provider-etherscan.d.ts +141 -0
- package/lib.esm/providers/provider-etherscan.d.ts.map +1 -0
- package/lib.esm/providers/provider-etherscan.js +517 -0
- package/lib.esm/providers/provider-etherscan.js.map +1 -0
- package/lib.esm/providers/provider-fallback.d.ts +115 -0
- package/lib.esm/providers/provider-fallback.d.ts.map +1 -0
- package/lib.esm/providers/provider-fallback.js +569 -0
- package/lib.esm/providers/provider-fallback.js.map +1 -0
- package/lib.esm/providers/provider-infura.d.ts +90 -0
- package/lib.esm/providers/provider-infura.d.ts.map +1 -0
- package/lib.esm/providers/provider-infura.js +171 -0
- package/lib.esm/providers/provider-infura.js.map +1 -0
- package/lib.esm/providers/provider-ipcsocket-browser.d.ts +3 -0
- package/lib.esm/providers/provider-ipcsocket-browser.d.ts.map +1 -0
- package/lib.esm/providers/provider-ipcsocket-browser.js +3 -0
- package/lib.esm/providers/provider-ipcsocket-browser.js.map +1 -0
- package/lib.esm/providers/provider-ipcsocket.d.ts +20 -0
- package/lib.esm/providers/provider-ipcsocket.d.ts.map +1 -0
- package/lib.esm/providers/provider-ipcsocket.js +65 -0
- package/lib.esm/providers/provider-ipcsocket.js.map +1 -0
- package/lib.esm/providers/provider-jsonrpc.d.ts +350 -0
- package/lib.esm/providers/provider-jsonrpc.d.ts.map +1 -0
- package/lib.esm/providers/provider-jsonrpc.js +873 -0
- package/lib.esm/providers/provider-jsonrpc.js.map +1 -0
- package/lib.esm/providers/provider-pocket.d.ts +54 -0
- package/lib.esm/providers/provider-pocket.d.ts.map +1 -0
- package/lib.esm/providers/provider-pocket.js +105 -0
- package/lib.esm/providers/provider-pocket.js.map +1 -0
- package/lib.esm/providers/provider-quicknode.d.ts +50 -0
- package/lib.esm/providers/provider-quicknode.d.ts.map +1 -0
- package/lib.esm/providers/provider-quicknode.js +105 -0
- package/lib.esm/providers/provider-quicknode.js.map +1 -0
- package/lib.esm/providers/provider-socket.d.ts +113 -0
- package/lib.esm/providers/provider-socket.d.ts.map +1 -0
- package/lib.esm/providers/provider-socket.js +285 -0
- package/lib.esm/providers/provider-socket.js.map +1 -0
- package/lib.esm/providers/provider-websocket.d.ts +36 -0
- package/lib.esm/providers/provider-websocket.d.ts.map +1 -0
- package/lib.esm/providers/provider-websocket.js +76 -0
- package/lib.esm/providers/provider-websocket.js.map +1 -0
- package/lib.esm/providers/provider.d.ts +1131 -0
- package/lib.esm/providers/provider.d.ts.map +1 -0
- package/lib.esm/providers/provider.js +1217 -0
- package/lib.esm/providers/provider.js.map +1 -0
- package/lib.esm/providers/signer-noncemanager.d.ts +38 -0
- package/lib.esm/providers/signer-noncemanager.d.ts.map +1 -0
- package/lib.esm/providers/signer-noncemanager.js +74 -0
- package/lib.esm/providers/signer-noncemanager.js.map +1 -0
- package/lib.esm/providers/signer.d.ts +118 -0
- package/lib.esm/providers/signer.d.ts.map +1 -0
- package/lib.esm/providers/signer.js +2 -0
- package/lib.esm/providers/signer.js.map +1 -0
- package/lib.esm/providers/subscriber-connection.d.ts +25 -0
- package/lib.esm/providers/subscriber-connection.d.ts.map +1 -0
- package/lib.esm/providers/subscriber-connection.js +52 -0
- package/lib.esm/providers/subscriber-connection.js.map +1 -0
- package/lib.esm/providers/subscriber-filterid.d.ts +64 -0
- package/lib.esm/providers/subscriber-filterid.d.ts.map +1 -0
- package/lib.esm/providers/subscriber-filterid.js +171 -0
- package/lib.esm/providers/subscriber-filterid.js.map +1 -0
- package/lib.esm/providers/subscriber-polling.d.ts +94 -0
- package/lib.esm/providers/subscriber-polling.d.ts.map +1 -0
- package/lib.esm/providers/subscriber-polling.js +265 -0
- package/lib.esm/providers/subscriber-polling.js.map +1 -0
- package/lib.esm/providers/ws-browser.d.ts +3 -0
- package/lib.esm/providers/ws-browser.d.ts.map +1 -0
- package/lib.esm/providers/ws-browser.js +16 -0
- package/lib.esm/providers/ws-browser.js.map +1 -0
- package/lib.esm/providers/ws.d.ts +2 -0
- package/lib.esm/providers/ws.d.ts.map +1 -0
- package/lib.esm/providers/ws.js +2 -0
- package/lib.esm/providers/ws.js.map +1 -0
- package/lib.esm/transaction/accesslist.d.ts +6 -0
- package/lib.esm/transaction/accesslist.d.ts.map +1 -0
- package/lib.esm/transaction/accesslist.js +37 -0
- package/lib.esm/transaction/accesslist.js.map +1 -0
- package/lib.esm/transaction/address.d.ts +15 -0
- package/lib.esm/transaction/address.d.ts.map +1 -0
- package/lib.esm/transaction/address.js +25 -0
- package/lib.esm/transaction/address.js.map +1 -0
- package/lib.esm/transaction/index.d.ts +25 -0
- package/lib.esm/transaction/index.d.ts.map +1 -0
- package/lib.esm/transaction/index.js +10 -0
- package/lib.esm/transaction/index.js.map +1 -0
- package/lib.esm/transaction/transaction.d.ts +269 -0
- package/lib.esm/transaction/transaction.d.ts.map +1 -0
- package/lib.esm/transaction/transaction.js +704 -0
- package/lib.esm/transaction/transaction.js.map +1 -0
- package/lib.esm/utils/base58.d.ts +23 -0
- package/lib.esm/utils/base58.d.ts.map +1 -0
- package/lib.esm/utils/base58.js +55 -0
- package/lib.esm/utils/base58.js.map +1 -0
- package/lib.esm/utils/base64-browser.d.ts +4 -0
- package/lib.esm/utils/base64-browser.d.ts.map +1 -0
- package/lib.esm/utils/base64-browser.js +19 -0
- package/lib.esm/utils/base64-browser.js.map +1 -0
- package/lib.esm/utils/base64.d.ts +40 -0
- package/lib.esm/utils/base64.d.ts.map +1 -0
- package/lib.esm/utils/base64.js +53 -0
- package/lib.esm/utils/base64.js.map +1 -0
- package/lib.esm/utils/data.d.ts +93 -0
- package/lib.esm/utils/data.d.ts.map +1 -0
- package/lib.esm/utils/data.js +170 -0
- package/lib.esm/utils/data.js.map +1 -0
- package/lib.esm/utils/errors.d.ts +505 -0
- package/lib.esm/utils/errors.d.ts.map +1 -0
- package/lib.esm/utils/errors.js +217 -0
- package/lib.esm/utils/errors.js.map +1 -0
- package/lib.esm/utils/events.d.ts +77 -0
- package/lib.esm/utils/events.d.ts.map +1 -0
- package/lib.esm/utils/events.js +42 -0
- package/lib.esm/utils/events.js.map +1 -0
- package/lib.esm/utils/fetch.d.ts +334 -0
- package/lib.esm/utils/fetch.d.ts.map +1 -0
- package/lib.esm/utils/fetch.js +798 -0
- package/lib.esm/utils/fetch.js.map +1 -0
- package/lib.esm/utils/fixednumber.d.ts +252 -0
- package/lib.esm/utils/fixednumber.d.ts.map +1 -0
- package/lib.esm/utils/fixednumber.js +526 -0
- package/lib.esm/utils/fixednumber.js.map +1 -0
- package/lib.esm/utils/geturl-browser.d.ts +21 -0
- package/lib.esm/utils/geturl-browser.d.ts.map +1 -0
- package/lib.esm/utils/geturl-browser.js +37 -0
- package/lib.esm/utils/geturl-browser.js.map +1 -0
- package/lib.esm/utils/geturl.d.ts +6 -0
- package/lib.esm/utils/geturl.d.ts.map +1 -0
- package/lib.esm/utils/geturl.js +78 -0
- package/lib.esm/utils/geturl.js.map +1 -0
- package/lib.esm/utils/index.d.ts +30 -0
- package/lib.esm/utils/index.d.ts.map +1 -0
- package/lib.esm/utils/index.js +22 -0
- package/lib.esm/utils/index.js.map +1 -0
- package/lib.esm/utils/maths.d.ts +66 -0
- package/lib.esm/utils/maths.d.ts.map +1 -0
- package/lib.esm/utils/maths.js +215 -0
- package/lib.esm/utils/maths.js.map +1 -0
- package/lib.esm/utils/properties.d.ts +23 -0
- package/lib.esm/utils/properties.d.ts.map +1 -0
- package/lib.esm/utils/properties.js +54 -0
- package/lib.esm/utils/properties.js.map +1 -0
- package/lib.esm/utils/rlp-decode.d.ts +6 -0
- package/lib.esm/utils/rlp-decode.d.ts.map +1 -0
- package/lib.esm/utils/rlp-decode.js +79 -0
- package/lib.esm/utils/rlp-decode.js.map +1 -0
- package/lib.esm/utils/rlp-encode.d.ts +6 -0
- package/lib.esm/utils/rlp-encode.d.ts.map +1 -0
- package/lib.esm/utils/rlp-encode.js +49 -0
- package/lib.esm/utils/rlp-encode.js.map +1 -0
- package/lib.esm/utils/rlp.d.ts +13 -0
- package/lib.esm/utils/rlp.d.ts.map +1 -0
- package/lib.esm/utils/rlp.js +9 -0
- package/lib.esm/utils/rlp.js.map +1 -0
- package/lib.esm/utils/units.d.ts +24 -0
- package/lib.esm/utils/units.d.ts.map +1 -0
- package/lib.esm/utils/units.js +83 -0
- package/lib.esm/utils/units.js.map +1 -0
- package/lib.esm/utils/utf8.d.ts +96 -0
- package/lib.esm/utils/utf8.d.ts.map +1 -0
- package/lib.esm/utils/utf8.js +220 -0
- package/lib.esm/utils/utf8.js.map +1 -0
- package/lib.esm/utils/uuid.d.ts +8 -0
- package/lib.esm/utils/uuid.d.ts.map +1 -0
- package/lib.esm/utils/uuid.js +30 -0
- package/lib.esm/utils/uuid.js.map +1 -0
- package/lib.esm/wallet/base-wallet.d.ts +48 -0
- package/lib.esm/wallet/base-wallet.d.ts.map +1 -0
- package/lib.esm/wallet/base-wallet.js +101 -0
- package/lib.esm/wallet/base-wallet.js.map +1 -0
- package/lib.esm/wallet/hdwallet.d.ts +248 -0
- package/lib.esm/wallet/hdwallet.d.ts.map +1 -0
- package/lib.esm/wallet/hdwallet.js +498 -0
- package/lib.esm/wallet/hdwallet.js.map +1 -0
- package/lib.esm/wallet/index.d.ts +27 -0
- package/lib.esm/wallet/index.d.ts.map +1 -0
- package/lib.esm/wallet/index.js +25 -0
- package/lib.esm/wallet/index.js.map +1 -0
- package/lib.esm/wallet/json-crowdsale.d.ts +27 -0
- package/lib.esm/wallet/json-crowdsale.d.ts.map +1 -0
- package/lib.esm/wallet/json-crowdsale.js +55 -0
- package/lib.esm/wallet/json-crowdsale.js.map +1 -0
- package/lib.esm/wallet/json-keystore.d.ts +89 -0
- package/lib.esm/wallet/json-keystore.d.ts.map +1 -0
- package/lib.esm/wallet/json-keystore.js +287 -0
- package/lib.esm/wallet/json-keystore.js.map +1 -0
- package/lib.esm/wallet/mnemonic.d.ts +65 -0
- package/lib.esm/wallet/mnemonic.d.ts.map +1 -0
- package/lib.esm/wallet/mnemonic.js +165 -0
- package/lib.esm/wallet/mnemonic.js.map +1 -0
- package/lib.esm/wallet/utils.d.ts +8 -0
- package/lib.esm/wallet/utils.d.ts.map +1 -0
- package/lib.esm/wallet/utils.js +142 -0
- package/lib.esm/wallet/utils.js.map +1 -0
- package/lib.esm/wallet/wallet.d.ts +71 -0
- package/lib.esm/wallet/wallet.d.ts.map +1 -0
- package/lib.esm/wallet/wallet.js +144 -0
- package/lib.esm/wallet/wallet.js.map +1 -0
- package/lib.esm/wordlists/bit-reader.d.ts +5 -0
- package/lib.esm/wordlists/bit-reader.d.ts.map +1 -0
- package/lib.esm/wordlists/bit-reader.js +32 -0
- package/lib.esm/wordlists/bit-reader.js.map +1 -0
- package/lib.esm/wordlists/decode-owl.d.ts +9 -0
- package/lib.esm/wordlists/decode-owl.d.ts.map +1 -0
- package/lib.esm/wordlists/decode-owl.js +55 -0
- package/lib.esm/wordlists/decode-owl.js.map +1 -0
- package/lib.esm/wordlists/decode-owla.d.ts +5 -0
- package/lib.esm/wordlists/decode-owla.d.ts.map +1 -0
- package/lib.esm/wordlists/decode-owla.js +28 -0
- package/lib.esm/wordlists/decode-owla.js.map +1 -0
- package/lib.esm/wordlists/generation/encode-latin.d.ts +25 -0
- package/lib.esm/wordlists/generation/encode-latin.d.ts.map +1 -0
- package/lib.esm/wordlists/generation/encode-latin.js +344 -0
- package/lib.esm/wordlists/generation/encode-latin.js.map +1 -0
- package/lib.esm/wordlists/index.d.ts +25 -0
- package/lib.esm/wordlists/index.d.ts.map +1 -0
- package/lib.esm/wordlists/index.js +25 -0
- package/lib.esm/wordlists/index.js.map +1 -0
- package/lib.esm/wordlists/lang-cz.d.ts +23 -0
- package/lib.esm/wordlists/lang-cz.d.ts.map +1 -0
- package/lib.esm/wordlists/lang-cz.js +31 -0
- package/lib.esm/wordlists/lang-cz.js.map +1 -0
- package/lib.esm/wordlists/lang-en.d.ts +23 -0
- package/lib.esm/wordlists/lang-en.d.ts.map +1 -0
- package/lib.esm/wordlists/lang-en.js +31 -0
- package/lib.esm/wordlists/lang-en.js.map +1 -0
- package/lib.esm/wordlists/lang-es.d.ts +23 -0
- package/lib.esm/wordlists/lang-es.d.ts.map +1 -0
- package/lib.esm/wordlists/lang-es.js +32 -0
- package/lib.esm/wordlists/lang-es.js.map +1 -0
- package/lib.esm/wordlists/lang-fr.d.ts +23 -0
- package/lib.esm/wordlists/lang-fr.d.ts.map +1 -0
- package/lib.esm/wordlists/lang-fr.js +32 -0
- package/lib.esm/wordlists/lang-fr.js.map +1 -0
- package/lib.esm/wordlists/lang-it.d.ts +23 -0
- package/lib.esm/wordlists/lang-it.d.ts.map +1 -0
- package/lib.esm/wordlists/lang-it.js +31 -0
- package/lib.esm/wordlists/lang-it.js.map +1 -0
- package/lib.esm/wordlists/lang-ja.d.ts +27 -0
- package/lib.esm/wordlists/lang-ja.d.ts.map +1 -0
- package/lib.esm/wordlists/lang-ja.js +154 -0
- package/lib.esm/wordlists/lang-ja.js.map +1 -0
- package/lib.esm/wordlists/lang-ko.d.ts +25 -0
- package/lib.esm/wordlists/lang-ko.d.ts.map +1 -0
- package/lib.esm/wordlists/lang-ko.js +89 -0
- package/lib.esm/wordlists/lang-ko.js.map +1 -0
- package/lib.esm/wordlists/lang-pt.d.ts +23 -0
- package/lib.esm/wordlists/lang-pt.d.ts.map +1 -0
- package/lib.esm/wordlists/lang-pt.js +31 -0
- package/lib.esm/wordlists/lang-pt.js.map +1 -0
- package/lib.esm/wordlists/lang-zh.d.ts +32 -0
- package/lib.esm/wordlists/lang-zh.d.ts.map +1 -0
- package/lib.esm/wordlists/lang-zh.js +92 -0
- package/lib.esm/wordlists/lang-zh.js.map +1 -0
- package/lib.esm/wordlists/wordlist-owl.d.ts +32 -0
- package/lib.esm/wordlists/wordlist-owl.d.ts.map +1 -0
- package/lib.esm/wordlists/wordlist-owl.js +66 -0
- package/lib.esm/wordlists/wordlist-owl.js.map +1 -0
- package/lib.esm/wordlists/wordlist-owla.d.ts +30 -0
- package/lib.esm/wordlists/wordlist-owla.d.ts.map +1 -0
- package/lib.esm/wordlists/wordlist-owla.js +36 -0
- package/lib.esm/wordlists/wordlist-owla.js.map +1 -0
- package/lib.esm/wordlists/wordlist.d.ts +47 -0
- package/lib.esm/wordlists/wordlist.d.ts.map +1 -0
- package/lib.esm/wordlists/wordlist.js +42 -0
- package/lib.esm/wordlists/wordlist.js.map +1 -0
- package/lib.esm/wordlists/wordlists-browser.d.ts +3 -0
- package/lib.esm/wordlists/wordlists-browser.d.ts.map +1 -0
- package/lib.esm/wordlists/wordlists-browser.js +5 -0
- package/lib.esm/wordlists/wordlists-browser.js.map +1 -0
- package/lib.esm/wordlists/wordlists-extra.d.ts +9 -0
- package/lib.esm/wordlists/wordlists-extra.d.ts.map +1 -0
- package/lib.esm/wordlists/wordlists-extra.js +9 -0
- package/lib.esm/wordlists/wordlists-extra.js.map +1 -0
- package/lib.esm/wordlists/wordlists.d.ts +16 -0
- package/lib.esm/wordlists/wordlists.d.ts.map +1 -0
- package/lib.esm/wordlists/wordlists.js +35 -0
- package/lib.esm/wordlists/wordlists.js.map +1 -0
- package/package.json +135 -6
- package/rollup.config.mjs +50 -0
- package/src.ts/_version.ts +6 -0
- package/src.ts/abi/abi-coder.ts +232 -0
- package/src.ts/abi/bytes32.ts +45 -0
- package/src.ts/abi/coders/abstract-coder.ts +467 -0
- package/src.ts/abi/coders/address.ts +36 -0
- package/src.ts/abi/coders/anonymous.ts +29 -0
- package/src.ts/abi/coders/array.ts +199 -0
- package/src.ts/abi/coders/boolean.ts +27 -0
- package/src.ts/abi/coders/bytes.ts +43 -0
- package/src.ts/abi/coders/fixed-bytes.ts +37 -0
- package/src.ts/abi/coders/null.ts +28 -0
- package/src.ts/abi/coders/number.ts +63 -0
- package/src.ts/abi/coders/string.ts +29 -0
- package/src.ts/abi/coders/tuple.ts +69 -0
- package/src.ts/abi/fragments.ts +1615 -0
- package/src.ts/abi/index.ts +41 -0
- package/src.ts/abi/interface.ts +1266 -0
- package/src.ts/abi/typed.ts +796 -0
- package/src.ts/address/address.ts +173 -0
- package/src.ts/address/checks.ts +123 -0
- package/src.ts/address/contract-address.ts +80 -0
- package/src.ts/address/index.ts +57 -0
- package/src.ts/constants/addresses.ts +8 -0
- package/src.ts/constants/hashes.ts +7 -0
- package/src.ts/constants/index.ts +16 -0
- package/src.ts/constants/numbers.ts +35 -0
- package/src.ts/constants/strings.ts +16 -0
- package/src.ts/contract/contract.ts +1106 -0
- package/src.ts/contract/factory.ts +143 -0
- package/src.ts/contract/index.ts +31 -0
- package/src.ts/contract/types.ts +236 -0
- package/src.ts/contract/wrappers.ts +225 -0
- package/src.ts/crypto/crypto-browser.ts +64 -0
- package/src.ts/crypto/crypto.ts +4 -0
- package/src.ts/crypto/hmac.ts +51 -0
- package/src.ts/crypto/index.ts +59 -0
- package/src.ts/crypto/keccak.ts +54 -0
- package/src.ts/crypto/pbkdf2.ts +55 -0
- package/src.ts/crypto/random.ts +36 -0
- package/src.ts/crypto/ripemd160.ts +43 -0
- package/src.ts/crypto/scrypt.ts +114 -0
- package/src.ts/crypto/sha2.ts +78 -0
- package/src.ts/crypto/signature.ts +363 -0
- package/src.ts/crypto/signing-key.ts +204 -0
- package/src.ts/ethers.ts +210 -0
- package/src.ts/hash/id.ts +17 -0
- package/src.ts/hash/index.ts +16 -0
- package/src.ts/hash/message.ts +51 -0
- package/src.ts/hash/namehash.ts +98 -0
- package/src.ts/hash/solidity.ts +117 -0
- package/src.ts/hash/typed-data.ts +615 -0
- package/src.ts/index.ts +12 -0
- package/src.ts/providers/abstract-provider.ts +1727 -0
- package/src.ts/providers/abstract-signer.ts +288 -0
- package/src.ts/providers/community.ts +49 -0
- package/src.ts/providers/contracts.ts +42 -0
- package/src.ts/providers/default-provider.ts +142 -0
- package/src.ts/providers/ens-resolver.ts +606 -0
- package/src.ts/providers/format.ts +293 -0
- package/src.ts/providers/formatting.ts +356 -0
- package/src.ts/providers/index.ts +132 -0
- package/src.ts/providers/network.ts +450 -0
- package/src.ts/providers/pagination.ts +8 -0
- package/src.ts/providers/plugin-fallback.ts +35 -0
- package/src.ts/providers/plugins-network.ts +281 -0
- package/src.ts/providers/provider-alchemy.ts +134 -0
- package/src.ts/providers/provider-ankr.ts +122 -0
- package/src.ts/providers/provider-browser.ts +142 -0
- package/src.ts/providers/provider-cloudflare.ts +24 -0
- package/src.ts/providers/provider-etherscan.ts +608 -0
- package/src.ts/providers/provider-fallback.ts +755 -0
- package/src.ts/providers/provider-infura.ts +190 -0
- package/src.ts/providers/provider-ipcsocket-browser.ts +3 -0
- package/src.ts/providers/provider-ipcsocket.ts +78 -0
- package/src.ts/providers/provider-jsonrpc.ts +1223 -0
- package/src.ts/providers/provider-pocket.ts +121 -0
- package/src.ts/providers/provider-quicknode.ts +121 -0
- package/src.ts/providers/provider-socket.ts +334 -0
- package/src.ts/providers/provider-websocket.ts +102 -0
- package/src.ts/providers/provider.ts +1986 -0
- package/src.ts/providers/signer-noncemanager.ts +98 -0
- package/src.ts/providers/signer.ts +149 -0
- package/src.ts/providers/subscriber-connection.ts +74 -0
- package/src.ts/providers/subscriber-filterid.ts +198 -0
- package/src.ts/providers/subscriber-polling.ts +291 -0
- package/src.ts/providers/ws-browser.ts +11 -0
- package/src.ts/providers/ws.ts +3 -0
- package/src.ts/runner.ps1 +45 -0
- package/src.ts/thirdparty.d.ts +16 -0
- package/src.ts/transaction/accesslist.ts +43 -0
- package/src.ts/transaction/address.ts +28 -0
- package/src.ts/transaction/index.ts +31 -0
- package/src.ts/transaction/transaction.ts +823 -0
- package/src.ts/utils/base58.ts +64 -0
- package/src.ts/utils/base64-browser.ts +25 -0
- package/src.ts/utils/base64.ts +56 -0
- package/src.ts/utils/data.ts +199 -0
- package/src.ts/utils/errors.ts +780 -0
- package/src.ts/utils/events.ts +105 -0
- package/src.ts/utils/fetch.ts +913 -0
- package/src.ts/utils/fixednumber.ts +643 -0
- package/src.ts/utils/geturl-browser.ts +72 -0
- package/src.ts/utils/geturl.ts +96 -0
- package/src.ts/utils/index.ts +95 -0
- package/src.ts/utils/maths.ts +240 -0
- package/src.ts/utils/properties.ts +60 -0
- package/src.ts/utils/rlp-decode.ts +104 -0
- package/src.ts/utils/rlp-encode.ts +64 -0
- package/src.ts/utils/rlp.ts +15 -0
- package/src.ts/utils/test.txt +0 -0
- package/src.ts/utils/units.ts +91 -0
- package/src.ts/utils/utf8.ts +324 -0
- package/src.ts/utils/uuid.ts +36 -0
- package/src.ts/wallet/base-wallet.ts +130 -0
- package/src.ts/wallet/hdwallet.ts +583 -0
- package/src.ts/wallet/index.ts +47 -0
- package/src.ts/wallet/json-crowdsale.ts +74 -0
- package/src.ts/wallet/json-keystore.ts +389 -0
- package/src.ts/wallet/mnemonic.ts +203 -0
- package/src.ts/wallet/utils.ts +147 -0
- package/src.ts/wallet/wallet.ts +163 -0
- package/src.ts/wordlists/bit-reader.ts +35 -0
- package/src.ts/wordlists/decode-owl.ts +58 -0
- package/src.ts/wordlists/decode-owla.ts +33 -0
- package/src.ts/wordlists/generation/encode-latin.ts +370 -0
- package/src.ts/wordlists/index.ts +26 -0
- package/src.ts/wordlists/lang-cz.ts +33 -0
- package/src.ts/wordlists/lang-en.ts +33 -0
- package/src.ts/wordlists/lang-es.ts +35 -0
- package/src.ts/wordlists/lang-fr.ts +34 -0
- package/src.ts/wordlists/lang-it.ts +33 -0
- package/src.ts/wordlists/lang-ja.ts +181 -0
- package/src.ts/wordlists/lang-ko.ts +104 -0
- package/src.ts/wordlists/lang-pt.ts +34 -0
- package/src.ts/wordlists/lang-zh.ts +112 -0
- package/src.ts/wordlists/wordlist-owl.ts +77 -0
- package/src.ts/wordlists/wordlist-owla.ts +41 -0
- package/src.ts/wordlists/wordlist.ts +59 -0
- package/src.ts/wordlists/wordlists-browser.ts +8 -0
- package/src.ts/wordlists/wordlists-extra.ts +9 -0
- package/src.ts/wordlists/wordlists.ts +38 -0
|
@@ -0,0 +1,1217 @@
|
|
|
1
|
+
//import { resolveAddress } from "@ethersproject/address";
|
|
2
|
+
import { defineProperties, getBigInt, getNumber, hexlify, resolveProperties, assert, assertArgument, isError, makeError } from "../utils/index.js";
|
|
3
|
+
import { accessListify } from "../transaction/index.js";
|
|
4
|
+
const BN_0 = BigInt(0);
|
|
5
|
+
// -----------------------
|
|
6
|
+
function getValue(value) {
|
|
7
|
+
if (value == null) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
return value;
|
|
11
|
+
}
|
|
12
|
+
function toJson(value) {
|
|
13
|
+
if (value == null) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
return value.toString();
|
|
17
|
+
}
|
|
18
|
+
// @TODO? <T extends FeeData = { }> implements Required<T>
|
|
19
|
+
/**
|
|
20
|
+
* A **FeeData** wraps all the fee-related values associated with
|
|
21
|
+
* the network.
|
|
22
|
+
*/
|
|
23
|
+
export class FeeData {
|
|
24
|
+
/**
|
|
25
|
+
* The gas price for legacy networks.
|
|
26
|
+
*/
|
|
27
|
+
gasPrice;
|
|
28
|
+
/**
|
|
29
|
+
* The maximum fee to pay per gas.
|
|
30
|
+
*
|
|
31
|
+
* The base fee per gas is defined by the network and based on
|
|
32
|
+
* congestion, increasing the cost during times of heavy load
|
|
33
|
+
* and lowering when less busy.
|
|
34
|
+
*
|
|
35
|
+
* The actual fee per gas will be the base fee for the block
|
|
36
|
+
* and the priority fee, up to the max fee per gas.
|
|
37
|
+
*
|
|
38
|
+
* This will be ``null`` on legacy networks (i.e. [pre-EIP-1559](link-eip-1559))
|
|
39
|
+
*/
|
|
40
|
+
maxFeePerGas;
|
|
41
|
+
/**
|
|
42
|
+
* The additional amout to pay per gas to encourage a validator
|
|
43
|
+
* to include the transaction.
|
|
44
|
+
*
|
|
45
|
+
* The purpose of this is to compensate the validator for the
|
|
46
|
+
* adjusted risk for including a given transaction.
|
|
47
|
+
*
|
|
48
|
+
* This will be ``null`` on legacy networks (i.e. [pre-EIP-1559](link-eip-1559))
|
|
49
|
+
*/
|
|
50
|
+
maxPriorityFeePerGas;
|
|
51
|
+
/**
|
|
52
|
+
* Creates a new FeeData for %%gasPrice%%, %%maxFeePerGas%% and
|
|
53
|
+
* %%maxPriorityFeePerGas%%.
|
|
54
|
+
*/
|
|
55
|
+
constructor(gasPrice, maxFeePerGas, maxPriorityFeePerGas) {
|
|
56
|
+
defineProperties(this, {
|
|
57
|
+
gasPrice: getValue(gasPrice),
|
|
58
|
+
maxFeePerGas: getValue(maxFeePerGas),
|
|
59
|
+
maxPriorityFeePerGas: getValue(maxPriorityFeePerGas)
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Returns a JSON-friendly value.
|
|
64
|
+
*/
|
|
65
|
+
toJSON() {
|
|
66
|
+
const { gasPrice, maxFeePerGas, maxPriorityFeePerGas } = this;
|
|
67
|
+
return {
|
|
68
|
+
_type: "FeeData",
|
|
69
|
+
gasPrice: toJson(gasPrice),
|
|
70
|
+
maxFeePerGas: toJson(maxFeePerGas),
|
|
71
|
+
maxPriorityFeePerGas: toJson(maxPriorityFeePerGas),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
;
|
|
76
|
+
/**
|
|
77
|
+
* Returns a copy of %%req%% with all properties coerced to their strict
|
|
78
|
+
* types.
|
|
79
|
+
*/
|
|
80
|
+
export function copyRequest(req) {
|
|
81
|
+
const result = {};
|
|
82
|
+
// These could be addresses, ENS names or Addressables
|
|
83
|
+
if (req.to) {
|
|
84
|
+
result.to = req.to;
|
|
85
|
+
}
|
|
86
|
+
if (req.from) {
|
|
87
|
+
result.from = req.from;
|
|
88
|
+
}
|
|
89
|
+
if (req.data) {
|
|
90
|
+
result.data = hexlify(req.data);
|
|
91
|
+
}
|
|
92
|
+
const bigIntKeys = "chainId,gasLimit,gasPrice,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);
|
|
93
|
+
for (const key of bigIntKeys) {
|
|
94
|
+
if (!(key in req) || req[key] == null) {
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
result[key] = getBigInt(req[key], `request.${key}`);
|
|
98
|
+
}
|
|
99
|
+
const numberKeys = "type,nonce".split(/,/);
|
|
100
|
+
for (const key of numberKeys) {
|
|
101
|
+
if (!(key in req) || req[key] == null) {
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
result[key] = getNumber(req[key], `request.${key}`);
|
|
105
|
+
}
|
|
106
|
+
if (req.accessList) {
|
|
107
|
+
result.accessList = accessListify(req.accessList);
|
|
108
|
+
}
|
|
109
|
+
if ("blockTag" in req) {
|
|
110
|
+
result.blockTag = req.blockTag;
|
|
111
|
+
}
|
|
112
|
+
if ("enableCcipRead" in req) {
|
|
113
|
+
result.enableCcipRead = !!req.enableCcipRead;
|
|
114
|
+
}
|
|
115
|
+
if ("customData" in req) {
|
|
116
|
+
result.customData = req.customData;
|
|
117
|
+
}
|
|
118
|
+
return result;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* A **Block** represents the data associated with a full block on
|
|
122
|
+
* Ethereum.
|
|
123
|
+
*/
|
|
124
|
+
export class Block {
|
|
125
|
+
/**
|
|
126
|
+
* The provider connected to the block used to fetch additional details
|
|
127
|
+
* if necessary.
|
|
128
|
+
*/
|
|
129
|
+
provider;
|
|
130
|
+
/**
|
|
131
|
+
* The block number, sometimes called the block height. This is a
|
|
132
|
+
* sequential number that is one higher than the parent block.
|
|
133
|
+
*/
|
|
134
|
+
number;
|
|
135
|
+
/**
|
|
136
|
+
* The block hash.
|
|
137
|
+
*
|
|
138
|
+
* This hash includes all properties, so can be safely used to identify
|
|
139
|
+
* an exact set of block properties.
|
|
140
|
+
*/
|
|
141
|
+
hash;
|
|
142
|
+
/**
|
|
143
|
+
* The timestamp for this block, which is the number of seconds since
|
|
144
|
+
* epoch that this block was included.
|
|
145
|
+
*/
|
|
146
|
+
timestamp;
|
|
147
|
+
/**
|
|
148
|
+
* The block hash of the parent block.
|
|
149
|
+
*/
|
|
150
|
+
parentHash;
|
|
151
|
+
/**
|
|
152
|
+
* The nonce.
|
|
153
|
+
*
|
|
154
|
+
* On legacy networks, this is the random number inserted which
|
|
155
|
+
* permitted the difficulty target to be reached.
|
|
156
|
+
*/
|
|
157
|
+
nonce;
|
|
158
|
+
/**
|
|
159
|
+
* The difficulty target.
|
|
160
|
+
*
|
|
161
|
+
* On legacy networks, this is the proof-of-work target required
|
|
162
|
+
* for a block to meet the protocol rules to be included.
|
|
163
|
+
*
|
|
164
|
+
* On modern networks, this is a random number arrived at using
|
|
165
|
+
* randao. @TODO: Find links?
|
|
166
|
+
*/
|
|
167
|
+
difficulty;
|
|
168
|
+
/**
|
|
169
|
+
* The total gas limit for this block.
|
|
170
|
+
*/
|
|
171
|
+
gasLimit;
|
|
172
|
+
/**
|
|
173
|
+
* The total gas used in this block.
|
|
174
|
+
*/
|
|
175
|
+
gasUsed;
|
|
176
|
+
/**
|
|
177
|
+
* The miner coinbase address, wihch receives any subsidies for
|
|
178
|
+
* including this block.
|
|
179
|
+
*/
|
|
180
|
+
miner;
|
|
181
|
+
/**
|
|
182
|
+
* Any extra data the validator wished to include.
|
|
183
|
+
*/
|
|
184
|
+
extraData;
|
|
185
|
+
/**
|
|
186
|
+
* The base fee per gas that all transactions in this block were
|
|
187
|
+
* charged.
|
|
188
|
+
*
|
|
189
|
+
* This adjusts after each block, depending on how congested the network
|
|
190
|
+
* is.
|
|
191
|
+
*/
|
|
192
|
+
baseFeePerGas;
|
|
193
|
+
#transactions;
|
|
194
|
+
/**
|
|
195
|
+
* Create a new **Block** object.
|
|
196
|
+
*
|
|
197
|
+
* This should generally not be necessary as the unless implementing a
|
|
198
|
+
* low-level library.
|
|
199
|
+
*/
|
|
200
|
+
constructor(block, provider) {
|
|
201
|
+
this.#transactions = block.transactions.map((tx) => {
|
|
202
|
+
if (typeof (tx) !== "string") {
|
|
203
|
+
return new TransactionResponse(tx, provider);
|
|
204
|
+
}
|
|
205
|
+
return tx;
|
|
206
|
+
});
|
|
207
|
+
defineProperties(this, {
|
|
208
|
+
provider,
|
|
209
|
+
hash: getValue(block.hash),
|
|
210
|
+
number: block.number,
|
|
211
|
+
timestamp: block.timestamp,
|
|
212
|
+
parentHash: block.parentHash,
|
|
213
|
+
nonce: block.nonce,
|
|
214
|
+
difficulty: block.difficulty,
|
|
215
|
+
gasLimit: block.gasLimit,
|
|
216
|
+
gasUsed: block.gasUsed,
|
|
217
|
+
miner: block.miner,
|
|
218
|
+
extraData: block.extraData,
|
|
219
|
+
baseFeePerGas: getValue(block.baseFeePerGas)
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Returns the list of transaction hashes.
|
|
224
|
+
*/
|
|
225
|
+
get transactions() {
|
|
226
|
+
return this.#transactions.map((tx) => {
|
|
227
|
+
if (typeof (tx) === "string") {
|
|
228
|
+
return tx;
|
|
229
|
+
}
|
|
230
|
+
return tx.hash;
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Returns the complete transactions for blocks which
|
|
235
|
+
* prefetched them, by passing ``true`` to %%prefetchTxs%%
|
|
236
|
+
* into [[Provider-getBlock]].
|
|
237
|
+
*/
|
|
238
|
+
get prefetchedTransactions() {
|
|
239
|
+
const txs = this.#transactions.slice();
|
|
240
|
+
// Doesn't matter...
|
|
241
|
+
if (txs.length === 0) {
|
|
242
|
+
return [];
|
|
243
|
+
}
|
|
244
|
+
// Make sure we prefetched the transactions
|
|
245
|
+
assert(typeof (txs[0]) === "object", "transactions were not prefetched with block request", "UNSUPPORTED_OPERATION", {
|
|
246
|
+
operation: "transactionResponses()"
|
|
247
|
+
});
|
|
248
|
+
return txs;
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Returns a JSON-friendly value.
|
|
252
|
+
*/
|
|
253
|
+
toJSON() {
|
|
254
|
+
const { baseFeePerGas, difficulty, extraData, gasLimit, gasUsed, hash, miner, nonce, number, parentHash, timestamp, transactions } = this;
|
|
255
|
+
return {
|
|
256
|
+
_type: "Block",
|
|
257
|
+
baseFeePerGas: toJson(baseFeePerGas),
|
|
258
|
+
difficulty: toJson(difficulty),
|
|
259
|
+
extraData,
|
|
260
|
+
gasLimit: toJson(gasLimit),
|
|
261
|
+
gasUsed: toJson(gasUsed),
|
|
262
|
+
hash, miner, nonce, number, parentHash, timestamp,
|
|
263
|
+
transactions,
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
[Symbol.iterator]() {
|
|
267
|
+
let index = 0;
|
|
268
|
+
const txs = this.transactions;
|
|
269
|
+
return {
|
|
270
|
+
next: () => {
|
|
271
|
+
if (index < this.length) {
|
|
272
|
+
return {
|
|
273
|
+
value: txs[index++], done: false
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
return { value: undefined, done: true };
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* The number of transactions in this block.
|
|
282
|
+
*/
|
|
283
|
+
get length() { return this.#transactions.length; }
|
|
284
|
+
/**
|
|
285
|
+
* The [[link-js-date]] this block was included at.
|
|
286
|
+
*/
|
|
287
|
+
get date() {
|
|
288
|
+
if (this.timestamp == null) {
|
|
289
|
+
return null;
|
|
290
|
+
}
|
|
291
|
+
return new Date(this.timestamp * 1000);
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Get the transaction at %%indexe%% within this block.
|
|
295
|
+
*/
|
|
296
|
+
async getTransaction(indexOrHash) {
|
|
297
|
+
// Find the internal value by its index or hash
|
|
298
|
+
let tx = undefined;
|
|
299
|
+
if (typeof (indexOrHash) === "number") {
|
|
300
|
+
tx = this.#transactions[indexOrHash];
|
|
301
|
+
}
|
|
302
|
+
else {
|
|
303
|
+
const hash = indexOrHash.toLowerCase();
|
|
304
|
+
for (const v of this.#transactions) {
|
|
305
|
+
if (typeof (v) === "string") {
|
|
306
|
+
if (v !== hash) {
|
|
307
|
+
continue;
|
|
308
|
+
}
|
|
309
|
+
tx = v;
|
|
310
|
+
break;
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
if (v.hash === hash) {
|
|
314
|
+
continue;
|
|
315
|
+
}
|
|
316
|
+
tx = v;
|
|
317
|
+
break;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
if (tx == null) {
|
|
322
|
+
throw new Error("no such tx");
|
|
323
|
+
}
|
|
324
|
+
if (typeof (tx) === "string") {
|
|
325
|
+
return (await this.provider.getTransaction(tx));
|
|
326
|
+
}
|
|
327
|
+
else {
|
|
328
|
+
return tx;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* If a **Block** was fetched with a request to include the transactions
|
|
333
|
+
* this will allow synchronous access to those transactions.
|
|
334
|
+
*
|
|
335
|
+
* If the transactions were not prefetched, this will throw.
|
|
336
|
+
*/
|
|
337
|
+
getPrefetchedTransaction(indexOrHash) {
|
|
338
|
+
const txs = this.prefetchedTransactions;
|
|
339
|
+
if (typeof (indexOrHash) === "number") {
|
|
340
|
+
return txs[indexOrHash];
|
|
341
|
+
}
|
|
342
|
+
indexOrHash = indexOrHash.toLowerCase();
|
|
343
|
+
for (const tx of txs) {
|
|
344
|
+
if (tx.hash === indexOrHash) {
|
|
345
|
+
return tx;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
assertArgument(false, "no matching transaction", "indexOrHash", indexOrHash);
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Returns true if this block been mined. This provides a type guard
|
|
352
|
+
* for all properties on a [[MinedBlock]].
|
|
353
|
+
*/
|
|
354
|
+
isMined() { return !!this.hash; }
|
|
355
|
+
/**
|
|
356
|
+
* Returns true if this block is an [[link-eip-2930]] block.
|
|
357
|
+
*/
|
|
358
|
+
isLondon() {
|
|
359
|
+
return !!this.baseFeePerGas;
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* @_ignore:
|
|
363
|
+
*/
|
|
364
|
+
orphanedEvent() {
|
|
365
|
+
if (!this.isMined()) {
|
|
366
|
+
throw new Error("");
|
|
367
|
+
}
|
|
368
|
+
return createOrphanedBlockFilter(this);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
//////////////////////
|
|
372
|
+
// Log
|
|
373
|
+
/**
|
|
374
|
+
* A **Log** in Ethereum represents an event that has been included in a
|
|
375
|
+
* transaction using the ``LOG*`` opcodes, which are most commonly used by
|
|
376
|
+
* Solidity's emit for announcing events.
|
|
377
|
+
*/
|
|
378
|
+
export class Log {
|
|
379
|
+
/**
|
|
380
|
+
* The provider connected to the log used to fetch additional details
|
|
381
|
+
* if necessary.
|
|
382
|
+
*/
|
|
383
|
+
provider;
|
|
384
|
+
/**
|
|
385
|
+
* The transaction hash of the transaction this log occurred in. Use the
|
|
386
|
+
* [[Log-getTransaction]] to get the [[TransactionResponse]].
|
|
387
|
+
*/
|
|
388
|
+
transactionHash;
|
|
389
|
+
/**
|
|
390
|
+
* The block hash of the block this log occurred in. Use the
|
|
391
|
+
* [[Log-getBlock]] to get the [[Block]].
|
|
392
|
+
*/
|
|
393
|
+
blockHash;
|
|
394
|
+
/**
|
|
395
|
+
* The block number of the block this log occurred in. It is preferred
|
|
396
|
+
* to use the [[Block-hash]] when fetching the related [[Block]],
|
|
397
|
+
* since in the case of an orphaned block, the block at that height may
|
|
398
|
+
* have changed.
|
|
399
|
+
*/
|
|
400
|
+
blockNumber;
|
|
401
|
+
/**
|
|
402
|
+
* If the **Log** represents a block that was removed due to an orphaned
|
|
403
|
+
* block, this will be true.
|
|
404
|
+
*
|
|
405
|
+
* This can only happen within an orphan event listener.
|
|
406
|
+
*/
|
|
407
|
+
removed;
|
|
408
|
+
/**
|
|
409
|
+
* The address of the contract that emitted this log.
|
|
410
|
+
*/
|
|
411
|
+
address;
|
|
412
|
+
/**
|
|
413
|
+
* The data included in this log when it was emitted.
|
|
414
|
+
*/
|
|
415
|
+
data;
|
|
416
|
+
/**
|
|
417
|
+
* The indexed topics included in this log when it was emitted.
|
|
418
|
+
*
|
|
419
|
+
* All topics are included in the bloom filters, so they can be
|
|
420
|
+
* efficiently filtered using the [[Provider-getLogs]] method.
|
|
421
|
+
*/
|
|
422
|
+
topics;
|
|
423
|
+
/**
|
|
424
|
+
* The index within the block this log occurred at. This is generally
|
|
425
|
+
* not useful to developers, but can be used with the various roots
|
|
426
|
+
* to proof inclusion within a block.
|
|
427
|
+
*/
|
|
428
|
+
index;
|
|
429
|
+
/**
|
|
430
|
+
* The index within the transaction of this log.
|
|
431
|
+
*/
|
|
432
|
+
transactionIndex;
|
|
433
|
+
/**
|
|
434
|
+
* @_ignore:
|
|
435
|
+
*/
|
|
436
|
+
constructor(log, provider) {
|
|
437
|
+
this.provider = provider;
|
|
438
|
+
const topics = Object.freeze(log.topics.slice());
|
|
439
|
+
defineProperties(this, {
|
|
440
|
+
transactionHash: log.transactionHash,
|
|
441
|
+
blockHash: log.blockHash,
|
|
442
|
+
blockNumber: log.blockNumber,
|
|
443
|
+
removed: log.removed,
|
|
444
|
+
address: log.address,
|
|
445
|
+
data: log.data,
|
|
446
|
+
topics,
|
|
447
|
+
index: log.index,
|
|
448
|
+
transactionIndex: log.transactionIndex,
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* Returns a JSON-compatible object.
|
|
453
|
+
*/
|
|
454
|
+
toJSON() {
|
|
455
|
+
const { address, blockHash, blockNumber, data, index, removed, topics, transactionHash, transactionIndex } = this;
|
|
456
|
+
return {
|
|
457
|
+
_type: "log",
|
|
458
|
+
address, blockHash, blockNumber, data, index,
|
|
459
|
+
removed, topics, transactionHash, transactionIndex
|
|
460
|
+
};
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* Returns the block that this log occurred in.
|
|
464
|
+
*/
|
|
465
|
+
async getBlock() {
|
|
466
|
+
const block = await this.provider.getBlock(this.blockHash);
|
|
467
|
+
assert(!!block, "failed to find transaction", "UNKNOWN_ERROR", {});
|
|
468
|
+
return block;
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* Returns the transaction that this log occurred in.
|
|
472
|
+
*/
|
|
473
|
+
async getTransaction() {
|
|
474
|
+
const tx = await this.provider.getTransaction(this.transactionHash);
|
|
475
|
+
assert(!!tx, "failed to find transaction", "UNKNOWN_ERROR", {});
|
|
476
|
+
return tx;
|
|
477
|
+
}
|
|
478
|
+
/**
|
|
479
|
+
* Returns the transaction receipt fot the transaction that this
|
|
480
|
+
* log occurred in.
|
|
481
|
+
*/
|
|
482
|
+
async getTransactionReceipt() {
|
|
483
|
+
const receipt = await this.provider.getTransactionReceipt(this.transactionHash);
|
|
484
|
+
assert(!!receipt, "failed to find transaction receipt", "UNKNOWN_ERROR", {});
|
|
485
|
+
return receipt;
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
488
|
+
* @_ignore:
|
|
489
|
+
*/
|
|
490
|
+
removedEvent() {
|
|
491
|
+
return createRemovedLogFilter(this);
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
//////////////////////
|
|
495
|
+
// Transaction Receipt
|
|
496
|
+
/*
|
|
497
|
+
export interface LegacyTransactionReceipt {
|
|
498
|
+
byzantium: false;
|
|
499
|
+
status: null;
|
|
500
|
+
root: string;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
export interface ByzantiumTransactionReceipt {
|
|
504
|
+
byzantium: true;
|
|
505
|
+
status: number;
|
|
506
|
+
root: null;
|
|
507
|
+
}
|
|
508
|
+
*/
|
|
509
|
+
/**
|
|
510
|
+
* A **TransactionReceipt** includes additional information about a
|
|
511
|
+
* transaction that is only available after it has been mined.
|
|
512
|
+
*/
|
|
513
|
+
export class TransactionReceipt {
|
|
514
|
+
/**
|
|
515
|
+
* The provider connected to the log used to fetch additional details
|
|
516
|
+
* if necessary.
|
|
517
|
+
*/
|
|
518
|
+
provider;
|
|
519
|
+
/**
|
|
520
|
+
* The address the transaction was send to.
|
|
521
|
+
*/
|
|
522
|
+
to;
|
|
523
|
+
/**
|
|
524
|
+
* The sender of the transaction.
|
|
525
|
+
*/
|
|
526
|
+
from;
|
|
527
|
+
/**
|
|
528
|
+
* The address of the contract if the transaction was directly
|
|
529
|
+
* responsible for deploying one.
|
|
530
|
+
*
|
|
531
|
+
* This is non-null **only** if the ``to`` is empty and the ``data``
|
|
532
|
+
* was successfully executed as initcode.
|
|
533
|
+
*/
|
|
534
|
+
contractAddress;
|
|
535
|
+
/**
|
|
536
|
+
* The transaction hash.
|
|
537
|
+
*/
|
|
538
|
+
hash;
|
|
539
|
+
/**
|
|
540
|
+
* The index of this transaction within the block transactions.
|
|
541
|
+
*/
|
|
542
|
+
index;
|
|
543
|
+
/**
|
|
544
|
+
* The block hash of the [[Block]] this transaction was included in.
|
|
545
|
+
*/
|
|
546
|
+
blockHash;
|
|
547
|
+
/**
|
|
548
|
+
* The block number of the [[Block]] this transaction was included in.
|
|
549
|
+
*/
|
|
550
|
+
blockNumber;
|
|
551
|
+
/**
|
|
552
|
+
* The bloom filter bytes that represent all logs that occurred within
|
|
553
|
+
* this transaction. This is generally not useful for most developers,
|
|
554
|
+
* but can be used to validate the included logs.
|
|
555
|
+
*/
|
|
556
|
+
logsBloom;
|
|
557
|
+
/**
|
|
558
|
+
* The actual amount of gas used by this transaction.
|
|
559
|
+
*
|
|
560
|
+
* When creating a transaction, the amount of gas that will be used can
|
|
561
|
+
* only be approximated, but the sender must pay the gas fee for the
|
|
562
|
+
* entire gas limit. After the transaction, the difference is refunded.
|
|
563
|
+
*/
|
|
564
|
+
gasUsed;
|
|
565
|
+
/**
|
|
566
|
+
* The amount of gas used by all transactions within the block for this
|
|
567
|
+
* and all transactions with a lower ``index``.
|
|
568
|
+
*
|
|
569
|
+
* This is generally not useful for developers but can be used to
|
|
570
|
+
* validate certain aspects of execution.
|
|
571
|
+
*/
|
|
572
|
+
cumulativeGasUsed;
|
|
573
|
+
/**
|
|
574
|
+
* The actual gas price used during execution.
|
|
575
|
+
*
|
|
576
|
+
* Due to the complexity of [[link-eip-1559]] this value can only
|
|
577
|
+
* be caluclated after the transaction has been mined, snce the base
|
|
578
|
+
* fee is protocol-enforced.
|
|
579
|
+
*/
|
|
580
|
+
gasPrice;
|
|
581
|
+
/**
|
|
582
|
+
* The [[link-eip-2718]] transaction type.
|
|
583
|
+
*/
|
|
584
|
+
type;
|
|
585
|
+
//readonly byzantium!: boolean;
|
|
586
|
+
/**
|
|
587
|
+
* The status of this transaction, indicating success (i.e. ``1``) or
|
|
588
|
+
* a revert (i.e. ``0``).
|
|
589
|
+
*
|
|
590
|
+
* This is available in post-byzantium blocks, but some backends may
|
|
591
|
+
* backfill this value.
|
|
592
|
+
*/
|
|
593
|
+
status;
|
|
594
|
+
/**
|
|
595
|
+
* The root hash of this transaction.
|
|
596
|
+
*
|
|
597
|
+
* This is no present and was only included in pre-byzantium blocks, but
|
|
598
|
+
* could be used to validate certain parts of the receipt.
|
|
599
|
+
*/
|
|
600
|
+
root;
|
|
601
|
+
#logs;
|
|
602
|
+
/**
|
|
603
|
+
* @_ignore:
|
|
604
|
+
*/
|
|
605
|
+
constructor(tx, provider) {
|
|
606
|
+
this.#logs = Object.freeze(tx.logs.map((log) => {
|
|
607
|
+
return new Log(log, provider);
|
|
608
|
+
}));
|
|
609
|
+
let gasPrice = BN_0;
|
|
610
|
+
if (tx.effectiveGasPrice != null) {
|
|
611
|
+
gasPrice = tx.effectiveGasPrice;
|
|
612
|
+
}
|
|
613
|
+
else if (tx.gasPrice != null) {
|
|
614
|
+
gasPrice = tx.gasPrice;
|
|
615
|
+
}
|
|
616
|
+
defineProperties(this, {
|
|
617
|
+
provider,
|
|
618
|
+
to: tx.to,
|
|
619
|
+
from: tx.from,
|
|
620
|
+
contractAddress: tx.contractAddress,
|
|
621
|
+
hash: tx.hash,
|
|
622
|
+
index: tx.index,
|
|
623
|
+
blockHash: tx.blockHash,
|
|
624
|
+
blockNumber: tx.blockNumber,
|
|
625
|
+
logsBloom: tx.logsBloom,
|
|
626
|
+
gasUsed: tx.gasUsed,
|
|
627
|
+
cumulativeGasUsed: tx.cumulativeGasUsed,
|
|
628
|
+
gasPrice,
|
|
629
|
+
type: tx.type,
|
|
630
|
+
//byzantium: tx.byzantium,
|
|
631
|
+
status: tx.status,
|
|
632
|
+
root: tx.root
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
/**
|
|
636
|
+
* The logs for this transaction.
|
|
637
|
+
*/
|
|
638
|
+
get logs() { return this.#logs; }
|
|
639
|
+
/**
|
|
640
|
+
* Returns a JSON-compatible representation.
|
|
641
|
+
*/
|
|
642
|
+
toJSON() {
|
|
643
|
+
const { to, from, contractAddress, hash, index, blockHash, blockNumber, logsBloom, logs, //byzantium,
|
|
644
|
+
status, root } = this;
|
|
645
|
+
return {
|
|
646
|
+
_type: "TransactionReceipt",
|
|
647
|
+
blockHash, blockNumber,
|
|
648
|
+
//byzantium,
|
|
649
|
+
contractAddress,
|
|
650
|
+
cumulativeGasUsed: toJson(this.cumulativeGasUsed),
|
|
651
|
+
from,
|
|
652
|
+
gasPrice: toJson(this.gasPrice),
|
|
653
|
+
gasUsed: toJson(this.gasUsed),
|
|
654
|
+
hash, index, logs, logsBloom, root, status, to
|
|
655
|
+
};
|
|
656
|
+
}
|
|
657
|
+
/**
|
|
658
|
+
* @_ignore:
|
|
659
|
+
*/
|
|
660
|
+
get length() { return this.logs.length; }
|
|
661
|
+
[Symbol.iterator]() {
|
|
662
|
+
let index = 0;
|
|
663
|
+
return {
|
|
664
|
+
next: () => {
|
|
665
|
+
if (index < this.length) {
|
|
666
|
+
return { value: this.logs[index++], done: false };
|
|
667
|
+
}
|
|
668
|
+
return { value: undefined, done: true };
|
|
669
|
+
}
|
|
670
|
+
};
|
|
671
|
+
}
|
|
672
|
+
/**
|
|
673
|
+
* The total fee for this transaction, in wei.
|
|
674
|
+
*/
|
|
675
|
+
get fee() {
|
|
676
|
+
return this.gasUsed * this.gasPrice;
|
|
677
|
+
}
|
|
678
|
+
/**
|
|
679
|
+
* Resolves to the block this transaction occurred in.
|
|
680
|
+
*/
|
|
681
|
+
async getBlock() {
|
|
682
|
+
const block = await this.provider.getBlock(this.blockHash);
|
|
683
|
+
if (block == null) {
|
|
684
|
+
throw new Error("TODO");
|
|
685
|
+
}
|
|
686
|
+
return block;
|
|
687
|
+
}
|
|
688
|
+
/**
|
|
689
|
+
* Resolves to the transaction this transaction occurred in.
|
|
690
|
+
*/
|
|
691
|
+
async getTransaction() {
|
|
692
|
+
const tx = await this.provider.getTransaction(this.hash);
|
|
693
|
+
if (tx == null) {
|
|
694
|
+
throw new Error("TODO");
|
|
695
|
+
}
|
|
696
|
+
return tx;
|
|
697
|
+
}
|
|
698
|
+
/**
|
|
699
|
+
* Resolves to the return value of the execution of this transaction.
|
|
700
|
+
*
|
|
701
|
+
* Support for this feature is limited, as it requires an archive node
|
|
702
|
+
* with the ``debug_`` or ``trace_`` API enabled.
|
|
703
|
+
*/
|
|
704
|
+
async getResult() {
|
|
705
|
+
return (await this.provider.getTransactionResult(this.hash));
|
|
706
|
+
}
|
|
707
|
+
/**
|
|
708
|
+
* Resolves to the number of confirmations this transaction has.
|
|
709
|
+
*/
|
|
710
|
+
async confirmations() {
|
|
711
|
+
return (await this.provider.getBlockNumber()) - this.blockNumber + 1;
|
|
712
|
+
}
|
|
713
|
+
/**
|
|
714
|
+
* @_ignore:
|
|
715
|
+
*/
|
|
716
|
+
removedEvent() {
|
|
717
|
+
return createRemovedTransactionFilter(this);
|
|
718
|
+
}
|
|
719
|
+
/**
|
|
720
|
+
* @_ignore:
|
|
721
|
+
*/
|
|
722
|
+
reorderedEvent(other) {
|
|
723
|
+
assert(!other || other.isMined(), "unmined 'other' transction cannot be orphaned", "UNSUPPORTED_OPERATION", { operation: "reorderedEvent(other)" });
|
|
724
|
+
return createReorderedTransactionFilter(this, other);
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
/**
|
|
728
|
+
* A **TransactionResponse** includes all properties about a transaction
|
|
729
|
+
* that was sent to the network, which may or may not be included in a
|
|
730
|
+
* block.
|
|
731
|
+
*
|
|
732
|
+
* The [[TransactionResponse-isMined]] can be used to check if the
|
|
733
|
+
* transaction has been mined as well as type guard that the otherwise
|
|
734
|
+
* possibly ``null`` properties are defined.
|
|
735
|
+
*/
|
|
736
|
+
export class TransactionResponse {
|
|
737
|
+
/**
|
|
738
|
+
* The provider this is connected to, which will influence how its
|
|
739
|
+
* methods will resolve its async inspection methods.
|
|
740
|
+
*/
|
|
741
|
+
provider;
|
|
742
|
+
/**
|
|
743
|
+
* The block number of the block that this transaction was included in.
|
|
744
|
+
*
|
|
745
|
+
* This is ``null`` for pending transactions.
|
|
746
|
+
*/
|
|
747
|
+
blockNumber;
|
|
748
|
+
/**
|
|
749
|
+
* The blockHash of the block that this transaction was included in.
|
|
750
|
+
*
|
|
751
|
+
* This is ``null`` for pending transactions.
|
|
752
|
+
*/
|
|
753
|
+
blockHash;
|
|
754
|
+
/**
|
|
755
|
+
* The index within the block that this transaction resides at.
|
|
756
|
+
*/
|
|
757
|
+
index;
|
|
758
|
+
/**
|
|
759
|
+
* The transaction hash.
|
|
760
|
+
*/
|
|
761
|
+
hash;
|
|
762
|
+
/**
|
|
763
|
+
* The [[link-eip-2718]] transaction envelope type. This is
|
|
764
|
+
* ``0`` for legacy transactions types.
|
|
765
|
+
*/
|
|
766
|
+
type;
|
|
767
|
+
/**
|
|
768
|
+
* The receiver of this transaction.
|
|
769
|
+
*
|
|
770
|
+
* If ``null``, then the transaction is an initcode transaction.
|
|
771
|
+
* This means the result of executing the [[data]] will be deployed
|
|
772
|
+
* as a new contract on chain (assuming it does not revert) and the
|
|
773
|
+
* address may be computed using [[getCreateAddress]].
|
|
774
|
+
*/
|
|
775
|
+
to;
|
|
776
|
+
/**
|
|
777
|
+
* The sender of this transaction. It is implicitly computed
|
|
778
|
+
* from the transaction pre-image hash (as the digest) and the
|
|
779
|
+
* [[signature]] using ecrecover.
|
|
780
|
+
*/
|
|
781
|
+
from;
|
|
782
|
+
/**
|
|
783
|
+
* The nonce, which is used to prevent replay attacks and offer
|
|
784
|
+
* a method to ensure transactions from a given sender are explicitly
|
|
785
|
+
* ordered.
|
|
786
|
+
*
|
|
787
|
+
* When sending a transaction, this must be equal to the number of
|
|
788
|
+
* transactions ever sent by [[from]].
|
|
789
|
+
*/
|
|
790
|
+
nonce;
|
|
791
|
+
/**
|
|
792
|
+
* The maximum units of gas this transaction can consume. If execution
|
|
793
|
+
* exceeds this, the entries transaction is reverted and the sender
|
|
794
|
+
* is charged for the full amount, despite not state changes being made.
|
|
795
|
+
*/
|
|
796
|
+
gasLimit;
|
|
797
|
+
/**
|
|
798
|
+
* The gas price can have various values, depending on the network.
|
|
799
|
+
*
|
|
800
|
+
* In modern networks, for transactions that are included this is
|
|
801
|
+
* the //effective gas price// (the fee per gas that was actually
|
|
802
|
+
* charged), while for transactions that have not been included yet
|
|
803
|
+
* is the [[maxFeePerGas]].
|
|
804
|
+
*
|
|
805
|
+
* For legacy transactions, or transactions on legacy networks, this
|
|
806
|
+
* is the fee that will be charged per unit of gas the transaction
|
|
807
|
+
* consumes.
|
|
808
|
+
*/
|
|
809
|
+
gasPrice;
|
|
810
|
+
/**
|
|
811
|
+
* The maximum priority fee (per unit of gas) to allow a
|
|
812
|
+
* validator to charge the sender. This is inclusive of the
|
|
813
|
+
* [[maxFeeFeePerGas]].
|
|
814
|
+
*/
|
|
815
|
+
maxPriorityFeePerGas;
|
|
816
|
+
/**
|
|
817
|
+
* The maximum fee (per unit of gas) to allow this transaction
|
|
818
|
+
* to charge the sender.
|
|
819
|
+
*/
|
|
820
|
+
maxFeePerGas;
|
|
821
|
+
/**
|
|
822
|
+
* The data.
|
|
823
|
+
*/
|
|
824
|
+
data;
|
|
825
|
+
/**
|
|
826
|
+
* The value, in wei. Use [[formatEther]] to format this value
|
|
827
|
+
* as ether.
|
|
828
|
+
*/
|
|
829
|
+
value;
|
|
830
|
+
/**
|
|
831
|
+
* The chain ID.
|
|
832
|
+
*/
|
|
833
|
+
chainId;
|
|
834
|
+
/**
|
|
835
|
+
* The signature.
|
|
836
|
+
*/
|
|
837
|
+
signature;
|
|
838
|
+
/**
|
|
839
|
+
* The [[link-eip-2930]] access list for transaction types that
|
|
840
|
+
* support it, otherwise ``null``.
|
|
841
|
+
*/
|
|
842
|
+
accessList;
|
|
843
|
+
#startBlock;
|
|
844
|
+
/**
|
|
845
|
+
* @_ignore:
|
|
846
|
+
*/
|
|
847
|
+
constructor(tx, provider) {
|
|
848
|
+
this.provider = provider;
|
|
849
|
+
this.blockNumber = (tx.blockNumber != null) ? tx.blockNumber : null;
|
|
850
|
+
this.blockHash = (tx.blockHash != null) ? tx.blockHash : null;
|
|
851
|
+
this.hash = tx.hash;
|
|
852
|
+
this.index = tx.index;
|
|
853
|
+
this.type = tx.type;
|
|
854
|
+
this.from = tx.from;
|
|
855
|
+
this.to = tx.to || null;
|
|
856
|
+
this.gasLimit = tx.gasLimit;
|
|
857
|
+
this.nonce = tx.nonce;
|
|
858
|
+
this.data = tx.data;
|
|
859
|
+
this.value = tx.value;
|
|
860
|
+
this.gasPrice = tx.gasPrice;
|
|
861
|
+
this.maxPriorityFeePerGas = (tx.maxPriorityFeePerGas != null) ? tx.maxPriorityFeePerGas : null;
|
|
862
|
+
this.maxFeePerGas = (tx.maxFeePerGas != null) ? tx.maxFeePerGas : null;
|
|
863
|
+
this.chainId = tx.chainId;
|
|
864
|
+
this.signature = tx.signature;
|
|
865
|
+
this.accessList = (tx.accessList != null) ? tx.accessList : null;
|
|
866
|
+
this.#startBlock = -1;
|
|
867
|
+
}
|
|
868
|
+
/**
|
|
869
|
+
* Returns a JSON-compatible representation of this transaction.
|
|
870
|
+
*/
|
|
871
|
+
toJSON() {
|
|
872
|
+
const { blockNumber, blockHash, index, hash, type, to, from, nonce, data, signature, accessList } = this;
|
|
873
|
+
return {
|
|
874
|
+
_type: "TransactionReceipt",
|
|
875
|
+
accessList, blockNumber, blockHash,
|
|
876
|
+
chainId: toJson(this.chainId),
|
|
877
|
+
data, from,
|
|
878
|
+
gasLimit: toJson(this.gasLimit),
|
|
879
|
+
gasPrice: toJson(this.gasPrice),
|
|
880
|
+
hash,
|
|
881
|
+
maxFeePerGas: toJson(this.maxFeePerGas),
|
|
882
|
+
maxPriorityFeePerGas: toJson(this.maxPriorityFeePerGas),
|
|
883
|
+
nonce, signature, to, index, type,
|
|
884
|
+
value: toJson(this.value),
|
|
885
|
+
};
|
|
886
|
+
}
|
|
887
|
+
/**
|
|
888
|
+
* Resolves to the Block that this transaction was included in.
|
|
889
|
+
*
|
|
890
|
+
* This will return null if the transaction has not been included yet.
|
|
891
|
+
*/
|
|
892
|
+
async getBlock() {
|
|
893
|
+
let blockNumber = this.blockNumber;
|
|
894
|
+
if (blockNumber == null) {
|
|
895
|
+
const tx = await this.getTransaction();
|
|
896
|
+
if (tx) {
|
|
897
|
+
blockNumber = tx.blockNumber;
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
if (blockNumber == null) {
|
|
901
|
+
return null;
|
|
902
|
+
}
|
|
903
|
+
const block = this.provider.getBlock(blockNumber);
|
|
904
|
+
if (block == null) {
|
|
905
|
+
throw new Error("TODO");
|
|
906
|
+
}
|
|
907
|
+
return block;
|
|
908
|
+
}
|
|
909
|
+
/**
|
|
910
|
+
* Resolves to this transaction being re-requested from the
|
|
911
|
+
* provider. This can be used if you have an unmined transaction
|
|
912
|
+
* and wish to get an up-to-date populated instance.
|
|
913
|
+
*/
|
|
914
|
+
async getTransaction() {
|
|
915
|
+
return this.provider.getTransaction(this.hash);
|
|
916
|
+
}
|
|
917
|
+
/**
|
|
918
|
+
* Resolve to the number of confirmations this transaction has.
|
|
919
|
+
*/
|
|
920
|
+
async confirmations() {
|
|
921
|
+
if (this.blockNumber == null) {
|
|
922
|
+
const { tx, blockNumber } = await resolveProperties({
|
|
923
|
+
tx: this.getTransaction(),
|
|
924
|
+
blockNumber: this.provider.getBlockNumber()
|
|
925
|
+
});
|
|
926
|
+
// Not mined yet...
|
|
927
|
+
if (tx == null || tx.blockNumber == null) {
|
|
928
|
+
return 0;
|
|
929
|
+
}
|
|
930
|
+
return blockNumber - tx.blockNumber + 1;
|
|
931
|
+
}
|
|
932
|
+
const blockNumber = await this.provider.getBlockNumber();
|
|
933
|
+
return blockNumber - this.blockNumber + 1;
|
|
934
|
+
}
|
|
935
|
+
/**
|
|
936
|
+
* Resolves once this transaction has been mined and has
|
|
937
|
+
* %%confirms%% blocks including it (default: ``1``) with an
|
|
938
|
+
* optional %%timeout%%.
|
|
939
|
+
*
|
|
940
|
+
* This can resolve to ``null`` only if %%confirms%% is ``0``
|
|
941
|
+
* and the transaction has not been mined, otherwise this will
|
|
942
|
+
* wait until enough confirmations have completed.
|
|
943
|
+
*/
|
|
944
|
+
async wait(_confirms, _timeout) {
|
|
945
|
+
const confirms = (_confirms == null) ? 1 : _confirms;
|
|
946
|
+
const timeout = (_timeout == null) ? 0 : _timeout;
|
|
947
|
+
let startBlock = this.#startBlock;
|
|
948
|
+
let nextScan = -1;
|
|
949
|
+
let stopScanning = (startBlock === -1) ? true : false;
|
|
950
|
+
const checkReplacement = async () => {
|
|
951
|
+
// Get the current transaction count for this sender
|
|
952
|
+
if (stopScanning) {
|
|
953
|
+
return null;
|
|
954
|
+
}
|
|
955
|
+
const { blockNumber, nonce } = await resolveProperties({
|
|
956
|
+
blockNumber: this.provider.getBlockNumber(),
|
|
957
|
+
nonce: this.provider.getTransactionCount(this.from)
|
|
958
|
+
});
|
|
959
|
+
// No transaction or our nonce has not been mined yet; but we
|
|
960
|
+
// can start scanning later when we do start
|
|
961
|
+
if (nonce < this.nonce) {
|
|
962
|
+
startBlock = blockNumber;
|
|
963
|
+
return;
|
|
964
|
+
}
|
|
965
|
+
// We were mined; no replacement
|
|
966
|
+
if (stopScanning) {
|
|
967
|
+
return null;
|
|
968
|
+
}
|
|
969
|
+
const mined = await this.getTransaction();
|
|
970
|
+
if (mined && mined.blockNumber != null) {
|
|
971
|
+
return;
|
|
972
|
+
}
|
|
973
|
+
// We were replaced; start scanning for that transaction
|
|
974
|
+
// Starting to scan; look back a few extra blocks for safety
|
|
975
|
+
if (nextScan === -1) {
|
|
976
|
+
nextScan = startBlock - 3;
|
|
977
|
+
if (nextScan < this.#startBlock) {
|
|
978
|
+
nextScan = this.#startBlock;
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
while (nextScan <= blockNumber) {
|
|
982
|
+
// Get the next block to scan
|
|
983
|
+
if (stopScanning) {
|
|
984
|
+
return null;
|
|
985
|
+
}
|
|
986
|
+
const block = await this.provider.getBlock(nextScan, true);
|
|
987
|
+
// This should not happen; but we'll try again shortly
|
|
988
|
+
if (block == null) {
|
|
989
|
+
return;
|
|
990
|
+
}
|
|
991
|
+
// We were mined; no replacement
|
|
992
|
+
for (const hash of block) {
|
|
993
|
+
if (hash === this.hash) {
|
|
994
|
+
return;
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
// Search for the transaction that replaced us
|
|
998
|
+
for (let i = 0; i < block.length; i++) {
|
|
999
|
+
const tx = await block.getTransaction(i);
|
|
1000
|
+
if (tx.from === this.from && tx.nonce === this.nonce) {
|
|
1001
|
+
// Get the receipt
|
|
1002
|
+
if (stopScanning) {
|
|
1003
|
+
return null;
|
|
1004
|
+
}
|
|
1005
|
+
const receipt = await this.provider.getTransactionReceipt(tx.hash);
|
|
1006
|
+
// This should not happen; but we'll try again shortly
|
|
1007
|
+
if (receipt == null) {
|
|
1008
|
+
return;
|
|
1009
|
+
}
|
|
1010
|
+
// We will retry this on the next block (this case could be optimized)
|
|
1011
|
+
if ((blockNumber - receipt.blockNumber + 1) < confirms) {
|
|
1012
|
+
return;
|
|
1013
|
+
}
|
|
1014
|
+
// The reason we were replaced
|
|
1015
|
+
let reason = "replaced";
|
|
1016
|
+
if (tx.data === this.data && tx.to === this.to && tx.value === this.value) {
|
|
1017
|
+
reason = "repriced";
|
|
1018
|
+
}
|
|
1019
|
+
else if (tx.data === "0x" && tx.from === tx.to && tx.value === BN_0) {
|
|
1020
|
+
reason = "cancelled";
|
|
1021
|
+
}
|
|
1022
|
+
assert(false, "transaction was replaced", "TRANSACTION_REPLACED", {
|
|
1023
|
+
cancelled: (reason === "replaced" || reason === "cancelled"),
|
|
1024
|
+
reason,
|
|
1025
|
+
replacement: tx.replaceableTransaction(startBlock),
|
|
1026
|
+
hash: tx.hash,
|
|
1027
|
+
receipt
|
|
1028
|
+
});
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
nextScan++;
|
|
1032
|
+
}
|
|
1033
|
+
return;
|
|
1034
|
+
};
|
|
1035
|
+
const checkReceipt = (receipt) => {
|
|
1036
|
+
if (receipt == null || receipt.status !== 0) {
|
|
1037
|
+
return receipt;
|
|
1038
|
+
}
|
|
1039
|
+
assert(false, "transaction execution reverted", "CALL_EXCEPTION", {
|
|
1040
|
+
action: "sendTransaction",
|
|
1041
|
+
data: null, reason: null, invocation: null, revert: null,
|
|
1042
|
+
transaction: {
|
|
1043
|
+
to: receipt.to,
|
|
1044
|
+
from: receipt.from,
|
|
1045
|
+
data: "" // @TODO: in v7, split out sendTransaction properties
|
|
1046
|
+
}, receipt
|
|
1047
|
+
});
|
|
1048
|
+
};
|
|
1049
|
+
const receipt = await this.provider.getTransactionReceipt(this.hash);
|
|
1050
|
+
if (confirms === 0) {
|
|
1051
|
+
return checkReceipt(receipt);
|
|
1052
|
+
}
|
|
1053
|
+
if (receipt) {
|
|
1054
|
+
if ((await receipt.confirmations()) >= confirms) {
|
|
1055
|
+
return checkReceipt(receipt);
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
else {
|
|
1059
|
+
// Check for a replacement; throws if a replacement was found
|
|
1060
|
+
await checkReplacement();
|
|
1061
|
+
// Allow null only when the confirms is 0
|
|
1062
|
+
if (confirms === 0) {
|
|
1063
|
+
return null;
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
const waiter = new Promise((resolve, reject) => {
|
|
1067
|
+
// List of things to cancel when we have a result (one way or the other)
|
|
1068
|
+
const cancellers = [];
|
|
1069
|
+
const cancel = () => { cancellers.forEach((c) => c()); };
|
|
1070
|
+
// On cancel, stop scanning for replacements
|
|
1071
|
+
cancellers.push(() => { stopScanning = true; });
|
|
1072
|
+
// Set up any timeout requested
|
|
1073
|
+
if (timeout > 0) {
|
|
1074
|
+
const timer = setTimeout(() => {
|
|
1075
|
+
cancel();
|
|
1076
|
+
reject(makeError("wait for transaction timeout", "TIMEOUT"));
|
|
1077
|
+
}, timeout);
|
|
1078
|
+
cancellers.push(() => { clearTimeout(timer); });
|
|
1079
|
+
}
|
|
1080
|
+
const txListener = async (receipt) => {
|
|
1081
|
+
// Done; return it!
|
|
1082
|
+
if ((await receipt.confirmations()) >= confirms) {
|
|
1083
|
+
cancel();
|
|
1084
|
+
try {
|
|
1085
|
+
resolve(checkReceipt(receipt));
|
|
1086
|
+
}
|
|
1087
|
+
catch (error) {
|
|
1088
|
+
reject(error);
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
};
|
|
1092
|
+
cancellers.push(() => { this.provider.off(this.hash, txListener); });
|
|
1093
|
+
this.provider.on(this.hash, txListener);
|
|
1094
|
+
// We support replacement detection; start checking
|
|
1095
|
+
if (startBlock >= 0) {
|
|
1096
|
+
const replaceListener = async () => {
|
|
1097
|
+
try {
|
|
1098
|
+
// Check for a replacement; this throws only if one is found
|
|
1099
|
+
await checkReplacement();
|
|
1100
|
+
}
|
|
1101
|
+
catch (error) {
|
|
1102
|
+
// We were replaced (with enough confirms); re-throw the error
|
|
1103
|
+
if (isError(error, "TRANSACTION_REPLACED")) {
|
|
1104
|
+
cancel();
|
|
1105
|
+
reject(error);
|
|
1106
|
+
return;
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
// Rescheudle a check on the next block
|
|
1110
|
+
if (!stopScanning) {
|
|
1111
|
+
this.provider.once("block", replaceListener);
|
|
1112
|
+
}
|
|
1113
|
+
};
|
|
1114
|
+
cancellers.push(() => { this.provider.off("block", replaceListener); });
|
|
1115
|
+
this.provider.once("block", replaceListener);
|
|
1116
|
+
}
|
|
1117
|
+
});
|
|
1118
|
+
return await waiter;
|
|
1119
|
+
}
|
|
1120
|
+
/**
|
|
1121
|
+
* Returns ``true`` if this transaction has been included.
|
|
1122
|
+
*
|
|
1123
|
+
* This is effective only as of the time the TransactionResponse
|
|
1124
|
+
* was instantiated. To get up-to-date information, use
|
|
1125
|
+
* [[getTransaction]].
|
|
1126
|
+
*
|
|
1127
|
+
* This provides a Type Guard that this transaction will have
|
|
1128
|
+
* non-null property values for properties that are null for
|
|
1129
|
+
* unmined transactions.
|
|
1130
|
+
*/
|
|
1131
|
+
isMined() {
|
|
1132
|
+
return (this.blockHash != null);
|
|
1133
|
+
}
|
|
1134
|
+
/**
|
|
1135
|
+
* Returns true if the transaction is a legacy (i.e. ``type == 0``)
|
|
1136
|
+
* transaction.
|
|
1137
|
+
*
|
|
1138
|
+
* This provides a Type Guard that this transaction will have
|
|
1139
|
+
* the ``null``-ness for hardfork-specific properties set correctly.
|
|
1140
|
+
*/
|
|
1141
|
+
isLegacy() {
|
|
1142
|
+
return (this.type === 0);
|
|
1143
|
+
}
|
|
1144
|
+
/**
|
|
1145
|
+
* Returns true if the transaction is a Berlin (i.e. ``type == 1``)
|
|
1146
|
+
* transaction. See [[link-eip-2070]].
|
|
1147
|
+
*
|
|
1148
|
+
* This provides a Type Guard that this transaction will have
|
|
1149
|
+
* the ``null``-ness for hardfork-specific properties set correctly.
|
|
1150
|
+
*/
|
|
1151
|
+
isBerlin() {
|
|
1152
|
+
return (this.type === 1);
|
|
1153
|
+
}
|
|
1154
|
+
/**
|
|
1155
|
+
* Returns true if the transaction is a London (i.e. ``type == 2``)
|
|
1156
|
+
* transaction. See [[link-eip-1559]].
|
|
1157
|
+
*
|
|
1158
|
+
* This provides a Type Guard that this transaction will have
|
|
1159
|
+
* the ``null``-ness for hardfork-specific properties set correctly.
|
|
1160
|
+
*/
|
|
1161
|
+
isLondon() {
|
|
1162
|
+
return (this.type === 2);
|
|
1163
|
+
}
|
|
1164
|
+
/**
|
|
1165
|
+
* Returns a filter which can be used to listen for orphan events
|
|
1166
|
+
* that evict this transaction.
|
|
1167
|
+
*/
|
|
1168
|
+
removedEvent() {
|
|
1169
|
+
assert(this.isMined(), "unmined transaction canot be orphaned", "UNSUPPORTED_OPERATION", { operation: "removeEvent()" });
|
|
1170
|
+
return createRemovedTransactionFilter(this);
|
|
1171
|
+
}
|
|
1172
|
+
/**
|
|
1173
|
+
* Returns a filter which can be used to listen for orphan events
|
|
1174
|
+
* that re-order this event against %%other%%.
|
|
1175
|
+
*/
|
|
1176
|
+
reorderedEvent(other) {
|
|
1177
|
+
assert(this.isMined(), "unmined transaction canot be orphaned", "UNSUPPORTED_OPERATION", { operation: "removeEvent()" });
|
|
1178
|
+
assert(!other || other.isMined(), "unmined 'other' transaction canot be orphaned", "UNSUPPORTED_OPERATION", { operation: "removeEvent()" });
|
|
1179
|
+
return createReorderedTransactionFilter(this, other);
|
|
1180
|
+
}
|
|
1181
|
+
/**
|
|
1182
|
+
* Returns a new TransactionResponse instance which has the ability to
|
|
1183
|
+
* detect (and throw an error) if the transaction is replaced, which
|
|
1184
|
+
* will begin scanning at %%startBlock%%.
|
|
1185
|
+
*
|
|
1186
|
+
* This should generally not be used by developers and is intended
|
|
1187
|
+
* primarily for internal use. Setting an incorrect %%startBlock%% can
|
|
1188
|
+
* have devastating performance consequences if used incorrectly.
|
|
1189
|
+
*/
|
|
1190
|
+
replaceableTransaction(startBlock) {
|
|
1191
|
+
assertArgument(Number.isInteger(startBlock) && startBlock >= 0, "invalid startBlock", "startBlock", startBlock);
|
|
1192
|
+
const tx = new TransactionResponse(this, this.provider);
|
|
1193
|
+
tx.#startBlock = startBlock;
|
|
1194
|
+
return tx;
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
function createOrphanedBlockFilter(block) {
|
|
1198
|
+
return { orphan: "drop-block", hash: block.hash, number: block.number };
|
|
1199
|
+
}
|
|
1200
|
+
function createReorderedTransactionFilter(tx, other) {
|
|
1201
|
+
return { orphan: "reorder-transaction", tx, other };
|
|
1202
|
+
}
|
|
1203
|
+
function createRemovedTransactionFilter(tx) {
|
|
1204
|
+
return { orphan: "drop-transaction", tx };
|
|
1205
|
+
}
|
|
1206
|
+
function createRemovedLogFilter(log) {
|
|
1207
|
+
return { orphan: "drop-log", log: {
|
|
1208
|
+
transactionHash: log.transactionHash,
|
|
1209
|
+
blockHash: log.blockHash,
|
|
1210
|
+
blockNumber: log.blockNumber,
|
|
1211
|
+
address: log.address,
|
|
1212
|
+
data: log.data,
|
|
1213
|
+
topics: Object.freeze(log.topics.slice()),
|
|
1214
|
+
index: log.index
|
|
1215
|
+
} };
|
|
1216
|
+
}
|
|
1217
|
+
//# sourceMappingURL=provider.js.map
|