viem 2.0.0-beta.4 → 2.0.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/_cjs/accounts/generateMnemonic.js +9 -0
- package/_cjs/accounts/generateMnemonic.js.map +1 -0
- package/_cjs/accounts/generatePrivateKey.js +10 -0
- package/_cjs/accounts/generatePrivateKey.js.map +1 -0
- package/_cjs/accounts/hdKeyToAccount.js +16 -0
- package/_cjs/accounts/hdKeyToAccount.js.map +1 -0
- package/_cjs/accounts/index.js +52 -0
- package/_cjs/accounts/index.js.map +1 -0
- package/_cjs/accounts/mnemonicToAccount.js +12 -0
- package/_cjs/accounts/mnemonicToAccount.js.map +1 -0
- package/_cjs/accounts/privateKeyToAccount.js +33 -0
- package/_cjs/accounts/privateKeyToAccount.js.map +1 -0
- package/_cjs/accounts/toAccount.js +27 -0
- package/_cjs/accounts/toAccount.js.map +1 -0
- package/_cjs/accounts/types.js +3 -0
- package/_cjs/accounts/types.js.map +1 -0
- package/_cjs/accounts/utils/parseAccount.js +10 -0
- package/_cjs/accounts/utils/parseAccount.js.map +1 -0
- package/_cjs/accounts/utils/privateKeyToAddress.js +12 -0
- package/_cjs/accounts/utils/privateKeyToAddress.js.map +1 -0
- package/_cjs/accounts/utils/publicKeyToAddress.js +11 -0
- package/_cjs/accounts/utils/publicKeyToAddress.js.map +1 -0
- package/_cjs/accounts/utils/sign.js +15 -0
- package/_cjs/accounts/utils/sign.js.map +1 -0
- package/_cjs/accounts/utils/signMessage.js +12 -0
- package/_cjs/accounts/utils/signMessage.js.map +1 -0
- package/_cjs/accounts/utils/signTransaction.js +15 -0
- package/_cjs/accounts/utils/signTransaction.js.map +1 -0
- package/_cjs/accounts/utils/signTypedData.js +16 -0
- package/_cjs/accounts/utils/signTypedData.js.map +1 -0
- package/_cjs/actions/ens/getEnsAddress.js +63 -0
- package/_cjs/actions/ens/getEnsAddress.js.map +1 -0
- package/_cjs/actions/ens/getEnsAvatar.js +25 -0
- package/_cjs/actions/ens/getEnsAvatar.js.map +1 -0
- package/_cjs/actions/ens/getEnsName.js +41 -0
- package/_cjs/actions/ens/getEnsName.js.map +1 -0
- package/_cjs/actions/ens/getEnsResolver.js +39 -0
- package/_cjs/actions/ens/getEnsResolver.js.map +1 -0
- package/_cjs/actions/ens/getEnsText.js +57 -0
- package/_cjs/actions/ens/getEnsText.js.map +1 -0
- package/_cjs/actions/getContract.js +184 -0
- package/_cjs/actions/getContract.js.map +1 -0
- package/_cjs/actions/index.js +167 -0
- package/_cjs/actions/index.js.map +1 -0
- package/_cjs/actions/public/call.js +156 -0
- package/_cjs/actions/public/call.js.map +1 -0
- package/_cjs/actions/public/createBlockFilter.js +15 -0
- package/_cjs/actions/public/createBlockFilter.js.map +1 -0
- package/_cjs/actions/public/createContractEventFilter.js +41 -0
- package/_cjs/actions/public/createContractEventFilter.js.map +1 -0
- package/_cjs/actions/public/createEventFilter.js +48 -0
- package/_cjs/actions/public/createEventFilter.js.map +1 -0
- package/_cjs/actions/public/createPendingTransactionFilter.js +15 -0
- package/_cjs/actions/public/createPendingTransactionFilter.js.map +1 -0
- package/_cjs/actions/public/estimateContractGas.js +37 -0
- package/_cjs/actions/public/estimateContractGas.js.map +1 -0
- package/_cjs/actions/public/estimateFeesPerGas.js +62 -0
- package/_cjs/actions/public/estimateFeesPerGas.js.map +1 -0
- package/_cjs/actions/public/estimateGas.js +56 -0
- package/_cjs/actions/public/estimateGas.js.map +1 -0
- package/_cjs/actions/public/estimateMaxPriorityFeePerGas.js +45 -0
- package/_cjs/actions/public/estimateMaxPriorityFeePerGas.js.map +1 -0
- package/_cjs/actions/public/getBalance.js +14 -0
- package/_cjs/actions/public/getBalance.js.map +1 -0
- package/_cjs/actions/public/getBlock.js +30 -0
- package/_cjs/actions/public/getBlock.js.map +1 -0
- package/_cjs/actions/public/getBlockNumber.js +17 -0
- package/_cjs/actions/public/getBlockNumber.js.map +1 -0
- package/_cjs/actions/public/getBlockTransactionCount.js +24 -0
- package/_cjs/actions/public/getBlockTransactionCount.js.map +1 -0
- package/_cjs/actions/public/getBytecode.js +16 -0
- package/_cjs/actions/public/getBytecode.js.map +1 -0
- package/_cjs/actions/public/getChainId.js +12 -0
- package/_cjs/actions/public/getChainId.js.map +1 -0
- package/_cjs/actions/public/getContractEvents.js +27 -0
- package/_cjs/actions/public/getContractEvents.js.map +1 -0
- package/_cjs/actions/public/getFeeHistory.js +19 -0
- package/_cjs/actions/public/getFeeHistory.js.map +1 -0
- package/_cjs/actions/public/getFilterChanges.js +44 -0
- package/_cjs/actions/public/getFilterChanges.js.map +1 -0
- package/_cjs/actions/public/getFilterLogs.js +42 -0
- package/_cjs/actions/public/getFilterLogs.js.map +1 -0
- package/_cjs/actions/public/getGasPrice.js +11 -0
- package/_cjs/actions/public/getGasPrice.js.map +1 -0
- package/_cjs/actions/public/getLogs.js +73 -0
- package/_cjs/actions/public/getLogs.js.map +1 -0
- package/_cjs/actions/public/getProof.js +16 -0
- package/_cjs/actions/public/getProof.js.map +1 -0
- package/_cjs/actions/public/getStorageAt.js +14 -0
- package/_cjs/actions/public/getStorageAt.js.map +1 -0
- package/_cjs/actions/public/getTransaction.js +41 -0
- package/_cjs/actions/public/getTransaction.js.map +1 -0
- package/_cjs/actions/public/getTransactionConfirmations.js +18 -0
- package/_cjs/actions/public/getTransactionConfirmations.js.map +1 -0
- package/_cjs/actions/public/getTransactionCount.js +14 -0
- package/_cjs/actions/public/getTransactionCount.js.map +1 -0
- package/_cjs/actions/public/getTransactionReceipt.js +18 -0
- package/_cjs/actions/public/getTransactionReceipt.js.map +1 -0
- package/_cjs/actions/public/multicall.js +135 -0
- package/_cjs/actions/public/multicall.js.map +1 -0
- package/_cjs/actions/public/readContract.js +40 -0
- package/_cjs/actions/public/readContract.js.map +1 -0
- package/_cjs/actions/public/simulateContract.js +56 -0
- package/_cjs/actions/public/simulateContract.js.map +1 -0
- package/_cjs/actions/public/uninstallFilter.js +11 -0
- package/_cjs/actions/public/uninstallFilter.js.map +1 -0
- package/_cjs/actions/public/verifyHash.js +32 -0
- package/_cjs/actions/public/verifyHash.js.map +1 -0
- package/_cjs/actions/public/verifyMessage.js +16 -0
- package/_cjs/actions/public/verifyMessage.js.map +1 -0
- package/_cjs/actions/public/verifyTypedData.js +16 -0
- package/_cjs/actions/public/verifyTypedData.js.map +1 -0
- package/_cjs/actions/public/waitForTransactionReceipt.js +119 -0
- package/_cjs/actions/public/waitForTransactionReceipt.js.map +1 -0
- package/_cjs/actions/public/watchBlockNumber.js +78 -0
- package/_cjs/actions/public/watchBlockNumber.js.map +1 -0
- package/_cjs/actions/public/watchBlocks.js +90 -0
- package/_cjs/actions/public/watchBlocks.js.map +1 -0
- package/_cjs/actions/public/watchContractEvent.js +162 -0
- package/_cjs/actions/public/watchContractEvent.js.map +1 -0
- package/_cjs/actions/public/watchEvent.js +161 -0
- package/_cjs/actions/public/watchEvent.js.map +1 -0
- package/_cjs/actions/public/watchPendingTransactions.js +88 -0
- package/_cjs/actions/public/watchPendingTransactions.js.map +1 -0
- package/_cjs/actions/test/dropTransaction.js +11 -0
- package/_cjs/actions/test/dropTransaction.js.map +1 -0
- package/_cjs/actions/test/dumpState.js +10 -0
- package/_cjs/actions/test/dumpState.js.map +1 -0
- package/_cjs/actions/test/getAutomine.js +14 -0
- package/_cjs/actions/test/getAutomine.js.map +1 -0
- package/_cjs/actions/test/getTxpoolContent.js +10 -0
- package/_cjs/actions/test/getTxpoolContent.js.map +1 -0
- package/_cjs/actions/test/getTxpoolStatus.js +15 -0
- package/_cjs/actions/test/getTxpoolStatus.js.map +1 -0
- package/_cjs/actions/test/impersonateAccount.js +11 -0
- package/_cjs/actions/test/impersonateAccount.js.map +1 -0
- package/_cjs/actions/test/increaseTime.js +12 -0
- package/_cjs/actions/test/increaseTime.js.map +1 -0
- package/_cjs/actions/test/inspectTxpool.js +10 -0
- package/_cjs/actions/test/inspectTxpool.js.map +1 -0
- package/_cjs/actions/test/loadState.js +11 -0
- package/_cjs/actions/test/loadState.js.map +1 -0
- package/_cjs/actions/test/mine.js +18 -0
- package/_cjs/actions/test/mine.js.map +1 -0
- package/_cjs/actions/test/removeBlockTimestampInterval.js +10 -0
- package/_cjs/actions/test/removeBlockTimestampInterval.js.map +1 -0
- package/_cjs/actions/test/reset.js +11 -0
- package/_cjs/actions/test/reset.js.map +1 -0
- package/_cjs/actions/test/revert.js +11 -0
- package/_cjs/actions/test/revert.js.map +1 -0
- package/_cjs/actions/test/sendUnsignedTransaction.js +30 -0
- package/_cjs/actions/test/sendUnsignedTransaction.js.map +1 -0
- package/_cjs/actions/test/setAutomine.js +18 -0
- package/_cjs/actions/test/setAutomine.js.map +1 -0
- package/_cjs/actions/test/setBalance.js +18 -0
- package/_cjs/actions/test/setBalance.js.map +1 -0
- package/_cjs/actions/test/setBlockGasLimit.js +12 -0
- package/_cjs/actions/test/setBlockGasLimit.js.map +1 -0
- package/_cjs/actions/test/setBlockTimestampInterval.js +16 -0
- package/_cjs/actions/test/setBlockTimestampInterval.js.map +1 -0
- package/_cjs/actions/test/setCode.js +11 -0
- package/_cjs/actions/test/setCode.js.map +1 -0
- package/_cjs/actions/test/setCoinbase.js +11 -0
- package/_cjs/actions/test/setCoinbase.js.map +1 -0
- package/_cjs/actions/test/setIntervalMining.js +16 -0
- package/_cjs/actions/test/setIntervalMining.js.map +1 -0
- package/_cjs/actions/test/setLoggingEnabled.js +11 -0
- package/_cjs/actions/test/setLoggingEnabled.js.map +1 -0
- package/_cjs/actions/test/setMinGasPrice.js +12 -0
- package/_cjs/actions/test/setMinGasPrice.js.map +1 -0
- package/_cjs/actions/test/setNextBlockBaseFeePerGas.js +12 -0
- package/_cjs/actions/test/setNextBlockBaseFeePerGas.js.map +1 -0
- package/_cjs/actions/test/setNextBlockTimestamp.js +12 -0
- package/_cjs/actions/test/setNextBlockTimestamp.js.map +1 -0
- package/_cjs/actions/test/setNonce.js +12 -0
- package/_cjs/actions/test/setNonce.js.map +1 -0
- package/_cjs/actions/test/setRpcUrl.js +11 -0
- package/_cjs/actions/test/setRpcUrl.js.map +1 -0
- package/_cjs/actions/test/setStorageAt.js +16 -0
- package/_cjs/actions/test/setStorageAt.js.map +1 -0
- package/_cjs/actions/test/snapshot.js +10 -0
- package/_cjs/actions/test/snapshot.js.map +1 -0
- package/_cjs/actions/test/stopImpersonatingAccount.js +11 -0
- package/_cjs/actions/test/stopImpersonatingAccount.js.map +1 -0
- package/_cjs/actions/wallet/addChain.js +23 -0
- package/_cjs/actions/wallet/addChain.js.map +1 -0
- package/_cjs/actions/wallet/deployContract.js +15 -0
- package/_cjs/actions/wallet/deployContract.js.map +1 -0
- package/_cjs/actions/wallet/getAddresses.js +12 -0
- package/_cjs/actions/wallet/getAddresses.js.map +1 -0
- package/_cjs/actions/wallet/getPermissions.js +9 -0
- package/_cjs/actions/wallet/getPermissions.js.map +1 -0
- package/_cjs/actions/wallet/prepareTransactionRequest.js +71 -0
- package/_cjs/actions/wallet/prepareTransactionRequest.js.map +1 -0
- package/_cjs/actions/wallet/requestAddresses.js +10 -0
- package/_cjs/actions/wallet/requestAddresses.js.map +1 -0
- package/_cjs/actions/wallet/requestPermissions.js +11 -0
- package/_cjs/actions/wallet/requestPermissions.js.map +1 -0
- package/_cjs/actions/wallet/sendRawTransaction.js +11 -0
- package/_cjs/actions/wallet/sendRawTransaction.js.map +1 -0
- package/_cjs/actions/wallet/sendTransaction.js +87 -0
- package/_cjs/actions/wallet/sendTransaction.js.map +1 -0
- package/_cjs/actions/wallet/signMessage.js +28 -0
- package/_cjs/actions/wallet/signMessage.js.map +1 -0
- package/_cjs/actions/wallet/signTransaction.js +48 -0
- package/_cjs/actions/wallet/signTransaction.js.map +1 -0
- package/_cjs/actions/wallet/signTypedData.js +30 -0
- package/_cjs/actions/wallet/signTypedData.js.map +1 -0
- package/_cjs/actions/wallet/switchChain.js +16 -0
- package/_cjs/actions/wallet/switchChain.js.map +1 -0
- package/_cjs/actions/wallet/watchAsset.js +12 -0
- package/_cjs/actions/wallet/watchAsset.js.map +1 -0
- package/_cjs/actions/wallet/writeContract.js +18 -0
- package/_cjs/actions/wallet/writeContract.js.map +1 -0
- package/_cjs/chains/celo/chainConfig.js +10 -0
- package/_cjs/chains/celo/chainConfig.js.map +1 -0
- package/_cjs/chains/celo/formatters.js +82 -0
- package/_cjs/chains/celo/formatters.js.map +1 -0
- package/_cjs/chains/celo/index.js +10 -0
- package/_cjs/chains/celo/index.js.map +1 -0
- package/_cjs/chains/celo/parsers.js +131 -0
- package/_cjs/chains/celo/parsers.js.map +1 -0
- package/_cjs/chains/celo/serializers.js +131 -0
- package/_cjs/chains/celo/serializers.js.map +1 -0
- package/_cjs/chains/celo/types.js +3 -0
- package/_cjs/chains/celo/types.js.map +1 -0
- package/_cjs/chains/celo/utils.js +44 -0
- package/_cjs/chains/celo/utils.js.map +1 -0
- package/_cjs/chains/definitions/arbitrum.js +24 -0
- package/_cjs/chains/definitions/arbitrum.js.map +1 -0
- package/_cjs/chains/definitions/arbitrumGoerli.js +30 -0
- package/_cjs/chains/definitions/arbitrumGoerli.js.map +1 -0
- package/_cjs/chains/definitions/arbitrumNova.js +24 -0
- package/_cjs/chains/definitions/arbitrumNova.js.map +1 -0
- package/_cjs/chains/definitions/arbitrumSepolia.js +32 -0
- package/_cjs/chains/definitions/arbitrumSepolia.js.map +1 -0
- package/_cjs/chains/definitions/astar.js +29 -0
- package/_cjs/chains/definitions/astar.js.map +1 -0
- package/_cjs/chains/definitions/astarZkatana.js +42 -0
- package/_cjs/chains/definitions/astarZkatana.js.map +1 -0
- package/_cjs/chains/definitions/aurora.js +20 -0
- package/_cjs/chains/definitions/aurora.js.map +1 -0
- package/_cjs/chains/definitions/auroraTestnet.js +21 -0
- package/_cjs/chains/definitions/auroraTestnet.js.map +1 -0
- package/_cjs/chains/definitions/avalanche.js +26 -0
- package/_cjs/chains/definitions/avalanche.js.map +1 -0
- package/_cjs/chains/definitions/avalancheFuji.js +27 -0
- package/_cjs/chains/definitions/avalancheFuji.js.map +1 -0
- package/_cjs/chains/definitions/base.js +30 -0
- package/_cjs/chains/definitions/base.js.map +1 -0
- package/_cjs/chains/definitions/baseGoerli.js +30 -0
- package/_cjs/chains/definitions/baseGoerli.js.map +1 -0
- package/_cjs/chains/definitions/baseSepolia.js +34 -0
- package/_cjs/chains/definitions/baseSepolia.js.map +1 -0
- package/_cjs/chains/definitions/bearNetworkChainMainnet.js +20 -0
- package/_cjs/chains/definitions/bearNetworkChainMainnet.js.map +1 -0
- package/_cjs/chains/definitions/bearNetworkChainTestnet.js +24 -0
- package/_cjs/chains/definitions/bearNetworkChainTestnet.js.map +1 -0
- package/_cjs/chains/definitions/boba.js +26 -0
- package/_cjs/chains/definitions/boba.js.map +1 -0
- package/_cjs/chains/definitions/bronos.js +20 -0
- package/_cjs/chains/definitions/bronos.js.map +1 -0
- package/_cjs/chains/definitions/bronosTestnet.js +21 -0
- package/_cjs/chains/definitions/bronosTestnet.js.map +1 -0
- package/_cjs/chains/definitions/bsc.js +26 -0
- package/_cjs/chains/definitions/bsc.js.map +1 -0
- package/_cjs/chains/definitions/bscTestnet.js +27 -0
- package/_cjs/chains/definitions/bscTestnet.js.map +1 -0
- package/_cjs/chains/definitions/bxn.js +21 -0
- package/_cjs/chains/definitions/bxn.js.map +1 -0
- package/_cjs/chains/definitions/bxnTestnet.js +25 -0
- package/_cjs/chains/definitions/bxnTestnet.js.map +1 -0
- package/_cjs/chains/definitions/canto.js +29 -0
- package/_cjs/chains/definitions/canto.js.map +1 -0
- package/_cjs/chains/definitions/celo.js +32 -0
- package/_cjs/chains/definitions/celo.js.map +1 -0
- package/_cjs/chains/definitions/celoAlfajores.js +34 -0
- package/_cjs/chains/definitions/celoAlfajores.js.map +1 -0
- package/_cjs/chains/definitions/celoCannoli.js +34 -0
- package/_cjs/chains/definitions/celoCannoli.js.map +1 -0
- package/_cjs/chains/definitions/chiliz.js +26 -0
- package/_cjs/chains/definitions/chiliz.js.map +1 -0
- package/_cjs/chains/definitions/classic.js +23 -0
- package/_cjs/chains/definitions/classic.js.map +1 -0
- package/_cjs/chains/definitions/confluxESpace.js +27 -0
- package/_cjs/chains/definitions/confluxESpace.js.map +1 -0
- package/_cjs/chains/definitions/coreDao.js +27 -0
- package/_cjs/chains/definitions/coreDao.js.map +1 -0
- package/_cjs/chains/definitions/cronos.js +26 -0
- package/_cjs/chains/definitions/cronos.js.map +1 -0
- package/_cjs/chains/definitions/cronosTestnet.js +30 -0
- package/_cjs/chains/definitions/cronosTestnet.js.map +1 -0
- package/_cjs/chains/definitions/crossbell.js +28 -0
- package/_cjs/chains/definitions/crossbell.js.map +1 -0
- package/_cjs/chains/definitions/dfk.js +25 -0
- package/_cjs/chains/definitions/dfk.js.map +1 -0
- package/_cjs/chains/definitions/dogechain.js +23 -0
- package/_cjs/chains/definitions/dogechain.js.map +1 -0
- package/_cjs/chains/definitions/edgeware.js +26 -0
- package/_cjs/chains/definitions/edgeware.js.map +1 -0
- package/_cjs/chains/definitions/edgewareTestnet.js +23 -0
- package/_cjs/chains/definitions/edgewareTestnet.js.map +1 -0
- package/_cjs/chains/definitions/ekta.js +20 -0
- package/_cjs/chains/definitions/ekta.js.map +1 -0
- package/_cjs/chains/definitions/ektaTestnet.js +21 -0
- package/_cjs/chains/definitions/ektaTestnet.js.map +1 -0
- package/_cjs/chains/definitions/eon.js +24 -0
- package/_cjs/chains/definitions/eon.js.map +1 -0
- package/_cjs/chains/definitions/eos.js +29 -0
- package/_cjs/chains/definitions/eos.js.map +1 -0
- package/_cjs/chains/definitions/eosTestnet.js +30 -0
- package/_cjs/chains/definitions/eosTestnet.js.map +1 -0
- package/_cjs/chains/definitions/evmos.js +20 -0
- package/_cjs/chains/definitions/evmos.js.map +1 -0
- package/_cjs/chains/definitions/evmosTestnet.js +23 -0
- package/_cjs/chains/definitions/evmosTestnet.js.map +1 -0
- package/_cjs/chains/definitions/fantom.js +26 -0
- package/_cjs/chains/definitions/fantom.js.map +1 -0
- package/_cjs/chains/definitions/fantomTestnet.js +26 -0
- package/_cjs/chains/definitions/fantomTestnet.js.map +1 -0
- package/_cjs/chains/definitions/fibo.js +20 -0
- package/_cjs/chains/definitions/fibo.js.map +1 -0
- package/_cjs/chains/definitions/filecoin.js +20 -0
- package/_cjs/chains/definitions/filecoin.js.map +1 -0
- package/_cjs/chains/definitions/filecoinCalibration.js +20 -0
- package/_cjs/chains/definitions/filecoinCalibration.js.map +1 -0
- package/_cjs/chains/definitions/filecoinHyperspace.js +20 -0
- package/_cjs/chains/definitions/filecoinHyperspace.js.map +1 -0
- package/_cjs/chains/definitions/flare.js +23 -0
- package/_cjs/chains/definitions/flare.js.map +1 -0
- package/_cjs/chains/definitions/flareTestnet.js +24 -0
- package/_cjs/chains/definitions/flareTestnet.js.map +1 -0
- package/_cjs/chains/definitions/foundry.js +20 -0
- package/_cjs/chains/definitions/foundry.js.map +1 -0
- package/_cjs/chains/definitions/fuse.js +22 -0
- package/_cjs/chains/definitions/fuse.js.map +1 -0
- package/_cjs/chains/definitions/fuseSparknet.js +19 -0
- package/_cjs/chains/definitions/fuseSparknet.js.map +1 -0
- package/_cjs/chains/definitions/gnosis.js +32 -0
- package/_cjs/chains/definitions/gnosis.js.map +1 -0
- package/_cjs/chains/definitions/gnosisChiado.js +33 -0
- package/_cjs/chains/definitions/gnosisChiado.js.map +1 -0
- package/_cjs/chains/definitions/gobi.js +22 -0
- package/_cjs/chains/definitions/gobi.js.map +1 -0
- package/_cjs/chains/definitions/goerli.js +35 -0
- package/_cjs/chains/definitions/goerli.js.map +1 -0
- package/_cjs/chains/definitions/haqqMainnet.js +25 -0
- package/_cjs/chains/definitions/haqqMainnet.js.map +1 -0
- package/_cjs/chains/definitions/haqqTestedge2.js +25 -0
- package/_cjs/chains/definitions/haqqTestedge2.js.map +1 -0
- package/_cjs/chains/definitions/hardhat.js +17 -0
- package/_cjs/chains/definitions/hardhat.js.map +1 -0
- package/_cjs/chains/definitions/harmonyOne.js +26 -0
- package/_cjs/chains/definitions/harmonyOne.js.map +1 -0
- package/_cjs/chains/definitions/holesky.js +22 -0
- package/_cjs/chains/definitions/holesky.js.map +1 -0
- package/_cjs/chains/definitions/iotex.js +23 -0
- package/_cjs/chains/definitions/iotex.js.map +1 -0
- package/_cjs/chains/definitions/iotexTestnet.js +23 -0
- package/_cjs/chains/definitions/iotexTestnet.js.map +1 -0
- package/_cjs/chains/definitions/kava.js +29 -0
- package/_cjs/chains/definitions/kava.js.map +1 -0
- package/_cjs/chains/definitions/kavaTestnet.js +32 -0
- package/_cjs/chains/definitions/kavaTestnet.js.map +1 -0
- package/_cjs/chains/definitions/klaytn.js +20 -0
- package/_cjs/chains/definitions/klaytn.js.map +1 -0
- package/_cjs/chains/definitions/kroma.js +22 -0
- package/_cjs/chains/definitions/kroma.js.map +1 -0
- package/_cjs/chains/definitions/kromaSepolia.js +22 -0
- package/_cjs/chains/definitions/kromaSepolia.js.map +1 -0
- package/_cjs/chains/definitions/linea.js +29 -0
- package/_cjs/chains/definitions/linea.js.map +1 -0
- package/_cjs/chains/definitions/lineaTestnet.js +29 -0
- package/_cjs/chains/definitions/lineaTestnet.js.map +1 -0
- package/_cjs/chains/definitions/localhost.js +17 -0
- package/_cjs/chains/definitions/localhost.js.map +1 -0
- package/_cjs/chains/definitions/lukso.js +31 -0
- package/_cjs/chains/definitions/lukso.js.map +1 -0
- package/_cjs/chains/definitions/mainnet.js +34 -0
- package/_cjs/chains/definitions/mainnet.js.map +1 -0
- package/_cjs/chains/definitions/manta.js +35 -0
- package/_cjs/chains/definitions/manta.js.map +1 -0
- package/_cjs/chains/definitions/mantaTestnet.js +36 -0
- package/_cjs/chains/definitions/mantaTestnet.js.map +1 -0
- package/_cjs/chains/definitions/mantle.js +29 -0
- package/_cjs/chains/definitions/mantle.js.map +1 -0
- package/_cjs/chains/definitions/mantleTestnet.js +24 -0
- package/_cjs/chains/definitions/mantleTestnet.js.map +1 -0
- package/_cjs/chains/definitions/meter.js +20 -0
- package/_cjs/chains/definitions/meter.js.map +1 -0
- package/_cjs/chains/definitions/meterTestnet.js +23 -0
- package/_cjs/chains/definitions/meterTestnet.js.map +1 -0
- package/_cjs/chains/definitions/metis.js +29 -0
- package/_cjs/chains/definitions/metis.js.map +1 -0
- package/_cjs/chains/definitions/metisGoerli.js +29 -0
- package/_cjs/chains/definitions/metisGoerli.js.map +1 -0
- package/_cjs/chains/definitions/mev.js +31 -0
- package/_cjs/chains/definitions/mev.js.map +1 -0
- package/_cjs/chains/definitions/mevTestnet.js +32 -0
- package/_cjs/chains/definitions/mevTestnet.js.map +1 -0
- package/_cjs/chains/definitions/modeTestnet.js +28 -0
- package/_cjs/chains/definitions/modeTestnet.js.map +1 -0
- package/_cjs/chains/definitions/moonbaseAlpha.js +33 -0
- package/_cjs/chains/definitions/moonbaseAlpha.js.map +1 -0
- package/_cjs/chains/definitions/moonbeam.js +33 -0
- package/_cjs/chains/definitions/moonbeam.js.map +1 -0
- package/_cjs/chains/definitions/moonbeamDev.js +20 -0
- package/_cjs/chains/definitions/moonbeamDev.js.map +1 -0
- package/_cjs/chains/definitions/moonriver.js +33 -0
- package/_cjs/chains/definitions/moonriver.js.map +1 -0
- package/_cjs/chains/definitions/neonDevnet.js +28 -0
- package/_cjs/chains/definitions/neonDevnet.js.map +1 -0
- package/_cjs/chains/definitions/neonMainnet.js +27 -0
- package/_cjs/chains/definitions/neonMainnet.js.map +1 -0
- package/_cjs/chains/definitions/nexi.js +27 -0
- package/_cjs/chains/definitions/nexi.js.map +1 -0
- package/_cjs/chains/definitions/nexilix.js +26 -0
- package/_cjs/chains/definitions/nexilix.js.map +1 -0
- package/_cjs/chains/definitions/oasys.js +21 -0
- package/_cjs/chains/definitions/oasys.js.map +1 -0
- package/_cjs/chains/definitions/okc.js +26 -0
- package/_cjs/chains/definitions/okc.js.map +1 -0
- package/_cjs/chains/definitions/opBNB.js +26 -0
- package/_cjs/chains/definitions/opBNB.js.map +1 -0
- package/_cjs/chains/definitions/opBNBTestnet.js +27 -0
- package/_cjs/chains/definitions/opBNBTestnet.js.map +1 -0
- package/_cjs/chains/definitions/optimism.js +30 -0
- package/_cjs/chains/definitions/optimism.js.map +1 -0
- package/_cjs/chains/definitions/optimismGoerli.js +31 -0
- package/_cjs/chains/definitions/optimismGoerli.js.map +1 -0
- package/_cjs/chains/definitions/optimismSepolia.js +31 -0
- package/_cjs/chains/definitions/optimismSepolia.js.map +1 -0
- package/_cjs/chains/definitions/plinga.js +27 -0
- package/_cjs/chains/definitions/plinga.js.map +1 -0
- package/_cjs/chains/definitions/polygon.js +27 -0
- package/_cjs/chains/definitions/polygon.js.map +1 -0
- package/_cjs/chains/definitions/polygonMumbai.js +28 -0
- package/_cjs/chains/definitions/polygonMumbai.js.map +1 -0
- package/_cjs/chains/definitions/polygonZkEvm.js +27 -0
- package/_cjs/chains/definitions/polygonZkEvm.js.map +1 -0
- package/_cjs/chains/definitions/polygonZkEvmTestnet.js +28 -0
- package/_cjs/chains/definitions/polygonZkEvmTestnet.js.map +1 -0
- package/_cjs/chains/definitions/pulsechain.js +32 -0
- package/_cjs/chains/definitions/pulsechain.js.map +1 -0
- package/_cjs/chains/definitions/pulsechainV4.js +32 -0
- package/_cjs/chains/definitions/pulsechainV4.js.map +1 -0
- package/_cjs/chains/definitions/qMainnet.js +23 -0
- package/_cjs/chains/definitions/qMainnet.js.map +1 -0
- package/_cjs/chains/definitions/qTestnet.js +24 -0
- package/_cjs/chains/definitions/qTestnet.js.map +1 -0
- package/_cjs/chains/definitions/rollux.js +29 -0
- package/_cjs/chains/definitions/rollux.js.map +1 -0
- package/_cjs/chains/definitions/rolluxTestnet.js +32 -0
- package/_cjs/chains/definitions/rolluxTestnet.js.map +1 -0
- package/_cjs/chains/definitions/ronin.js +24 -0
- package/_cjs/chains/definitions/ronin.js.map +1 -0
- package/_cjs/chains/definitions/saigon.js +28 -0
- package/_cjs/chains/definitions/saigon.js.map +1 -0
- package/_cjs/chains/definitions/scroll.js +29 -0
- package/_cjs/chains/definitions/scroll.js.map +1 -0
- package/_cjs/chains/definitions/scrollSepolia.js +28 -0
- package/_cjs/chains/definitions/scrollSepolia.js.map +1 -0
- package/_cjs/chains/definitions/scrollTestnet.js +23 -0
- package/_cjs/chains/definitions/scrollTestnet.js.map +1 -0
- package/_cjs/chains/definitions/sepolia.js +33 -0
- package/_cjs/chains/definitions/sepolia.js.map +1 -0
- package/_cjs/chains/definitions/shardeumSphinx.js +22 -0
- package/_cjs/chains/definitions/shardeumSphinx.js.map +1 -0
- package/_cjs/chains/definitions/skale/brawl.js +23 -0
- package/_cjs/chains/definitions/skale/brawl.js.map +1 -0
- package/_cjs/chains/definitions/skale/calypso.js +30 -0
- package/_cjs/chains/definitions/skale/calypso.js.map +1 -0
- package/_cjs/chains/definitions/skale/calypsoTestnet.js +33 -0
- package/_cjs/chains/definitions/skale/calypsoTestnet.js.map +1 -0
- package/_cjs/chains/definitions/skale/chaosTestnet.js +33 -0
- package/_cjs/chains/definitions/skale/chaosTestnet.js.map +1 -0
- package/_cjs/chains/definitions/skale/cryptoBlades.js +25 -0
- package/_cjs/chains/definitions/skale/cryptoBlades.js.map +1 -0
- package/_cjs/chains/definitions/skale/cryptoColosseum.js +23 -0
- package/_cjs/chains/definitions/skale/cryptoColosseum.js.map +1 -0
- package/_cjs/chains/definitions/skale/europa.js +28 -0
- package/_cjs/chains/definitions/skale/europa.js.map +1 -0
- package/_cjs/chains/definitions/skale/europaTestnet.js +31 -0
- package/_cjs/chains/definitions/skale/europaTestnet.js.map +1 -0
- package/_cjs/chains/definitions/skale/exorde.js +23 -0
- package/_cjs/chains/definitions/skale/exorde.js.map +1 -0
- package/_cjs/chains/definitions/skale/humanProtocol.js +23 -0
- package/_cjs/chains/definitions/skale/humanProtocol.js.map +1 -0
- package/_cjs/chains/definitions/skale/nebula.js +28 -0
- package/_cjs/chains/definitions/skale/nebula.js.map +1 -0
- package/_cjs/chains/definitions/skale/nebulaTestnet.js +31 -0
- package/_cjs/chains/definitions/skale/nebulaTestnet.js.map +1 -0
- package/_cjs/chains/definitions/skale/razor.js +23 -0
- package/_cjs/chains/definitions/skale/razor.js.map +1 -0
- package/_cjs/chains/definitions/skale/titan.js +28 -0
- package/_cjs/chains/definitions/skale/titan.js.map +1 -0
- package/_cjs/chains/definitions/skale/titanTestnet.js +33 -0
- package/_cjs/chains/definitions/skale/titanTestnet.js.map +1 -0
- package/_cjs/chains/definitions/songbird.js +23 -0
- package/_cjs/chains/definitions/songbird.js.map +1 -0
- package/_cjs/chains/definitions/songbirdTestnet.js +24 -0
- package/_cjs/chains/definitions/songbirdTestnet.js.map +1 -0
- package/_cjs/chains/definitions/spicy.js +34 -0
- package/_cjs/chains/definitions/spicy.js.map +1 -0
- package/_cjs/chains/definitions/syscoin.js +29 -0
- package/_cjs/chains/definitions/syscoin.js.map +1 -0
- package/_cjs/chains/definitions/syscoinTestnet.js +29 -0
- package/_cjs/chains/definitions/syscoinTestnet.js.map +1 -0
- package/_cjs/chains/definitions/taikoJolnir.js +21 -0
- package/_cjs/chains/definitions/taikoJolnir.js.map +1 -0
- package/_cjs/chains/definitions/taikoTestnetSepolia.js +21 -0
- package/_cjs/chains/definitions/taikoTestnetSepolia.js.map +1 -0
- package/_cjs/chains/definitions/taraxa.js +21 -0
- package/_cjs/chains/definitions/taraxa.js.map +1 -0
- package/_cjs/chains/definitions/taraxaTestnet.js +22 -0
- package/_cjs/chains/definitions/taraxaTestnet.js.map +1 -0
- package/_cjs/chains/definitions/telos.js +29 -0
- package/_cjs/chains/definitions/telos.js.map +1 -0
- package/_cjs/chains/definitions/telosTestnet.js +24 -0
- package/_cjs/chains/definitions/telosTestnet.js.map +1 -0
- package/_cjs/chains/definitions/tenet.js +23 -0
- package/_cjs/chains/definitions/tenet.js.map +1 -0
- package/_cjs/chains/definitions/thunderTestnet.js +22 -0
- package/_cjs/chains/definitions/thunderTestnet.js.map +1 -0
- package/_cjs/chains/definitions/vechain.js +25 -0
- package/_cjs/chains/definitions/vechain.js.map +1 -0
- package/_cjs/chains/definitions/wanchain.js +30 -0
- package/_cjs/chains/definitions/wanchain.js.map +1 -0
- package/_cjs/chains/definitions/wanchainTestnet.js +28 -0
- package/_cjs/chains/definitions/wanchainTestnet.js.map +1 -0
- package/_cjs/chains/definitions/xdc.js +21 -0
- package/_cjs/chains/definitions/xdc.js.map +1 -0
- package/_cjs/chains/definitions/xdcTestnet.js +21 -0
- package/_cjs/chains/definitions/xdcTestnet.js.map +1 -0
- package/_cjs/chains/definitions/zetachainAthensTestnet.js +26 -0
- package/_cjs/chains/definitions/zetachainAthensTestnet.js.map +1 -0
- package/_cjs/chains/definitions/zhejiang.js +22 -0
- package/_cjs/chains/definitions/zhejiang.js.map +1 -0
- package/_cjs/chains/definitions/zkSync.js +34 -0
- package/_cjs/chains/definitions/zkSync.js.map +1 -0
- package/_cjs/chains/definitions/zkSyncTestnet.js +31 -0
- package/_cjs/chains/definitions/zkSyncTestnet.js.map +1 -0
- package/_cjs/chains/definitions/zora.js +32 -0
- package/_cjs/chains/definitions/zora.js.map +1 -0
- package/_cjs/chains/definitions/zoraSepolia.js +41 -0
- package/_cjs/chains/definitions/zoraSepolia.js.map +1 -0
- package/_cjs/chains/definitions/zoraTestnet.js +36 -0
- package/_cjs/chains/definitions/zoraTestnet.js.map +1 -0
- package/_cjs/chains/index.js +325 -0
- package/_cjs/chains/index.js.map +1 -0
- package/_cjs/chains/opStack/abis.js +77 -0
- package/_cjs/chains/opStack/abis.js.map +1 -0
- package/_cjs/chains/opStack/actions/estimateContractL1Fee.js +36 -0
- package/_cjs/chains/opStack/actions/estimateContractL1Fee.js.map +1 -0
- package/_cjs/chains/opStack/actions/estimateContractL1Gas.js +36 -0
- package/_cjs/chains/opStack/actions/estimateContractL1Gas.js.map +1 -0
- package/_cjs/chains/opStack/actions/estimateContractTotalFee.js +36 -0
- package/_cjs/chains/opStack/actions/estimateContractTotalFee.js.map +1 -0
- package/_cjs/chains/opStack/actions/estimateContractTotalGas.js +36 -0
- package/_cjs/chains/opStack/actions/estimateContractTotalGas.js.map +1 -0
- package/_cjs/chains/opStack/actions/estimateL1Fee.js +53 -0
- package/_cjs/chains/opStack/actions/estimateL1Fee.js.map +1 -0
- package/_cjs/chains/opStack/actions/estimateL1Gas.js +53 -0
- package/_cjs/chains/opStack/actions/estimateL1Gas.js.map +1 -0
- package/_cjs/chains/opStack/actions/estimateTotalFee.js +18 -0
- package/_cjs/chains/opStack/actions/estimateTotalFee.js.map +1 -0
- package/_cjs/chains/opStack/actions/estimateTotalGas.js +16 -0
- package/_cjs/chains/opStack/actions/estimateTotalGas.js.map +1 -0
- package/_cjs/chains/opStack/chainConfig.js +10 -0
- package/_cjs/chains/opStack/chainConfig.js.map +1 -0
- package/_cjs/chains/opStack/contracts.js +16 -0
- package/_cjs/chains/opStack/contracts.js.map +1 -0
- package/_cjs/chains/opStack/decorators/public.js +27 -0
- package/_cjs/chains/opStack/decorators/public.js.map +1 -0
- package/_cjs/chains/opStack/formatters.js +54 -0
- package/_cjs/chains/opStack/formatters.js.map +1 -0
- package/_cjs/chains/opStack/index.js +42 -0
- package/_cjs/chains/opStack/index.js.map +1 -0
- package/_cjs/chains/opStack/types.js +3 -0
- package/_cjs/chains/opStack/types.js.map +1 -0
- package/_cjs/chains/utils.js +12 -0
- package/_cjs/chains/utils.js.map +1 -0
- package/_cjs/chains/zksync/chainConfig.js +10 -0
- package/_cjs/chains/zksync/chainConfig.js.map +1 -0
- package/_cjs/chains/zksync/formatters.js +128 -0
- package/_cjs/chains/zksync/formatters.js.map +1 -0
- package/_cjs/chains/zksync/index.js +8 -0
- package/_cjs/chains/zksync/index.js.map +1 -0
- package/_cjs/chains/zksync/serializers.js +74 -0
- package/_cjs/chains/zksync/serializers.js.map +1 -0
- package/_cjs/chains/zksync/types.js +3 -0
- package/_cjs/chains/zksync/types.js.map +1 -0
- package/_cjs/clients/createClient.js +42 -0
- package/_cjs/clients/createClient.js.map +1 -0
- package/_cjs/clients/createPublicClient.js +17 -0
- package/_cjs/clients/createPublicClient.js.map +1 -0
- package/_cjs/clients/createTestClient.js +20 -0
- package/_cjs/clients/createTestClient.js.map +1 -0
- package/_cjs/clients/createWalletClient.js +18 -0
- package/_cjs/clients/createWalletClient.js.map +1 -0
- package/_cjs/clients/decorators/public.js +101 -0
- package/_cjs/clients/decorators/public.js.map +1 -0
- package/_cjs/clients/decorators/test.js +74 -0
- package/_cjs/clients/decorators/test.js.map +1 -0
- package/_cjs/clients/decorators/wallet.js +41 -0
- package/_cjs/clients/decorators/wallet.js.map +1 -0
- package/_cjs/clients/transports/createTransport.js +13 -0
- package/_cjs/clients/transports/createTransport.js.map +1 -0
- package/_cjs/clients/transports/custom.js +17 -0
- package/_cjs/clients/transports/custom.js.map +1 -0
- package/_cjs/clients/transports/fallback.js +122 -0
- package/_cjs/clients/transports/fallback.js.map +1 -0
- package/_cjs/clients/transports/http.js +59 -0
- package/_cjs/clients/transports/http.js.map +1 -0
- package/_cjs/clients/transports/webSocket.js +81 -0
- package/_cjs/clients/transports/webSocket.js.map +1 -0
- package/_cjs/constants/abis.js +1350 -0
- package/_cjs/constants/abis.js.map +1 -0
- package/_cjs/constants/address.js +5 -0
- package/_cjs/constants/address.js.map +1 -0
- package/_cjs/constants/bytes.js +5 -0
- package/_cjs/constants/bytes.js.map +1 -0
- package/_cjs/constants/contract.js +5 -0
- package/_cjs/constants/contract.js.map +1 -0
- package/_cjs/constants/contracts.js +5 -0
- package/_cjs/constants/contracts.js.map +1 -0
- package/_cjs/constants/number.js +101 -0
- package/_cjs/constants/number.js.map +1 -0
- package/_cjs/constants/solidity.js +35 -0
- package/_cjs/constants/solidity.js.map +1 -0
- package/_cjs/constants/strings.js +5 -0
- package/_cjs/constants/strings.js.map +1 -0
- package/_cjs/constants/unit.js +16 -0
- package/_cjs/constants/unit.js.map +1 -0
- package/_cjs/ens/index.js +20 -0
- package/_cjs/ens/index.js.map +1 -0
- package/_cjs/errors/abi.js +461 -0
- package/_cjs/errors/abi.js.map +1 -0
- package/_cjs/errors/account.js +23 -0
- package/_cjs/errors/account.js.map +1 -0
- package/_cjs/errors/address.js +17 -0
- package/_cjs/errors/address.js.map +1 -0
- package/_cjs/errors/base.js +83 -0
- package/_cjs/errors/base.js.map +1 -0
- package/_cjs/errors/block.js +22 -0
- package/_cjs/errors/block.js.map +1 -0
- package/_cjs/errors/ccip.js +69 -0
- package/_cjs/errors/ccip.js.map +1 -0
- package/_cjs/errors/chain.js +86 -0
- package/_cjs/errors/chain.js.map +1 -0
- package/_cjs/errors/contract.js +286 -0
- package/_cjs/errors/contract.js.map +1 -0
- package/_cjs/errors/cursor.js +29 -0
- package/_cjs/errors/cursor.js.map +1 -0
- package/_cjs/errors/data.js +31 -0
- package/_cjs/errors/data.js.map +1 -0
- package/_cjs/errors/encoding.js +65 -0
- package/_cjs/errors/encoding.js.map +1 -0
- package/_cjs/errors/ens.js +59 -0
- package/_cjs/errors/ens.js.map +1 -0
- package/_cjs/errors/estimateGas.js +49 -0
- package/_cjs/errors/estimateGas.js.map +1 -0
- package/_cjs/errors/fee.js +42 -0
- package/_cjs/errors/fee.js.map +1 -0
- package/_cjs/errors/log.js +17 -0
- package/_cjs/errors/log.js.map +1 -0
- package/_cjs/errors/node.js +262 -0
- package/_cjs/errors/node.js.map +1 -0
- package/_cjs/errors/request.js +107 -0
- package/_cjs/errors/request.js.map +1 -0
- package/_cjs/errors/rpc.js +448 -0
- package/_cjs/errors/rpc.js.map +1 -0
- package/_cjs/errors/transaction.js +225 -0
- package/_cjs/errors/transaction.js.map +1 -0
- package/_cjs/errors/transport.js +13 -0
- package/_cjs/errors/transport.js.map +1 -0
- package/_cjs/errors/version.js +1 -1
- package/_cjs/index.js +486 -0
- package/_cjs/index.js.map +1 -0
- package/_cjs/types/account.js +3 -0
- package/_cjs/types/account.js.map +1 -0
- package/_cjs/types/block.js +3 -0
- package/_cjs/types/block.js.map +1 -0
- package/_cjs/types/chain.js +3 -0
- package/_cjs/types/chain.js.map +1 -0
- package/_cjs/types/contract.js +3 -0
- package/_cjs/types/contract.js.map +1 -0
- package/_cjs/types/eip1193.js +24 -0
- package/_cjs/types/eip1193.js.map +1 -0
- package/_cjs/types/ens.js +3 -0
- package/_cjs/types/ens.js.map +1 -0
- package/_cjs/types/fee.js +3 -0
- package/_cjs/types/fee.js.map +1 -0
- package/_cjs/types/filter.js +3 -0
- package/_cjs/types/filter.js.map +1 -0
- package/_cjs/types/log.js +3 -0
- package/_cjs/types/log.js.map +1 -0
- package/_cjs/types/misc.js +3 -0
- package/_cjs/types/misc.js.map +1 -0
- package/_cjs/types/multicall.js +3 -0
- package/_cjs/types/multicall.js.map +1 -0
- package/_cjs/types/proof.js +3 -0
- package/_cjs/types/proof.js.map +1 -0
- package/_cjs/types/rpc.js +3 -0
- package/_cjs/types/rpc.js.map +1 -0
- package/_cjs/types/transaction.js +3 -0
- package/_cjs/types/transaction.js.map +1 -0
- package/_cjs/types/transport.js +3 -0
- package/_cjs/types/transport.js.map +1 -0
- package/_cjs/types/typedData.js +3 -0
- package/_cjs/types/typedData.js.map +1 -0
- package/_cjs/types/utils.js +3 -0
- package/_cjs/types/utils.js.map +1 -0
- package/_cjs/types/window.js +3 -0
- package/_cjs/types/window.js.map +1 -0
- package/_cjs/types/withdrawal.js +3 -0
- package/_cjs/types/withdrawal.js.map +1 -0
- package/_cjs/utils/abi/decodeAbiParameters.js +210 -0
- package/_cjs/utils/abi/decodeAbiParameters.js.map +1 -0
- package/_cjs/utils/abi/decodeDeployData.js +22 -0
- package/_cjs/utils/abi/decodeDeployData.js.map +1 -0
- package/_cjs/utils/abi/decodeErrorResult.js +30 -0
- package/_cjs/utils/abi/decodeErrorResult.js.map +1 -0
- package/_cjs/utils/abi/decodeEventLog.js +85 -0
- package/_cjs/utils/abi/decodeEventLog.js.map +1 -0
- package/_cjs/utils/abi/decodeFunctionData.js +28 -0
- package/_cjs/utils/abi/decodeFunctionData.js.map +1 -0
- package/_cjs/utils/abi/decodeFunctionResult.js +29 -0
- package/_cjs/utils/abi/decodeFunctionResult.js.map +1 -0
- package/_cjs/utils/abi/encodeAbiParameters.js +211 -0
- package/_cjs/utils/abi/encodeAbiParameters.js.map +1 -0
- package/_cjs/utils/abi/encodeDeployData.js +23 -0
- package/_cjs/utils/abi/encodeDeployData.js.map +1 -0
- package/_cjs/utils/abi/encodeErrorResult.js +33 -0
- package/_cjs/utils/abi/encodeErrorResult.js.map +1 -0
- package/_cjs/utils/abi/encodeEventTopics.js +53 -0
- package/_cjs/utils/abi/encodeEventTopics.js.map +1 -0
- package/_cjs/utils/abi/encodeFunctionData.js +34 -0
- package/_cjs/utils/abi/encodeFunctionData.js.map +1 -0
- package/_cjs/utils/abi/encodeFunctionResult.js +27 -0
- package/_cjs/utils/abi/encodeFunctionResult.js.map +1 -0
- package/_cjs/utils/abi/encodePacked.js +73 -0
- package/_cjs/utils/abi/encodePacked.js.map +1 -0
- package/_cjs/utils/abi/formatAbiItem.js +27 -0
- package/_cjs/utils/abi/formatAbiItem.js.map +1 -0
- package/_cjs/utils/abi/formatAbiItemWithArgs.js +17 -0
- package/_cjs/utils/abi/formatAbiItemWithArgs.js.map +1 -0
- package/_cjs/utils/abi/getAbiItem.js +84 -0
- package/_cjs/utils/abi/getAbiItem.js.map +1 -0
- package/_cjs/utils/accounts.js +8 -0
- package/_cjs/utils/accounts.js.map +1 -0
- package/_cjs/utils/address/getAddress.js +31 -0
- package/_cjs/utils/address/getAddress.js.map +1 -0
- package/_cjs/utils/address/getContractAddress.js +42 -0
- package/_cjs/utils/address/getContractAddress.js.map +1 -0
- package/_cjs/utils/address/isAddress.js +9 -0
- package/_cjs/utils/address/isAddress.js.map +1 -0
- package/_cjs/utils/address/isAddressEqual.js +14 -0
- package/_cjs/utils/address/isAddressEqual.js.map +1 -0
- package/_cjs/utils/buildRequest.js +93 -0
- package/_cjs/utils/buildRequest.js.map +1 -0
- package/_cjs/utils/ccip.js +121 -0
- package/_cjs/utils/ccip.js.map +1 -0
- package/_cjs/utils/chain/assertCurrentChain.js +12 -0
- package/_cjs/utils/chain/assertCurrentChain.js.map +1 -0
- package/_cjs/utils/chain/defineChain.js +13 -0
- package/_cjs/utils/chain/defineChain.js.map +1 -0
- package/_cjs/utils/chain/extractChain.js +8 -0
- package/_cjs/utils/chain/extractChain.js.map +1 -0
- package/_cjs/utils/chain/getChainContractAddress.js +26 -0
- package/_cjs/utils/chain/getChainContractAddress.js.map +1 -0
- package/_cjs/utils/cursor.js +134 -0
- package/_cjs/utils/cursor.js.map +1 -0
- package/_cjs/utils/data/concat.js +28 -0
- package/_cjs/utils/data/concat.js.map +1 -0
- package/_cjs/utils/data/isBytes.js +14 -0
- package/_cjs/utils/data/isBytes.js.map +1 -0
- package/_cjs/utils/data/isBytesEqual.js +13 -0
- package/_cjs/utils/data/isBytesEqual.js.map +1 -0
- package/_cjs/utils/data/isHex.js +12 -0
- package/_cjs/utils/data/isHex.js.map +1 -0
- package/_cjs/utils/data/pad.js +42 -0
- package/_cjs/utils/data/pad.js.map +1 -0
- package/_cjs/utils/data/size.js +11 -0
- package/_cjs/utils/data/size.js.map +1 -0
- package/_cjs/utils/data/slice.js +54 -0
- package/_cjs/utils/data/slice.js.map +1 -0
- package/_cjs/utils/data/trim.js +25 -0
- package/_cjs/utils/data/trim.js.map +1 -0
- package/_cjs/utils/encoding/fromBytes.js +56 -0
- package/_cjs/utils/encoding/fromBytes.js.map +1 -0
- package/_cjs/utils/encoding/fromHex.js +70 -0
- package/_cjs/utils/encoding/fromHex.js.map +1 -0
- package/_cjs/utils/encoding/fromRlp.js +67 -0
- package/_cjs/utils/encoding/fromRlp.js.map +1 -0
- package/_cjs/utils/encoding/toBytes.js +83 -0
- package/_cjs/utils/encoding/toBytes.js.map +1 -0
- package/_cjs/utils/encoding/toHex.js +79 -0
- package/_cjs/utils/encoding/toHex.js.map +1 -0
- package/_cjs/utils/encoding/toRlp.js +105 -0
- package/_cjs/utils/encoding/toRlp.js.map +1 -0
- package/_cjs/utils/ens/avatar/parseAvatarRecord.js +34 -0
- package/_cjs/utils/ens/avatar/parseAvatarRecord.js.map +1 -0
- package/_cjs/utils/ens/avatar/utils.js +186 -0
- package/_cjs/utils/ens/avatar/utils.js.map +1 -0
- package/_cjs/utils/ens/encodeLabelhash.js +8 -0
- package/_cjs/utils/ens/encodeLabelhash.js.map +1 -0
- package/_cjs/utils/ens/encodedLabelToLabelhash.js +18 -0
- package/_cjs/utils/ens/encodedLabelToLabelhash.js.map +1 -0
- package/_cjs/utils/ens/errors.js +24 -0
- package/_cjs/utils/ens/errors.js.map +1 -0
- package/_cjs/utils/ens/labelhash.js +15 -0
- package/_cjs/utils/ens/labelhash.js.map +1 -0
- package/_cjs/utils/ens/namehash.js +24 -0
- package/_cjs/utils/ens/namehash.js.map +1 -0
- package/_cjs/utils/ens/normalize.js +9 -0
- package/_cjs/utils/ens/normalize.js.map +1 -0
- package/_cjs/utils/ens/packetToBytes.js +27 -0
- package/_cjs/utils/ens/packetToBytes.js.map +1 -0
- package/_cjs/utils/errors/getCallError.js +20 -0
- package/_cjs/utils/errors/getCallError.js.map +1 -0
- package/_cjs/utils/errors/getContractError.js +39 -0
- package/_cjs/utils/errors/getContractError.js.map +1 -0
- package/_cjs/utils/errors/getEstimateGasError.js +20 -0
- package/_cjs/utils/errors/getEstimateGasError.js.map +1 -0
- package/_cjs/utils/errors/getNodeError.js +65 -0
- package/_cjs/utils/errors/getNodeError.js.map +1 -0
- package/_cjs/utils/errors/getTransactionError.js +20 -0
- package/_cjs/utils/errors/getTransactionError.js.map +1 -0
- package/_cjs/utils/filters/createFilterRequestScope.js +14 -0
- package/_cjs/utils/filters/createFilterRequestScope.js.map +1 -0
- package/_cjs/utils/formatters/block.js +32 -0
- package/_cjs/utils/formatters/block.js.map +1 -0
- package/_cjs/utils/formatters/extract.js +24 -0
- package/_cjs/utils/formatters/extract.js.map +1 -0
- package/_cjs/utils/formatters/feeHistory.js +13 -0
- package/_cjs/utils/formatters/feeHistory.js.map +1 -0
- package/_cjs/utils/formatters/formatter.js +25 -0
- package/_cjs/utils/formatters/formatter.js.map +1 -0
- package/_cjs/utils/formatters/log.js +18 -0
- package/_cjs/utils/formatters/log.js.map +1 -0
- package/_cjs/utils/formatters/proof.js +22 -0
- package/_cjs/utils/formatters/proof.js.map +1 -0
- package/_cjs/utils/formatters/transaction.js +66 -0
- package/_cjs/utils/formatters/transaction.js.map +1 -0
- package/_cjs/utils/formatters/transactionReceipt.js +47 -0
- package/_cjs/utils/formatters/transactionReceipt.js.map +1 -0
- package/_cjs/utils/formatters/transactionRequest.js +39 -0
- package/_cjs/utils/formatters/transactionRequest.js.map +1 -0
- package/_cjs/utils/getAction.js +8 -0
- package/_cjs/utils/getAction.js.map +1 -0
- package/_cjs/utils/hash/getEventSelector.js +10 -0
- package/_cjs/utils/hash/getEventSelector.js.map +1 -0
- package/_cjs/utils/hash/getEventSignature.js +9 -0
- package/_cjs/utils/hash/getEventSignature.js.map +1 -0
- package/_cjs/utils/hash/getFunctionSelector.js +11 -0
- package/_cjs/utils/hash/getFunctionSelector.js.map +1 -0
- package/_cjs/utils/hash/getFunctionSignature.js +15 -0
- package/_cjs/utils/hash/getFunctionSignature.js.map +1 -0
- package/_cjs/utils/hash/hashFunction.js +17 -0
- package/_cjs/utils/hash/hashFunction.js.map +1 -0
- package/_cjs/utils/hash/isHash.js +10 -0
- package/_cjs/utils/hash/isHash.js.map +1 -0
- package/_cjs/utils/hash/keccak256.js +16 -0
- package/_cjs/utils/hash/keccak256.js.map +1 -0
- package/_cjs/utils/hash/normalizeSignature.js +48 -0
- package/_cjs/utils/hash/normalizeSignature.js.map +1 -0
- package/_cjs/utils/index.js +213 -0
- package/_cjs/utils/index.js.map +1 -0
- package/_cjs/utils/observe.js +42 -0
- package/_cjs/utils/observe.js.map +1 -0
- package/_cjs/utils/poll.js +27 -0
- package/_cjs/utils/poll.js.map +1 -0
- package/_cjs/utils/promise/createBatchScheduler.js +49 -0
- package/_cjs/utils/promise/createBatchScheduler.js.map +1 -0
- package/_cjs/utils/promise/withCache.js +47 -0
- package/_cjs/utils/promise/withCache.js.map +1 -0
- package/_cjs/utils/promise/withRetry.js +29 -0
- package/_cjs/utils/promise/withRetry.js.map +1 -0
- package/_cjs/utils/promise/withTimeout.js +35 -0
- package/_cjs/utils/promise/withTimeout.js.map +1 -0
- package/_cjs/utils/regex.js +7 -0
- package/_cjs/utils/regex.js.map +1 -0
- package/_cjs/utils/rpc.js +154 -0
- package/_cjs/utils/rpc.js.map +1 -0
- package/_cjs/utils/signature/compactSignatureToHex.js +10 -0
- package/_cjs/utils/signature/compactSignatureToHex.js.map +1 -0
- package/_cjs/utils/signature/compactSignatureToSignature.js +15 -0
- package/_cjs/utils/signature/compactSignatureToSignature.js.map +1 -0
- package/_cjs/utils/signature/hashMessage.js +20 -0
- package/_cjs/utils/signature/hashMessage.js.map +1 -0
- package/_cjs/utils/signature/hashTypedData.js +124 -0
- package/_cjs/utils/signature/hashTypedData.js.map +1 -0
- package/_cjs/utils/signature/hexToCompactSignature.js +14 -0
- package/_cjs/utils/signature/hexToCompactSignature.js.map +1 -0
- package/_cjs/utils/signature/hexToSignature.js +12 -0
- package/_cjs/utils/signature/hexToSignature.js.map +1 -0
- package/_cjs/utils/signature/recoverAddress.js +10 -0
- package/_cjs/utils/signature/recoverAddress.js.map +1 -0
- package/_cjs/utils/signature/recoverMessageAddress.js +10 -0
- package/_cjs/utils/signature/recoverMessageAddress.js.map +1 -0
- package/_cjs/utils/signature/recoverPublicKey.js +21 -0
- package/_cjs/utils/signature/recoverPublicKey.js.map +1 -0
- package/_cjs/utils/signature/recoverTypedDataAddress.js +19 -0
- package/_cjs/utils/signature/recoverTypedDataAddress.js.map +1 -0
- package/_cjs/utils/signature/signatureToCompactSignature.js +17 -0
- package/_cjs/utils/signature/signatureToCompactSignature.js.map +1 -0
- package/_cjs/utils/signature/signatureToHex.js +11 -0
- package/_cjs/utils/signature/signatureToHex.js.map +1 -0
- package/_cjs/utils/signature/verifyMessage.js +11 -0
- package/_cjs/utils/signature/verifyMessage.js.map +1 -0
- package/_cjs/utils/signature/verifyTypedData.js +18 -0
- package/_cjs/utils/signature/verifyTypedData.js.map +1 -0
- package/_cjs/utils/stringify.js +9 -0
- package/_cjs/utils/stringify.js.map +1 -0
- package/_cjs/utils/transaction/assertRequest.js +28 -0
- package/_cjs/utils/transaction/assertRequest.js.map +1 -0
- package/_cjs/utils/transaction/assertTransaction.js +51 -0
- package/_cjs/utils/transaction/assertTransaction.js.map +1 -0
- package/_cjs/utils/transaction/getSerializedTransactionType.js +18 -0
- package/_cjs/utils/transaction/getSerializedTransactionType.js.map +1 -0
- package/_cjs/utils/transaction/getTransactionType.js +19 -0
- package/_cjs/utils/transaction/getTransactionType.js.map +1 -0
- package/_cjs/utils/transaction/parseTransaction.js +213 -0
- package/_cjs/utils/transaction/parseTransaction.js.map +1 -0
- package/_cjs/utils/transaction/serializeAccessList.js +26 -0
- package/_cjs/utils/transaction/serializeAccessList.js.map +1 -0
- package/_cjs/utils/transaction/serializeTransaction.js +123 -0
- package/_cjs/utils/transaction/serializeTransaction.js.map +1 -0
- package/_cjs/utils/typedData.js +75 -0
- package/_cjs/utils/typedData.js.map +1 -0
- package/_cjs/utils/uid.js +18 -0
- package/_cjs/utils/uid.js.map +1 -0
- package/_cjs/utils/unit/formatEther.js +10 -0
- package/_cjs/utils/unit/formatEther.js.map +1 -0
- package/_cjs/utils/unit/formatGwei.js +10 -0
- package/_cjs/utils/unit/formatGwei.js.map +1 -0
- package/_cjs/utils/unit/formatUnits.js +18 -0
- package/_cjs/utils/unit/formatUnits.js.map +1 -0
- package/_cjs/utils/unit/parseEther.js +10 -0
- package/_cjs/utils/unit/parseEther.js.map +1 -0
- package/_cjs/utils/unit/parseGwei.js +10 -0
- package/_cjs/utils/unit/parseGwei.js.map +1 -0
- package/_cjs/utils/unit/parseUnits.js +38 -0
- package/_cjs/utils/unit/parseUnits.js.map +1 -0
- package/_cjs/utils/wait.js +8 -0
- package/_cjs/utils/wait.js.map +1 -0
- package/_cjs/window/index.js +4 -0
- package/_cjs/window/index.js.map +1 -0
- package/_esm/actions/test/dumpState.js +26 -0
- package/_esm/actions/test/dumpState.js.map +1 -0
- package/_esm/actions/test/loadState.js +27 -0
- package/_esm/actions/test/loadState.js.map +1 -0
- package/_esm/chains/celo/formatters.js.map +1 -1
- package/_esm/chains/definitions/chiliz.js +23 -0
- package/_esm/chains/definitions/chiliz.js.map +1 -0
- package/_esm/chains/definitions/lukso.js +28 -0
- package/_esm/chains/definitions/lukso.js.map +1 -0
- package/_esm/chains/definitions/spicy.js +31 -0
- package/_esm/chains/definitions/spicy.js.map +1 -0
- package/_esm/chains/index.js +3 -0
- package/_esm/chains/index.js.map +1 -1
- package/_esm/chains/opStack/decorators/public.js +1 -1
- package/_esm/chains/opStack/index.js +1 -1
- package/_esm/clients/decorators/test.js +4 -0
- package/_esm/clients/decorators/test.js.map +1 -1
- package/_esm/constants/bytes.js +2 -0
- package/_esm/constants/bytes.js.map +1 -0
- package/_esm/constants/strings.js +2 -0
- package/_esm/constants/strings.js.map +1 -0
- package/_esm/errors/version.js +1 -1
- package/_esm/index.js +2 -0
- package/_esm/index.js.map +1 -1
- package/_esm/utils/formatters/transaction.js +19 -1
- package/_esm/utils/formatters/transaction.js.map +1 -1
- package/_esm/utils/signature/hashMessage.js +2 -1
- package/_esm/utils/signature/hashMessage.js.map +1 -1
- package/_esm/utils/transaction/serializeTransaction.js +20 -6
- package/_esm/utils/transaction/serializeTransaction.js.map +1 -1
- package/_types/actions/test/dumpState.d.ts +31 -0
- package/_types/actions/test/dumpState.d.ts.map +1 -0
- package/_types/actions/test/loadState.d.ts +34 -0
- package/_types/actions/test/loadState.d.ts.map +1 -0
- package/_types/chains/celo/chainConfig.d.ts +167 -137
- package/_types/chains/celo/chainConfig.d.ts.map +1 -1
- package/_types/chains/celo/formatters.d.ts +167 -137
- package/_types/chains/celo/formatters.d.ts.map +1 -1
- package/_types/chains/celo/types.d.ts +2 -0
- package/_types/chains/celo/types.d.ts.map +1 -1
- package/_types/chains/definitions/base.d.ts +129 -111
- package/_types/chains/definitions/base.d.ts.map +1 -1
- package/_types/chains/definitions/baseGoerli.d.ts +129 -111
- package/_types/chains/definitions/baseGoerli.d.ts.map +1 -1
- package/_types/chains/definitions/baseSepolia.d.ts +129 -111
- package/_types/chains/definitions/baseSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/celo.d.ts +167 -137
- package/_types/chains/definitions/celo.d.ts.map +1 -1
- package/_types/chains/definitions/celoAlfajores.d.ts +167 -137
- package/_types/chains/definitions/celoAlfajores.d.ts.map +1 -1
- package/_types/chains/definitions/celoCannoli.d.ts +167 -137
- package/_types/chains/definitions/celoCannoli.d.ts.map +1 -1
- package/_types/chains/definitions/chiliz.d.ts +35 -0
- package/_types/chains/definitions/chiliz.d.ts.map +1 -0
- package/_types/chains/definitions/lukso.d.ts +40 -0
- package/_types/chains/definitions/lukso.d.ts.map +1 -0
- package/_types/chains/definitions/optimism.d.ts +129 -111
- package/_types/chains/definitions/optimism.d.ts.map +1 -1
- package/_types/chains/definitions/optimismGoerli.d.ts +129 -111
- package/_types/chains/definitions/optimismGoerli.d.ts.map +1 -1
- package/_types/chains/definitions/optimismSepolia.d.ts +129 -111
- package/_types/chains/definitions/optimismSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/spicy.d.ts +36 -0
- package/_types/chains/definitions/spicy.d.ts.map +1 -0
- package/_types/chains/definitions/zkSync.d.ts +11 -0
- package/_types/chains/definitions/zkSync.d.ts.map +1 -1
- package/_types/chains/definitions/zkSyncTestnet.d.ts +11 -0
- package/_types/chains/definitions/zkSyncTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/zora.d.ts +129 -111
- package/_types/chains/definitions/zora.d.ts.map +1 -1
- package/_types/chains/definitions/zoraSepolia.d.ts +129 -111
- package/_types/chains/definitions/zoraSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/zoraTestnet.d.ts +129 -111
- package/_types/chains/definitions/zoraTestnet.d.ts.map +1 -1
- package/_types/chains/index.d.ts +5 -1
- package/_types/chains/index.d.ts.map +1 -1
- package/_types/chains/opStack/chainConfig.d.ts +125 -107
- package/_types/chains/opStack/chainConfig.d.ts.map +1 -1
- package/_types/chains/opStack/decorators/public.d.ts +18 -18
- package/_types/chains/opStack/formatters.d.ts +125 -107
- package/_types/chains/opStack/formatters.d.ts.map +1 -1
- package/_types/chains/opStack/index.d.ts +1 -1
- package/_types/chains/zksync/chainConfig.d.ts +11 -0
- package/_types/chains/zksync/chainConfig.d.ts.map +1 -1
- package/_types/chains/zksync/formatters.d.ts +11 -0
- package/_types/chains/zksync/formatters.d.ts.map +1 -1
- package/_types/clients/decorators/test.d.ts +41 -0
- package/_types/clients/decorators/test.d.ts.map +1 -1
- package/_types/constants/bytes.d.ts +2 -0
- package/_types/constants/bytes.d.ts.map +1 -0
- package/_types/constants/strings.d.ts +2 -0
- package/_types/constants/strings.d.ts.map +1 -0
- package/_types/errors/version.d.ts +1 -1
- package/_types/index.d.ts +2 -0
- package/_types/index.d.ts.map +1 -1
- package/_types/types/eip1193.d.ts +16 -0
- package/_types/types/eip1193.d.ts.map +1 -1
- package/_types/types/rpc.d.ts +2 -2
- package/_types/types/rpc.d.ts.map +1 -1
- package/_types/types/transaction.d.ts +10 -1
- package/_types/types/transaction.d.ts.map +1 -1
- package/_types/types/utils.d.ts +16 -0
- package/_types/types/utils.d.ts.map +1 -1
- package/_types/utils/formatters/transaction.d.ts +1 -1
- package/_types/utils/formatters/transaction.d.ts.map +1 -1
- package/_types/utils/formatters/transactionRequest.d.ts +1 -1
- package/_types/utils/signature/hashMessage.d.ts.map +1 -1
- package/_types/utils/transaction/serializeTransaction.d.ts.map +1 -1
- package/actions/test/dumpState.ts +44 -0
- package/actions/test/loadState.ts +47 -0
- package/chains/celo/formatters.ts +0 -1
- package/chains/celo/types.ts +2 -0
- package/chains/definitions/chiliz.ts +23 -0
- package/chains/definitions/lukso.ts +28 -0
- package/chains/definitions/spicy.ts +31 -0
- package/chains/index.ts +21 -3
- package/chains/opStack/decorators/public.ts +19 -19
- package/chains/opStack/index.ts +1 -1
- package/clients/decorators/test.ts +50 -0
- package/constants/bytes.ts +2 -0
- package/constants/strings.ts +1 -0
- package/errors/version.ts +1 -1
- package/index.ts +2 -0
- package/package.json +34 -11
- package/types/eip1193.ts +16 -0
- package/types/rpc.ts +10 -5
- package/types/transaction.ts +10 -1
- package/types/utils.ts +20 -0
- package/utils/formatters/transaction.ts +20 -3
- package/utils/signature/hashMessage.ts +2 -1
- package/utils/transaction/serializeTransaction.ts +18 -12
@@ -0,0 +1,65 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getNodeError = exports.containsNodeError = void 0;
|
4
|
+
const base_js_1 = require("../../errors/base.js");
|
5
|
+
const node_js_1 = require("../../errors/node.js");
|
6
|
+
const request_js_1 = require("../../errors/request.js");
|
7
|
+
const rpc_js_1 = require("../../errors/rpc.js");
|
8
|
+
function containsNodeError(err) {
|
9
|
+
return (err instanceof rpc_js_1.TransactionRejectedRpcError ||
|
10
|
+
err instanceof rpc_js_1.InvalidInputRpcError ||
|
11
|
+
(err instanceof request_js_1.RpcRequestError && err.code === node_js_1.ExecutionRevertedError.code));
|
12
|
+
}
|
13
|
+
exports.containsNodeError = containsNodeError;
|
14
|
+
function getNodeError(err, args) {
|
15
|
+
const message = (err.details || '').toLowerCase();
|
16
|
+
const executionRevertedError = err instanceof base_js_1.BaseError
|
17
|
+
? err.walk((e) => e.code === node_js_1.ExecutionRevertedError.code)
|
18
|
+
: err;
|
19
|
+
if (executionRevertedError instanceof base_js_1.BaseError) {
|
20
|
+
return new node_js_1.ExecutionRevertedError({
|
21
|
+
cause: err,
|
22
|
+
message: executionRevertedError.details,
|
23
|
+
});
|
24
|
+
}
|
25
|
+
else if (node_js_1.ExecutionRevertedError.nodeMessage.test(message))
|
26
|
+
return new node_js_1.ExecutionRevertedError({
|
27
|
+
cause: err,
|
28
|
+
message: err.details,
|
29
|
+
});
|
30
|
+
else if (node_js_1.FeeCapTooHighError.nodeMessage.test(message))
|
31
|
+
return new node_js_1.FeeCapTooHighError({
|
32
|
+
cause: err,
|
33
|
+
maxFeePerGas: args?.maxFeePerGas,
|
34
|
+
});
|
35
|
+
else if (node_js_1.FeeCapTooLowError.nodeMessage.test(message))
|
36
|
+
return new node_js_1.FeeCapTooLowError({
|
37
|
+
cause: err,
|
38
|
+
maxFeePerGas: args?.maxFeePerGas,
|
39
|
+
});
|
40
|
+
else if (node_js_1.NonceTooHighError.nodeMessage.test(message))
|
41
|
+
return new node_js_1.NonceTooHighError({ cause: err, nonce: args?.nonce });
|
42
|
+
else if (node_js_1.NonceTooLowError.nodeMessage.test(message))
|
43
|
+
return new node_js_1.NonceTooLowError({ cause: err, nonce: args?.nonce });
|
44
|
+
else if (node_js_1.NonceMaxValueError.nodeMessage.test(message))
|
45
|
+
return new node_js_1.NonceMaxValueError({ cause: err, nonce: args?.nonce });
|
46
|
+
else if (node_js_1.InsufficientFundsError.nodeMessage.test(message))
|
47
|
+
return new node_js_1.InsufficientFundsError({ cause: err });
|
48
|
+
else if (node_js_1.IntrinsicGasTooHighError.nodeMessage.test(message))
|
49
|
+
return new node_js_1.IntrinsicGasTooHighError({ cause: err, gas: args?.gas });
|
50
|
+
else if (node_js_1.IntrinsicGasTooLowError.nodeMessage.test(message))
|
51
|
+
return new node_js_1.IntrinsicGasTooLowError({ cause: err, gas: args?.gas });
|
52
|
+
else if (node_js_1.TransactionTypeNotSupportedError.nodeMessage.test(message))
|
53
|
+
return new node_js_1.TransactionTypeNotSupportedError({ cause: err });
|
54
|
+
else if (node_js_1.TipAboveFeeCapError.nodeMessage.test(message))
|
55
|
+
return new node_js_1.TipAboveFeeCapError({
|
56
|
+
cause: err,
|
57
|
+
maxFeePerGas: args?.maxFeePerGas,
|
58
|
+
maxPriorityFeePerGas: args?.maxPriorityFeePerGas,
|
59
|
+
});
|
60
|
+
return new node_js_1.UnknownNodeError({
|
61
|
+
cause: err,
|
62
|
+
});
|
63
|
+
}
|
64
|
+
exports.getNodeError = getNodeError;
|
65
|
+
//# sourceMappingURL=getNodeError.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getNodeError.js","sourceRoot":"","sources":["../../../utils/errors/getNodeError.ts"],"names":[],"mappings":"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"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getTransactionError = void 0;
|
4
|
+
const node_js_1 = require("../../errors/node.js");
|
5
|
+
const transaction_js_1 = require("../../errors/transaction.js");
|
6
|
+
const getNodeError_js_1 = require("./getNodeError.js");
|
7
|
+
function getTransactionError(err, { docsPath, ...args }) {
|
8
|
+
const cause = (() => {
|
9
|
+
const cause = (0, getNodeError_js_1.getNodeError)(err, args);
|
10
|
+
if (cause instanceof node_js_1.UnknownNodeError)
|
11
|
+
return err;
|
12
|
+
return cause;
|
13
|
+
})();
|
14
|
+
return new transaction_js_1.TransactionExecutionError(cause, {
|
15
|
+
docsPath,
|
16
|
+
...args,
|
17
|
+
});
|
18
|
+
}
|
19
|
+
exports.getTransactionError = getTransactionError;
|
20
|
+
//# sourceMappingURL=getTransactionError.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getTransactionError.js","sourceRoot":"","sources":["../../../utils/errors/getTransactionError.ts"],"names":[],"mappings":";;;AAGA,kDAAuD;AACvD,gEAGoC;AAIpC,uDAI0B;AAgB1B,SAAgB,mBAAmB,CACjC,GAAQ,EACR,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAiC;IAEpD,MAAM,KAAK,GAAG,CAAC,GAAG,EAAE;QAClB,MAAM,KAAK,GAAG,IAAA,8BAAY,EACxB,GAAsB,EACtB,IAA8B,CAC/B,CAAA;QACD,IAAI,KAAK,YAAY,0BAAgB;YAAE,OAAO,GAAsB,CAAA;QACpE,OAAO,KAAK,CAAA;IACd,CAAC,CAAC,EAAE,CAAA;IACJ,OAAO,IAAI,0CAAyB,CAAC,KAAK,EAAE;QAC1C,QAAQ;QACR,GAAG,IAAI;KACR,CAAuC,CAAA;AAC1C,CAAC;AAhBD,kDAgBC"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.createFilterRequestScope = void 0;
|
4
|
+
function createFilterRequestScope(client, { method }) {
|
5
|
+
const requestMap = {};
|
6
|
+
if (client.transport.type === 'fallback')
|
7
|
+
client.transport.onResponse?.(({ method: method_, response: id, status, transport, }) => {
|
8
|
+
if (status === 'success' && method === method_)
|
9
|
+
requestMap[id] = transport.request;
|
10
|
+
});
|
11
|
+
return ((id) => requestMap[id] || client.request);
|
12
|
+
}
|
13
|
+
exports.createFilterRequestScope = createFilterRequestScope;
|
14
|
+
//# sourceMappingURL=createFilterRequestScope.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"createFilterRequestScope.js","sourceRoot":"","sources":["../../../utils/filters/createFilterRequestScope.ts"],"names":[],"mappings":";;;AA8BA,SAAgB,wBAAwB,CACtC,MAAiC,EACjC,EAAE,MAAM,EAAsC;IAE9C,MAAM,UAAU,GAAkC,EAAE,CAAA;IAEpD,IAAI,MAAM,CAAC,SAAS,CAAC,IAAI,KAAK,UAAU;QACtC,MAAM,CAAC,SAAS,CAAC,UAAU,EAAE,CAC3B,CAAC,EACC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,EAAE,EACZ,MAAM,EACN,SAAS,GACmB,EAAE,EAAE;YAChC,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,OAAO;gBAC5C,UAAU,CAAC,EAAS,CAAC,GAAG,SAAS,CAAC,OAAO,CAAA;QAC7C,CAAC,CACF,CAAA;IAEH,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CACb,UAAU,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,OAAO,CAAuC,CAAA;AAC3E,CAAC;AArBD,4DAqBC"}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.defineBlock = exports.formatBlock = void 0;
|
4
|
+
const formatter_js_1 = require("./formatter.js");
|
5
|
+
const transaction_js_1 = require("./transaction.js");
|
6
|
+
function formatBlock(block) {
|
7
|
+
const transactions = block.transactions?.map((transaction) => {
|
8
|
+
if (typeof transaction === 'string')
|
9
|
+
return transaction;
|
10
|
+
return (0, transaction_js_1.formatTransaction)(transaction);
|
11
|
+
});
|
12
|
+
return {
|
13
|
+
...block,
|
14
|
+
baseFeePerGas: block.baseFeePerGas ? BigInt(block.baseFeePerGas) : null,
|
15
|
+
difficulty: block.difficulty ? BigInt(block.difficulty) : undefined,
|
16
|
+
gasLimit: block.gasLimit ? BigInt(block.gasLimit) : undefined,
|
17
|
+
gasUsed: block.gasUsed ? BigInt(block.gasUsed) : undefined,
|
18
|
+
hash: block.hash ? block.hash : null,
|
19
|
+
logsBloom: block.logsBloom ? block.logsBloom : null,
|
20
|
+
nonce: block.nonce ? block.nonce : null,
|
21
|
+
number: block.number ? BigInt(block.number) : null,
|
22
|
+
size: block.size ? BigInt(block.size) : undefined,
|
23
|
+
timestamp: block.timestamp ? BigInt(block.timestamp) : undefined,
|
24
|
+
transactions,
|
25
|
+
totalDifficulty: block.totalDifficulty
|
26
|
+
? BigInt(block.totalDifficulty)
|
27
|
+
: null,
|
28
|
+
};
|
29
|
+
}
|
30
|
+
exports.formatBlock = formatBlock;
|
31
|
+
exports.defineBlock = (0, formatter_js_1.defineFormatter)('block', formatBlock);
|
32
|
+
//# sourceMappingURL=block.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"block.js","sourceRoot":"","sources":["../../../utils/formatters/block.ts"],"names":[],"mappings":";;;AAWA,iDAA+E;AAC/E,qDAA+E;AAgC/E,SAAgB,WAAW,CAAC,KAAwB;IAClD,MAAM,YAAY,GAAG,KAAK,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE;QAC3D,IAAI,OAAO,WAAW,KAAK,QAAQ;YAAE,OAAO,WAAW,CAAA;QACvD,OAAO,IAAA,kCAAiB,EAAC,WAAW,CAAC,CAAA;IACvC,CAAC,CAAC,CAAA;IACF,OAAO;QACL,GAAG,KAAK;QACR,aAAa,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI;QACvE,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS;QACnE,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS;QAC7D,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS;QAC1D,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI;QACpC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI;QACnD,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI;QACvC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI;QAClD,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS;QACjD,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS;QAChE,YAAY;QACZ,eAAe,EAAE,KAAK,CAAC,eAAe;YACpC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC;YAC/B,CAAC,CAAC,IAAI;KACA,CAAA;AACZ,CAAC;AAtBD,kCAsBC;AAIY,QAAA,WAAW,GAAiB,IAAA,8BAAe,EAAC,OAAO,EAAE,WAAW,CAAC,CAAA"}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.extract = void 0;
|
4
|
+
function extract(value_, { format }) {
|
5
|
+
if (!format)
|
6
|
+
return {};
|
7
|
+
const value = {};
|
8
|
+
function extract_(formatted) {
|
9
|
+
const keys = Object.keys(formatted);
|
10
|
+
for (const key of keys) {
|
11
|
+
if (key in value_)
|
12
|
+
value[key] = value_[key];
|
13
|
+
if (formatted[key] &&
|
14
|
+
typeof formatted[key] === 'object' &&
|
15
|
+
!Array.isArray(formatted[key]))
|
16
|
+
extract_(formatted[key]);
|
17
|
+
}
|
18
|
+
}
|
19
|
+
const formatted = format(value_ || {});
|
20
|
+
extract_(formatted);
|
21
|
+
return value;
|
22
|
+
}
|
23
|
+
exports.extract = extract;
|
24
|
+
//# sourceMappingURL=extract.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"extract.js","sourceRoot":"","sources":["../../../utils/formatters/extract.ts"],"names":[],"mappings":";;;AAQA,SAAgB,OAAO,CACrB,MAA+B,EAC/B,EAAE,MAAM,EAAyC;IAEjD,IAAI,CAAC,MAAM;QAAE,OAAO,EAAE,CAAA;IAEtB,MAAM,KAAK,GAA4B,EAAE,CAAA;IACzC,SAAS,QAAQ,CAAC,SAA8B;QAC9C,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QACnC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;YACtB,IAAI,GAAG,IAAI,MAAM;gBAAE,KAAK,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;YAC3C,IACE,SAAS,CAAC,GAAG,CAAC;gBACd,OAAO,SAAS,CAAC,GAAG,CAAC,KAAK,QAAQ;gBAClC,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;gBAE9B,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAA;SAC3B;IACH,CAAC;IAED,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,CAAA;IACtC,QAAQ,CAAC,SAAS,CAAC,CAAA;IAEnB,OAAO,KAAK,CAAA;AACd,CAAC;AAxBD,0BAwBC"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.formatFeeHistory = void 0;
|
4
|
+
function formatFeeHistory(feeHistory) {
|
5
|
+
return {
|
6
|
+
baseFeePerGas: feeHistory.baseFeePerGas.map((value) => BigInt(value)),
|
7
|
+
gasUsedRatio: feeHistory.gasUsedRatio,
|
8
|
+
oldestBlock: BigInt(feeHistory.oldestBlock),
|
9
|
+
reward: feeHistory.reward?.map((reward) => reward.map((value) => BigInt(value))),
|
10
|
+
};
|
11
|
+
}
|
12
|
+
exports.formatFeeHistory = formatFeeHistory;
|
13
|
+
//# sourceMappingURL=feeHistory.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"feeHistory.js","sourceRoot":"","sources":["../../../utils/formatters/feeHistory.ts"],"names":[],"mappings":";;;AAMA,SAAgB,gBAAgB,CAAC,UAAyB;IACxD,OAAO;QACL,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACrE,YAAY,EAAE,UAAU,CAAC,YAAY;QACrC,WAAW,EAAE,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC;QAC3C,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CACxC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CACrC;KACF,CAAA;AACH,CAAC;AATD,4CASC"}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.defineFormatter = void 0;
|
4
|
+
function defineFormatter(type, format) {
|
5
|
+
return ({ exclude, format: overrides, }) => {
|
6
|
+
return {
|
7
|
+
exclude,
|
8
|
+
format: (args) => {
|
9
|
+
const formatted = format(args);
|
10
|
+
if (exclude) {
|
11
|
+
for (const key of exclude) {
|
12
|
+
delete formatted[key];
|
13
|
+
}
|
14
|
+
}
|
15
|
+
return {
|
16
|
+
...formatted,
|
17
|
+
...overrides(args),
|
18
|
+
};
|
19
|
+
},
|
20
|
+
type,
|
21
|
+
};
|
22
|
+
};
|
23
|
+
}
|
24
|
+
exports.defineFormatter = defineFormatter;
|
25
|
+
//# sourceMappingURL=formatter.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"formatter.js","sourceRoot":"","sources":["../../../utils/formatters/formatter.ts"],"names":[],"mappings":";;;AAKA,SAAgB,eAAe,CAC7B,IAAW,EACX,MAAuC;IAEvC,OAAO,CAIL,EACA,OAAO,EACP,MAAM,EAAE,SAAS,GAIlB,EAAE,EAAE;QACH,OAAO;YACL,OAAO;YACP,MAAM,EAAE,CAAC,IAA8C,EAAE,EAAE;gBACzD,MAAM,SAAS,GAAG,MAAM,CAAC,IAAW,CAAC,CAAA;gBACrC,IAAI,OAAO,EAAE;oBACX,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE;wBACzB,OAAQ,SAAiB,CAAC,GAAG,CAAC,CAAA;qBAC/B;iBACF;gBACD,OAAO;oBACL,GAAG,SAAS;oBACZ,GAAG,SAAS,CAAC,IAAI,CAAC;iBAGnB,CAAA;YACH,CAAC;YACD,IAAI;SACL,CAAA;IACH,CAAC,CAAA;AACH,CAAC;AAlCD,0CAkCC"}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.formatLog = void 0;
|
4
|
+
function formatLog(log, { args, eventName } = {}) {
|
5
|
+
return {
|
6
|
+
...log,
|
7
|
+
blockHash: log.blockHash ? log.blockHash : null,
|
8
|
+
blockNumber: log.blockNumber ? BigInt(log.blockNumber) : null,
|
9
|
+
logIndex: log.logIndex ? Number(log.logIndex) : null,
|
10
|
+
transactionHash: log.transactionHash ? log.transactionHash : null,
|
11
|
+
transactionIndex: log.transactionIndex
|
12
|
+
? Number(log.transactionIndex)
|
13
|
+
: null,
|
14
|
+
...(eventName ? { args, eventName } : {}),
|
15
|
+
};
|
16
|
+
}
|
17
|
+
exports.formatLog = formatLog;
|
18
|
+
//# sourceMappingURL=log.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"log.js","sourceRoot":"","sources":["../../../utils/formatters/log.ts"],"names":[],"mappings":";;;AAMA,SAAgB,SAAS,CACvB,GAAoB,EACpB,EAAE,IAAI,EAAE,SAAS,KAA6C,EAAE;IAEhE,OAAO;QACL,GAAG,GAAG;QACN,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI;QAC/C,WAAW,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI;QAC7D,QAAQ,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI;QACpD,eAAe,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI;QACjE,gBAAgB,EAAE,GAAG,CAAC,gBAAgB;YACpC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC;YAC9B,CAAC,CAAC,IAAI;QACR,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACnC,CAAA;AACV,CAAC;AAfD,8BAeC"}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.formatProof = void 0;
|
4
|
+
const index_js_1 = require("../index.js");
|
5
|
+
function formatStorageProof(storageProof) {
|
6
|
+
return storageProof.map((proof) => ({
|
7
|
+
...proof,
|
8
|
+
value: BigInt(proof.value),
|
9
|
+
}));
|
10
|
+
}
|
11
|
+
function formatProof(proof) {
|
12
|
+
return {
|
13
|
+
...proof,
|
14
|
+
balance: proof.balance ? BigInt(proof.balance) : undefined,
|
15
|
+
nonce: proof.nonce ? (0, index_js_1.hexToNumber)(proof.nonce) : undefined,
|
16
|
+
storageProof: proof.storageProof
|
17
|
+
? formatStorageProof(proof.storageProof)
|
18
|
+
: undefined,
|
19
|
+
};
|
20
|
+
}
|
21
|
+
exports.formatProof = formatProof;
|
22
|
+
//# sourceMappingURL=proof.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"proof.js","sourceRoot":"","sources":["../../../utils/formatters/proof.ts"],"names":[],"mappings":";;;AAGA,0CAAyC;AAIzC,SAAS,kBAAkB,CAAC,YAAsC;IAChE,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAClC,GAAG,KAAK;QACR,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;KAC3B,CAAC,CAAC,CAAA;AACL,CAAC;AAED,SAAgB,WAAW,CAAC,KAAwB;IAClD,OAAO;QACL,GAAG,KAAK;QACR,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS;QAC1D,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,IAAA,sBAAW,EAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS;QACzD,YAAY,EAAE,KAAK,CAAC,YAAY;YAC9B,CAAC,CAAC,kBAAkB,CAAC,KAAK,CAAC,YAAY,CAAC;YACxC,CAAC,CAAC,SAAS;KACL,CAAA;AACZ,CAAC;AATD,kCASC"}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.defineTransaction = exports.formatTransaction = exports.transactionType = void 0;
|
4
|
+
const fromHex_js_1 = require("../encoding/fromHex.js");
|
5
|
+
const formatter_js_1 = require("./formatter.js");
|
6
|
+
exports.transactionType = {
|
7
|
+
'0x0': 'legacy',
|
8
|
+
'0x1': 'eip2930',
|
9
|
+
'0x2': 'eip1559',
|
10
|
+
};
|
11
|
+
function formatTransaction(transaction) {
|
12
|
+
const transaction_ = {
|
13
|
+
...transaction,
|
14
|
+
blockHash: transaction.blockHash ? transaction.blockHash : null,
|
15
|
+
blockNumber: transaction.blockNumber
|
16
|
+
? BigInt(transaction.blockNumber)
|
17
|
+
: null,
|
18
|
+
chainId: transaction.chainId ? (0, fromHex_js_1.hexToNumber)(transaction.chainId) : undefined,
|
19
|
+
gas: transaction.gas ? BigInt(transaction.gas) : undefined,
|
20
|
+
gasPrice: transaction.gasPrice ? BigInt(transaction.gasPrice) : undefined,
|
21
|
+
maxFeePerGas: transaction.maxFeePerGas
|
22
|
+
? BigInt(transaction.maxFeePerGas)
|
23
|
+
: undefined,
|
24
|
+
maxPriorityFeePerGas: transaction.maxPriorityFeePerGas
|
25
|
+
? BigInt(transaction.maxPriorityFeePerGas)
|
26
|
+
: undefined,
|
27
|
+
nonce: transaction.nonce ? (0, fromHex_js_1.hexToNumber)(transaction.nonce) : undefined,
|
28
|
+
to: transaction.to ? transaction.to : null,
|
29
|
+
transactionIndex: transaction.transactionIndex
|
30
|
+
? Number(transaction.transactionIndex)
|
31
|
+
: null,
|
32
|
+
type: transaction.type
|
33
|
+
? exports.transactionType[transaction.type]
|
34
|
+
: undefined,
|
35
|
+
typeHex: transaction.type ? transaction.type : undefined,
|
36
|
+
value: transaction.value ? BigInt(transaction.value) : undefined,
|
37
|
+
v: transaction.v ? BigInt(transaction.v) : undefined,
|
38
|
+
};
|
39
|
+
transaction_.yParity = (() => {
|
40
|
+
if (transaction.yParity)
|
41
|
+
return Number(transaction.yParity);
|
42
|
+
if (typeof transaction_.v === 'bigint') {
|
43
|
+
if (transaction_.v === 0n || transaction_.v === 27n)
|
44
|
+
return 0;
|
45
|
+
if (transaction_.v === 1n || transaction_.v === 28n)
|
46
|
+
return 1;
|
47
|
+
if (transaction_.v >= 35n)
|
48
|
+
return transaction_.v % 2n === 0n ? 1 : 0;
|
49
|
+
}
|
50
|
+
return undefined;
|
51
|
+
})();
|
52
|
+
if (transaction_.type === 'legacy') {
|
53
|
+
delete transaction_.accessList;
|
54
|
+
delete transaction_.maxFeePerGas;
|
55
|
+
delete transaction_.maxPriorityFeePerGas;
|
56
|
+
delete transaction_.yParity;
|
57
|
+
}
|
58
|
+
if (transaction_.type === 'eip2930') {
|
59
|
+
delete transaction_.maxFeePerGas;
|
60
|
+
delete transaction_.maxPriorityFeePerGas;
|
61
|
+
}
|
62
|
+
return transaction_;
|
63
|
+
}
|
64
|
+
exports.formatTransaction = formatTransaction;
|
65
|
+
exports.defineTransaction = (0, formatter_js_1.defineFormatter)('transaction', formatTransaction);
|
66
|
+
//# sourceMappingURL=transaction.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../../utils/formatters/transaction.ts"],"names":[],"mappings":"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"}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.defineTransactionReceipt = exports.formatTransactionReceipt = void 0;
|
4
|
+
const fromHex_js_1 = require("../encoding/fromHex.js");
|
5
|
+
const formatter_js_1 = require("./formatter.js");
|
6
|
+
const log_js_1 = require("./log.js");
|
7
|
+
const transaction_js_1 = require("./transaction.js");
|
8
|
+
const statuses = {
|
9
|
+
'0x0': 'reverted',
|
10
|
+
'0x1': 'success',
|
11
|
+
};
|
12
|
+
function formatTransactionReceipt(transactionReceipt) {
|
13
|
+
return {
|
14
|
+
...transactionReceipt,
|
15
|
+
blockNumber: transactionReceipt.blockNumber
|
16
|
+
? BigInt(transactionReceipt.blockNumber)
|
17
|
+
: null,
|
18
|
+
contractAddress: transactionReceipt.contractAddress
|
19
|
+
? transactionReceipt.contractAddress
|
20
|
+
: null,
|
21
|
+
cumulativeGasUsed: transactionReceipt.cumulativeGasUsed
|
22
|
+
? BigInt(transactionReceipt.cumulativeGasUsed)
|
23
|
+
: null,
|
24
|
+
effectiveGasPrice: transactionReceipt.effectiveGasPrice
|
25
|
+
? BigInt(transactionReceipt.effectiveGasPrice)
|
26
|
+
: null,
|
27
|
+
gasUsed: transactionReceipt.gasUsed
|
28
|
+
? BigInt(transactionReceipt.gasUsed)
|
29
|
+
: null,
|
30
|
+
logs: transactionReceipt.logs
|
31
|
+
? transactionReceipt.logs.map((log) => (0, log_js_1.formatLog)(log))
|
32
|
+
: null,
|
33
|
+
to: transactionReceipt.to ? transactionReceipt.to : null,
|
34
|
+
transactionIndex: transactionReceipt.transactionIndex
|
35
|
+
? (0, fromHex_js_1.hexToNumber)(transactionReceipt.transactionIndex)
|
36
|
+
: null,
|
37
|
+
status: transactionReceipt.status
|
38
|
+
? statuses[transactionReceipt.status]
|
39
|
+
: null,
|
40
|
+
type: transactionReceipt.type
|
41
|
+
? transaction_js_1.transactionType[transactionReceipt.type] || transactionReceipt.type
|
42
|
+
: null,
|
43
|
+
};
|
44
|
+
}
|
45
|
+
exports.formatTransactionReceipt = formatTransactionReceipt;
|
46
|
+
exports.defineTransactionReceipt = (0, formatter_js_1.defineFormatter)('transactionReceipt', formatTransactionReceipt);
|
47
|
+
//# sourceMappingURL=transactionReceipt.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"transactionReceipt.js","sourceRoot":"","sources":["../../../utils/formatters/transactionReceipt.ts"],"names":[],"mappings":";;;AAOA,uDAAoD;AAEpD,iDAA+E;AAC/E,qCAAoC;AACpC,qDAAkD;AAUlD,MAAM,QAAQ,GAAG;IACf,KAAK,EAAE,UAAU;IACjB,KAAK,EAAE,SAAS;CACR,CAAA;AAIV,SAAgB,wBAAwB,CACtC,kBAAkD;IAElD,OAAO;QACL,GAAG,kBAAkB;QACrB,WAAW,EAAE,kBAAkB,CAAC,WAAW;YACzC,CAAC,CAAC,MAAM,CAAC,kBAAkB,CAAC,WAAW,CAAC;YACxC,CAAC,CAAC,IAAI;QACR,eAAe,EAAE,kBAAkB,CAAC,eAAe;YACjD,CAAC,CAAC,kBAAkB,CAAC,eAAe;YACpC,CAAC,CAAC,IAAI;QACR,iBAAiB,EAAE,kBAAkB,CAAC,iBAAiB;YACrD,CAAC,CAAC,MAAM,CAAC,kBAAkB,CAAC,iBAAiB,CAAC;YAC9C,CAAC,CAAC,IAAI;QACR,iBAAiB,EAAE,kBAAkB,CAAC,iBAAiB;YACrD,CAAC,CAAC,MAAM,CAAC,kBAAkB,CAAC,iBAAiB,CAAC;YAC9C,CAAC,CAAC,IAAI;QACR,OAAO,EAAE,kBAAkB,CAAC,OAAO;YACjC,CAAC,CAAC,MAAM,CAAC,kBAAkB,CAAC,OAAO,CAAC;YACpC,CAAC,CAAC,IAAI;QACR,IAAI,EAAE,kBAAkB,CAAC,IAAI;YAC3B,CAAC,CAAC,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,kBAAS,EAAC,GAAG,CAAC,CAAC;YACtD,CAAC,CAAC,IAAI;QACR,EAAE,EAAE,kBAAkB,CAAC,EAAE,CAAC,CAAC,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI;QACxD,gBAAgB,EAAE,kBAAkB,CAAC,gBAAgB;YACnD,CAAC,CAAC,IAAA,wBAAW,EAAC,kBAAkB,CAAC,gBAAgB,CAAC;YAClD,CAAC,CAAC,IAAI;QACR,MAAM,EAAE,kBAAkB,CAAC,MAAM;YAC/B,CAAC,CAAC,QAAQ,CAAC,kBAAkB,CAAC,MAAM,CAAC;YACrC,CAAC,CAAC,IAAI;QACR,IAAI,EAAE,kBAAkB,CAAC,IAAI;YAC3B,CAAC,CAAC,gCAAe,CACb,kBAAkB,CAAC,IAAoC,CACxD,IAAI,kBAAkB,CAAC,IAAI;YAC9B,CAAC,CAAC,IAAI;KACa,CAAA;AACzB,CAAC;AApCD,4DAoCC;AAMY,QAAA,wBAAwB,GAAiB,IAAA,8BAAe,EACnE,oBAAoB,EACpB,wBAAwB,CACzB,CAAA"}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.defineTransactionRequest = exports.formatTransactionRequest = exports.rpcTransactionType = void 0;
|
4
|
+
const toHex_js_1 = require("../encoding/toHex.js");
|
5
|
+
const formatter_js_1 = require("./formatter.js");
|
6
|
+
exports.rpcTransactionType = {
|
7
|
+
legacy: '0x0',
|
8
|
+
eip2930: '0x1',
|
9
|
+
eip1559: '0x2',
|
10
|
+
};
|
11
|
+
function formatTransactionRequest(transactionRequest) {
|
12
|
+
return {
|
13
|
+
...transactionRequest,
|
14
|
+
gas: typeof transactionRequest.gas !== 'undefined'
|
15
|
+
? (0, toHex_js_1.numberToHex)(transactionRequest.gas)
|
16
|
+
: undefined,
|
17
|
+
gasPrice: typeof transactionRequest.gasPrice !== 'undefined'
|
18
|
+
? (0, toHex_js_1.numberToHex)(transactionRequest.gasPrice)
|
19
|
+
: undefined,
|
20
|
+
maxFeePerGas: typeof transactionRequest.maxFeePerGas !== 'undefined'
|
21
|
+
? (0, toHex_js_1.numberToHex)(transactionRequest.maxFeePerGas)
|
22
|
+
: undefined,
|
23
|
+
maxPriorityFeePerGas: typeof transactionRequest.maxPriorityFeePerGas !== 'undefined'
|
24
|
+
? (0, toHex_js_1.numberToHex)(transactionRequest.maxPriorityFeePerGas)
|
25
|
+
: undefined,
|
26
|
+
nonce: typeof transactionRequest.nonce !== 'undefined'
|
27
|
+
? (0, toHex_js_1.numberToHex)(transactionRequest.nonce)
|
28
|
+
: undefined,
|
29
|
+
type: typeof transactionRequest.type !== 'undefined'
|
30
|
+
? exports.rpcTransactionType[transactionRequest.type]
|
31
|
+
: undefined,
|
32
|
+
value: typeof transactionRequest.value !== 'undefined'
|
33
|
+
? (0, toHex_js_1.numberToHex)(transactionRequest.value)
|
34
|
+
: undefined,
|
35
|
+
};
|
36
|
+
}
|
37
|
+
exports.formatTransactionRequest = formatTransactionRequest;
|
38
|
+
exports.defineTransactionRequest = (0, formatter_js_1.defineFormatter)('transactionRequest', formatTransactionRequest);
|
39
|
+
//# sourceMappingURL=transactionRequest.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"transactionRequest.js","sourceRoot":"","sources":["../../../utils/formatters/transactionRequest.ts"],"names":[],"mappings":";;;AAOA,mDAAkD;AAClD,iDAA+E;AAUlE,QAAA,kBAAkB,GAAG;IAChC,MAAM,EAAE,KAAK;IACb,OAAO,EAAE,KAAK;IACd,OAAO,EAAE,KAAK;CACN,CAAA;AAIV,SAAgB,wBAAwB,CACtC,kBAA+C;IAE/C,OAAO;QACL,GAAG,kBAAkB;QACrB,GAAG,EACD,OAAO,kBAAkB,CAAC,GAAG,KAAK,WAAW;YAC3C,CAAC,CAAC,IAAA,sBAAW,EAAC,kBAAkB,CAAC,GAAG,CAAC;YACrC,CAAC,CAAC,SAAS;QACf,QAAQ,EACN,OAAO,kBAAkB,CAAC,QAAQ,KAAK,WAAW;YAChD,CAAC,CAAC,IAAA,sBAAW,EAAC,kBAAkB,CAAC,QAAQ,CAAC;YAC1C,CAAC,CAAC,SAAS;QACf,YAAY,EACV,OAAO,kBAAkB,CAAC,YAAY,KAAK,WAAW;YACpD,CAAC,CAAC,IAAA,sBAAW,EAAC,kBAAkB,CAAC,YAAY,CAAC;YAC9C,CAAC,CAAC,SAAS;QACf,oBAAoB,EAClB,OAAO,kBAAkB,CAAC,oBAAoB,KAAK,WAAW;YAC5D,CAAC,CAAC,IAAA,sBAAW,EAAC,kBAAkB,CAAC,oBAAoB,CAAC;YACtD,CAAC,CAAC,SAAS;QACf,KAAK,EACH,OAAO,kBAAkB,CAAC,KAAK,KAAK,WAAW;YAC7C,CAAC,CAAC,IAAA,sBAAW,EAAC,kBAAkB,CAAC,KAAK,CAAC;YACvC,CAAC,CAAC,SAAS;QACf,IAAI,EACF,OAAO,kBAAkB,CAAC,IAAI,KAAK,WAAW;YAC5C,CAAC,CAAC,0BAAkB,CAAC,kBAAkB,CAAC,IAAI,CAAC;YAC7C,CAAC,CAAC,SAAS;QACf,KAAK,EACH,OAAO,kBAAkB,CAAC,KAAK,KAAK,WAAW;YAC7C,CAAC,CAAC,IAAA,sBAAW,EAAC,kBAAkB,CAAC,KAAK,CAAC;YACvC,CAAC,CAAC,SAAS;KACS,CAAA;AAC5B,CAAC;AAlCD,4DAkCC;AAMY,QAAA,wBAAwB,GAAiB,IAAA,8BAAe,EACnE,oBAAoB,EACpB,wBAAwB,CACzB,CAAA"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getAction = void 0;
|
4
|
+
function getAction(client, action) {
|
5
|
+
return (params) => client[action.name]?.(params) ?? action(client, params);
|
6
|
+
}
|
7
|
+
exports.getAction = getAction;
|
8
|
+
//# sourceMappingURL=getAction.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getAction.js","sourceRoot":"","sources":["../../utils/getAction.ts"],"names":[],"mappings":";;;AAEA,SAAgB,SAAS,CACvB,MAAc,EACd,MAA8C;IAE9C,OAAO,CAAC,MAAc,EAAc,EAAE,CAElC,MAGD,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AACtD,CAAC;AAVD,8BAUC"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getEventSelector = void 0;
|
4
|
+
const toBytes_js_1 = require("../encoding/toBytes.js");
|
5
|
+
const getEventSignature_js_1 = require("./getEventSignature.js");
|
6
|
+
const keccak256_js_1 = require("./keccak256.js");
|
7
|
+
const hash = (value) => (0, keccak256_js_1.keccak256)((0, toBytes_js_1.toBytes)(value));
|
8
|
+
const getEventSelector = (fn) => hash((0, getEventSignature_js_1.getEventSignature)(fn));
|
9
|
+
exports.getEventSelector = getEventSelector;
|
10
|
+
//# sourceMappingURL=getEventSelector.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getEventSelector.js","sourceRoot":"","sources":["../../../utils/hash/getEventSelector.ts"],"names":[],"mappings":";;;AAGA,uDAAuE;AACvE,iEAA0D;AAC1D,iDAAmE;AAEnE,MAAM,IAAI,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,IAAA,wBAAS,EAAC,IAAA,oBAAO,EAAC,KAAK,CAAC,CAAC,CAAA;AAOlD,MAAM,gBAAgB,GAAG,CAAC,EAAqB,EAAE,EAAE,CACxD,IAAI,CAAC,IAAA,wCAAiB,EAAC,EAAE,CAAC,CAAC,CAAA;AADhB,QAAA,gBAAgB,oBACA"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getEventSignature = void 0;
|
4
|
+
const getFunctionSignature_js_1 = require("./getFunctionSignature.js");
|
5
|
+
const getEventSignature = (fn) => {
|
6
|
+
return (0, getFunctionSignature_js_1.getFunctionSignature)(fn);
|
7
|
+
};
|
8
|
+
exports.getEventSignature = getEventSignature;
|
9
|
+
//# sourceMappingURL=getEventSignature.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getEventSignature.js","sourceRoot":"","sources":["../../../utils/hash/getEventSignature.ts"],"names":[],"mappings":";;;AAGA,uEAGkC;AAM3B,MAAM,iBAAiB,GAAG,CAAC,EAAqB,EAAE,EAAE;IACzD,OAAO,IAAA,8CAAoB,EAAC,EAAuB,CAAC,CAAA;AACtD,CAAC,CAAA;AAFY,QAAA,iBAAiB,qBAE7B"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getFunctionSelector = void 0;
|
4
|
+
const slice_js_1 = require("../data/slice.js");
|
5
|
+
const toBytes_js_1 = require("../encoding/toBytes.js");
|
6
|
+
const getFunctionSignature_js_1 = require("./getFunctionSignature.js");
|
7
|
+
const keccak256_js_1 = require("./keccak256.js");
|
8
|
+
const hash = (value) => (0, keccak256_js_1.keccak256)((0, toBytes_js_1.toBytes)(value));
|
9
|
+
const getFunctionSelector = (fn) => (0, slice_js_1.slice)(hash((0, getFunctionSignature_js_1.getFunctionSignature)(fn)), 0, 4);
|
10
|
+
exports.getFunctionSelector = getFunctionSelector;
|
11
|
+
//# sourceMappingURL=getFunctionSelector.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getFunctionSelector.js","sourceRoot":"","sources":["../../../utils/hash/getFunctionSelector.ts"],"names":[],"mappings":";;;AAGA,+CAA6D;AAC7D,uDAAuE;AACvE,uEAGkC;AAClC,iDAAmE;AAEnE,MAAM,IAAI,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,IAAA,wBAAS,EAAC,IAAA,oBAAO,EAAC,KAAK,CAAC,CAAC,CAAA;AASlD,MAAM,mBAAmB,GAAG,CAAC,EAAwB,EAAE,EAAE,CAC9D,IAAA,gBAAK,EAAC,IAAI,CAAC,IAAA,8CAAoB,EAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;AADhC,QAAA,mBAAmB,uBACa"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getFunctionSignature = void 0;
|
4
|
+
const abitype_1 = require("abitype");
|
5
|
+
const normalizeSignature_js_1 = require("./normalizeSignature.js");
|
6
|
+
const getFunctionSignature = (fn_) => {
|
7
|
+
const fn = (() => {
|
8
|
+
if (typeof fn_ === 'string')
|
9
|
+
return fn_;
|
10
|
+
return (0, abitype_1.formatAbiItem)(fn_);
|
11
|
+
})();
|
12
|
+
return (0, normalizeSignature_js_1.normalizeSignature)(fn);
|
13
|
+
};
|
14
|
+
exports.getFunctionSignature = getFunctionSignature;
|
15
|
+
//# sourceMappingURL=getFunctionSignature.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getFunctionSignature.js","sourceRoot":"","sources":["../../../utils/hash/getFunctionSignature.ts"],"names":[],"mappings":";;;AAAA,qCAAyD;AAGzD,mEAGgC;AAMzB,MAAM,oBAAoB,GAAG,CAAC,GAAyB,EAAE,EAAE;IAChE,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE;QACf,IAAI,OAAO,GAAG,KAAK,QAAQ;YAAE,OAAO,GAAG,CAAA;QACvC,OAAO,IAAA,uBAAa,EAAC,GAAG,CAAC,CAAA;IAC3B,CAAC,CAAC,EAAE,CAAA;IACJ,OAAO,IAAA,0CAAkB,EAAC,EAAE,CAAC,CAAA;AAC/B,CAAC,CAAA;AANY,QAAA,oBAAoB,wBAMhC"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.hashAbiItem = exports.hashFunction = void 0;
|
4
|
+
const formatAbiItem_js_1 = require("../abi/formatAbiItem.js");
|
5
|
+
const toBytes_js_1 = require("../encoding/toBytes.js");
|
6
|
+
const getFunctionSignature_js_1 = require("./getFunctionSignature.js");
|
7
|
+
const keccak256_js_1 = require("./keccak256.js");
|
8
|
+
const hash = (value) => (0, keccak256_js_1.keccak256)((0, toBytes_js_1.toBytes)(value));
|
9
|
+
function hashFunction(def) {
|
10
|
+
return hash((0, getFunctionSignature_js_1.getFunctionSignature)(def));
|
11
|
+
}
|
12
|
+
exports.hashFunction = hashFunction;
|
13
|
+
function hashAbiItem(abiItem) {
|
14
|
+
return hash((0, formatAbiItem_js_1.formatAbiItem)(abiItem));
|
15
|
+
}
|
16
|
+
exports.hashAbiItem = hashAbiItem;
|
17
|
+
//# sourceMappingURL=hashFunction.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"hashFunction.js","sourceRoot":"","sources":["../../../utils/hash/hashFunction.ts"],"names":[],"mappings":";;;AACA,8DAGgC;AAChC,uDAAuE;AAGvE,uEAGkC;AAClC,iDAAmE;AAEnE,MAAM,IAAI,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,IAAA,wBAAS,EAAC,IAAA,oBAAO,EAAC,KAAK,CAAC,CAAC,CAAA;AAQzD,SAAgB,YAAY,CAAC,GAAW;IACtC,OAAO,IAAI,CAAC,IAAA,8CAAoB,EAAC,GAAG,CAAC,CAAC,CAAA;AACxC,CAAC;AAFD,oCAEC;AAQD,SAAgB,WAAW,CAAC,OAA+B;IACzD,OAAO,IAAI,CAAC,IAAA,gCAAa,EAAC,OAAO,CAAC,CAAC,CAAA;AACrC,CAAC;AAFD,kCAEC"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.isHash = void 0;
|
4
|
+
const isHex_js_1 = require("../data/isHex.js");
|
5
|
+
const size_js_1 = require("../data/size.js");
|
6
|
+
function isHash(hash) {
|
7
|
+
return (0, isHex_js_1.isHex)(hash) && (0, size_js_1.size)(hash) === 32;
|
8
|
+
}
|
9
|
+
exports.isHash = isHash;
|
10
|
+
//# sourceMappingURL=isHash.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"isHash.js","sourceRoot":"","sources":["../../../utils/hash/isHash.ts"],"names":[],"mappings":";;;AAEA,+CAA6D;AAC7D,6CAA0D;AAI1D,SAAgB,MAAM,CAAC,IAAY;IACjC,OAAO,IAAA,gBAAK,EAAC,IAAI,CAAC,IAAI,IAAA,cAAI,EAAC,IAAI,CAAC,KAAK,EAAE,CAAA;AACzC,CAAC;AAFD,wBAEC"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.keccak256 = void 0;
|
4
|
+
const sha3_1 = require("@noble/hashes/sha3");
|
5
|
+
const isHex_js_1 = require("../data/isHex.js");
|
6
|
+
const toBytes_js_1 = require("../encoding/toBytes.js");
|
7
|
+
const toHex_js_1 = require("../encoding/toHex.js");
|
8
|
+
function keccak256(value, to_) {
|
9
|
+
const to = to_ || 'hex';
|
10
|
+
const bytes = (0, sha3_1.keccak_256)((0, isHex_js_1.isHex)(value, { strict: false }) ? (0, toBytes_js_1.toBytes)(value) : value);
|
11
|
+
if (to === 'bytes')
|
12
|
+
return bytes;
|
13
|
+
return (0, toHex_js_1.toHex)(bytes);
|
14
|
+
}
|
15
|
+
exports.keccak256 = keccak256;
|
16
|
+
//# sourceMappingURL=keccak256.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"keccak256.js","sourceRoot":"","sources":["../../../utils/hash/keccak256.ts"],"names":[],"mappings":";;;AAAA,6CAA+C;AAI/C,+CAA6D;AAC7D,uDAAuE;AACvE,mDAAiE;AAcjE,SAAgB,SAAS,CACvB,KAAsB,EACtB,GAAS;IAET,MAAM,EAAE,GAAG,GAAG,IAAI,KAAK,CAAA;IACvB,MAAM,KAAK,GAAG,IAAA,iBAAU,EACtB,IAAA,gBAAK,EAAC,KAAK,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,IAAA,oBAAO,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CACzD,CAAA;IACD,IAAI,EAAE,KAAK,OAAO;QAAE,OAAO,KAA2B,CAAA;IACtD,OAAO,IAAA,gBAAK,EAAC,KAAK,CAAuB,CAAA;AAC3C,CAAC;AAVD,8BAUC"}
|