viem 2.0.0-beta.4 → 2.0.0-beta.6
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/node.js +22 -11
- package/_esm/errors/node.js.map +1 -1
- package/_esm/errors/rpc.js +36 -18
- package/_esm/errors/rpc.js.map +1 -1
- 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,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.snapshot = void 0;
|
4
|
+
async function snapshot(client) {
|
5
|
+
return await client.request({
|
6
|
+
method: 'evm_snapshot',
|
7
|
+
});
|
8
|
+
}
|
9
|
+
exports.snapshot = snapshot;
|
10
|
+
//# sourceMappingURL=snapshot.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../../../actions/test/snapshot.ts"],"names":[],"mappings":";;;AA+BO,KAAK,UAAU,QAAQ,CAG5B,MAAsE;IACtE,OAAO,MAAM,MAAM,CAAC,OAAO,CAAC;QAC1B,MAAM,EAAE,cAAc;KACvB,CAAC,CAAA;AACJ,CAAC;AAPD,4BAOC"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.stopImpersonatingAccount = void 0;
|
4
|
+
async function stopImpersonatingAccount(client, { address }) {
|
5
|
+
await client.request({
|
6
|
+
method: `${client.mode}_stopImpersonatingAccount`,
|
7
|
+
params: [address],
|
8
|
+
});
|
9
|
+
}
|
10
|
+
exports.stopImpersonatingAccount = stopImpersonatingAccount;
|
11
|
+
//# sourceMappingURL=stopImpersonatingAccount.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stopImpersonatingAccount.js","sourceRoot":"","sources":["../../../actions/test/stopImpersonatingAccount.ts"],"names":[],"mappings":";;;AAyCO,KAAK,UAAU,wBAAwB,CAI5C,MAAsE,EACtE,EAAE,OAAO,EAAsC;IAE/C,MAAM,MAAM,CAAC,OAAO,CAAC;QACnB,MAAM,EAAE,GAAG,MAAM,CAAC,IAAI,2BAA2B;QACjD,MAAM,EAAE,CAAC,OAAO,CAAC;KAClB,CAAC,CAAA;AACJ,CAAC;AAXD,4DAWC"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.addChain = void 0;
|
4
|
+
const toHex_js_1 = require("../../utils/encoding/toHex.js");
|
5
|
+
async function addChain(client, { chain }) {
|
6
|
+
const { id, name, nativeCurrency, rpcUrls, blockExplorers } = chain;
|
7
|
+
await client.request({
|
8
|
+
method: 'wallet_addEthereumChain',
|
9
|
+
params: [
|
10
|
+
{
|
11
|
+
chainId: (0, toHex_js_1.numberToHex)(id),
|
12
|
+
chainName: name,
|
13
|
+
nativeCurrency,
|
14
|
+
rpcUrls: rpcUrls.default.http,
|
15
|
+
blockExplorerUrls: blockExplorers
|
16
|
+
? Object.values(blockExplorers).map(({ url }) => url)
|
17
|
+
: undefined,
|
18
|
+
},
|
19
|
+
],
|
20
|
+
});
|
21
|
+
}
|
22
|
+
exports.addChain = addChain;
|
23
|
+
//# sourceMappingURL=addChain.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"addChain.js","sourceRoot":"","sources":["../../../actions/wallet/addChain.ts"],"names":[],"mappings":";;;AAMA,4DAGsC;AA+B/B,KAAK,UAAU,QAAQ,CAG5B,MAA2C,EAAE,EAAE,KAAK,EAAsB;IAC1E,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,KAAK,CAAA;IACnE,MAAM,MAAM,CAAC,OAAO,CAAC;QACnB,MAAM,EAAE,yBAAyB;QACjC,MAAM,EAAE;YACN;gBACE,OAAO,EAAE,IAAA,sBAAW,EAAC,EAAE,CAAC;gBACxB,SAAS,EAAE,IAAI;gBACf,cAAc;gBACd,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,IAAI;gBAC7B,iBAAiB,EAAE,cAAc;oBAC/B,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC;oBACrD,CAAC,CAAC,SAAS;aACd;SACF;KACF,CAAC,CAAA;AACJ,CAAC;AAnBD,4BAmBC"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.deployContract = void 0;
|
4
|
+
const encodeDeployData_js_1 = require("../../utils/abi/encodeDeployData.js");
|
5
|
+
const sendTransaction_js_1 = require("./sendTransaction.js");
|
6
|
+
function deployContract(walletClient, parameters) {
|
7
|
+
const { abi, args, bytecode, ...request } = parameters;
|
8
|
+
const calldata = (0, encodeDeployData_js_1.encodeDeployData)({ abi, args, bytecode });
|
9
|
+
return (0, sendTransaction_js_1.sendTransaction)(walletClient, {
|
10
|
+
...request,
|
11
|
+
data: calldata,
|
12
|
+
});
|
13
|
+
}
|
14
|
+
exports.deployContract = deployContract;
|
15
|
+
//# sourceMappingURL=deployContract.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"deployContract.js","sourceRoot":"","sources":["../../../actions/wallet/deployContract.ts"],"names":[],"mappings":";;;AAUA,6EAAsE;AAGtE,6DAK6B;AAsD7B,SAAgB,cAAc,CAM5B,YAA+C,EAC/C,UAAwE;IAExE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,GACvC,UAAsC,CAAA;IACxC,MAAM,QAAQ,GAAG,IAAA,sCAAgB,EAAC,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAA;IAC1D,OAAO,IAAA,oCAAe,EAAC,YAAY,EAAE;QACnC,GAAG,OAAO;QACV,IAAI,EAAE,QAAQ;KACwD,CAAC,CAAA;AAC3E,CAAC;AAhBD,wCAgBC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getAddresses = void 0;
|
4
|
+
const getAddress_js_1 = require("../../utils/address/getAddress.js");
|
5
|
+
async function getAddresses(client) {
|
6
|
+
if (client.account?.type === 'local')
|
7
|
+
return [client.account.address];
|
8
|
+
const addresses = await client.request({ method: 'eth_accounts' });
|
9
|
+
return addresses.map((address) => (0, getAddress_js_1.checksumAddress)(address));
|
10
|
+
}
|
11
|
+
exports.getAddresses = getAddresses;
|
12
|
+
//# sourceMappingURL=getAddresses.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getAddresses.js","sourceRoot":"","sources":["../../../actions/wallet/getAddresses.ts"],"names":[],"mappings":";;;AAOA,qEAG0C;AA8BnC,KAAK,UAAU,YAAY,CAIhC,MAA2C;IAE3C,IAAI,MAAM,CAAC,OAAO,EAAE,IAAI,KAAK,OAAO;QAAE,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;IACrE,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC,CAAA;IAClE,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,IAAA,+BAAe,EAAC,OAAO,CAAC,CAAC,CAAA;AAC7D,CAAC;AATD,oCASC"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getPermissions = void 0;
|
4
|
+
async function getPermissions(client) {
|
5
|
+
const permissions = await client.request({ method: 'wallet_getPermissions' });
|
6
|
+
return permissions;
|
7
|
+
}
|
8
|
+
exports.getPermissions = getPermissions;
|
9
|
+
//# sourceMappingURL=getPermissions.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getPermissions.js","sourceRoot":"","sources":["../../../actions/wallet/getPermissions.ts"],"names":[],"mappings":";;;AAgCO,KAAK,UAAU,cAAc,CAGlC,MAA2C;IAC3C,MAAM,WAAW,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,uBAAuB,EAAE,CAAC,CAAA;IAC7E,OAAO,WAAW,CAAA;AACpB,CAAC;AAND,wCAMC"}
|
@@ -0,0 +1,71 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.prepareTransactionRequest = void 0;
|
4
|
+
const parseAccount_js_1 = require("../../accounts/utils/parseAccount.js");
|
5
|
+
const estimateFeesPerGas_js_1 = require("../../actions/public/estimateFeesPerGas.js");
|
6
|
+
const estimateGas_js_1 = require("../../actions/public/estimateGas.js");
|
7
|
+
const getBlock_js_1 = require("../../actions/public/getBlock.js");
|
8
|
+
const getTransactionCount_js_1 = require("../../actions/public/getTransactionCount.js");
|
9
|
+
const account_js_1 = require("../../errors/account.js");
|
10
|
+
const fee_js_1 = require("../../errors/fee.js");
|
11
|
+
const getAction_js_1 = require("../../utils/getAction.js");
|
12
|
+
const assertRequest_js_1 = require("../../utils/transaction/assertRequest.js");
|
13
|
+
const getTransactionType_js_1 = require("../../utils/transaction/getTransactionType.js");
|
14
|
+
async function prepareTransactionRequest(client, args) {
|
15
|
+
const { account: account_ = client.account, chain, gas, nonce, type } = args;
|
16
|
+
if (!account_)
|
17
|
+
throw new account_js_1.AccountNotFoundError();
|
18
|
+
const account = (0, parseAccount_js_1.parseAccount)(account_);
|
19
|
+
const block = await (0, getAction_js_1.getAction)(client, getBlock_js_1.getBlock)({ blockTag: 'latest' });
|
20
|
+
const request = { ...args, from: account.address };
|
21
|
+
if (typeof nonce === 'undefined')
|
22
|
+
request.nonce = await (0, getAction_js_1.getAction)(client, getTransactionCount_js_1.getTransactionCount)({
|
23
|
+
address: account.address,
|
24
|
+
blockTag: 'pending',
|
25
|
+
});
|
26
|
+
if (typeof type === 'undefined') {
|
27
|
+
try {
|
28
|
+
request.type = (0, getTransactionType_js_1.getTransactionType)(request);
|
29
|
+
}
|
30
|
+
catch {
|
31
|
+
request.type =
|
32
|
+
typeof block.baseFeePerGas === 'bigint' ? 'eip1559' : 'legacy';
|
33
|
+
}
|
34
|
+
}
|
35
|
+
if (request.type === 'eip1559') {
|
36
|
+
const { maxFeePerGas, maxPriorityFeePerGas } = await (0, estimateFeesPerGas_js_1.internal_estimateFeesPerGas)(client, {
|
37
|
+
block,
|
38
|
+
chain,
|
39
|
+
request: request,
|
40
|
+
});
|
41
|
+
if (typeof args.maxPriorityFeePerGas === 'undefined' &&
|
42
|
+
args.maxFeePerGas &&
|
43
|
+
args.maxFeePerGas < maxPriorityFeePerGas)
|
44
|
+
throw new fee_js_1.MaxFeePerGasTooLowError({
|
45
|
+
maxPriorityFeePerGas,
|
46
|
+
});
|
47
|
+
request.maxPriorityFeePerGas = maxPriorityFeePerGas;
|
48
|
+
request.maxFeePerGas = maxFeePerGas;
|
49
|
+
}
|
50
|
+
else {
|
51
|
+
if (typeof args.maxFeePerGas !== 'undefined' ||
|
52
|
+
typeof args.maxPriorityFeePerGas !== 'undefined')
|
53
|
+
throw new fee_js_1.Eip1559FeesNotSupportedError();
|
54
|
+
const { gasPrice: gasPrice_ } = await (0, estimateFeesPerGas_js_1.internal_estimateFeesPerGas)(client, {
|
55
|
+
block,
|
56
|
+
chain,
|
57
|
+
request: request,
|
58
|
+
type: 'legacy',
|
59
|
+
});
|
60
|
+
request.gasPrice = gasPrice_;
|
61
|
+
}
|
62
|
+
if (typeof gas === 'undefined')
|
63
|
+
request.gas = await (0, getAction_js_1.getAction)(client, estimateGas_js_1.estimateGas)({
|
64
|
+
...request,
|
65
|
+
account: { address: account.address, type: 'json-rpc' },
|
66
|
+
});
|
67
|
+
(0, assertRequest_js_1.assertRequest)(request);
|
68
|
+
return request;
|
69
|
+
}
|
70
|
+
exports.prepareTransactionRequest = prepareTransactionRequest;
|
71
|
+
//# sourceMappingURL=prepareTransactionRequest.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"prepareTransactionRequest.js","sourceRoot":"","sources":["../../../actions/wallet/prepareTransactionRequest.ts"],"names":[],"mappings":";;;AACA,0EAG6C;AAC7C,sFAGmD;AACnD,wEAI4C;AAC5C,kEAGyC;AACzC,wFAGoD;AAGpD,wDAGgC;AAChC,gDAG4B;AAO5B,2DAAoD;AAKpD,+EAAwE;AACxE,yFAAkF;AA0E3E,KAAK,UAAU,yBAAyB,CAK7C,MAA2C,EAC3C,IAA2E;IAI3E,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,CAAA;IAC5E,IAAI,CAAC,QAAQ;QAAE,MAAM,IAAI,iCAAoB,EAAE,CAAA;IAC/C,MAAM,OAAO,GAAG,IAAA,8BAAY,EAAC,QAAQ,CAAC,CAAA;IAEtC,MAAM,KAAK,GAAG,MAAM,IAAA,wBAAS,EAAC,MAAM,EAAE,sBAAQ,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAA;IAEvE,MAAM,OAAO,GAAG,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,CAAA;IAElD,IAAI,OAAO,KAAK,KAAK,WAAW;QAC9B,OAAO,CAAC,KAAK,GAAG,MAAM,IAAA,wBAAS,EAC7B,MAAM,EACN,4CAAmB,CACpB,CAAC;YACA,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,QAAQ,EAAE,SAAS;SACpB,CAAC,CAAA;IAEJ,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;QAC/B,IAAI;YACF,OAAO,CAAC,IAAI,GAAG,IAAA,0CAAkB,EAC/B,OAAkC,CAC5B,CAAA;SACT;QAAC,MAAM;YAEN,OAAO,CAAC,IAAI;gBACV,OAAO,KAAK,CAAC,aAAa,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAA;SACjE;KACF;IAED,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,EAAE;QAE9B,MAAM,EAAE,YAAY,EAAE,oBAAoB,EAAE,GAC1C,MAAM,IAAA,mDAA2B,EAAC,MAAM,EAAE;YACxC,KAAK;YACL,KAAK;YACL,OAAO,EAAE,OAA8C;SACxD,CAAC,CAAA;QAEJ,IACE,OAAO,IAAI,CAAC,oBAAoB,KAAK,WAAW;YAChD,IAAI,CAAC,YAAY;YACjB,IAAI,CAAC,YAAY,GAAG,oBAAoB;YAExC,MAAM,IAAI,gCAAuB,CAAC;gBAChC,oBAAoB;aACrB,CAAC,CAAA;QAEJ,OAAO,CAAC,oBAAoB,GAAG,oBAAoB,CAAA;QACnD,OAAO,CAAC,YAAY,GAAG,YAAY,CAAA;KACpC;SAAM;QAEL,IACE,OAAO,IAAI,CAAC,YAAY,KAAK,WAAW;YACxC,OAAO,IAAI,CAAC,oBAAoB,KAAK,WAAW;YAEhD,MAAM,IAAI,qCAA4B,EAAE,CAAA;QAE1C,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,MAAM,IAAA,mDAA2B,EAAC,MAAM,EAAE;YACxE,KAAK;YACL,KAAK;YACL,OAAO,EAAE,OAA8C;YACvD,IAAI,EAAE,QAAQ;SACf,CAAC,CAAA;QACF,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAA;KAC7B;IAED,IAAI,OAAO,GAAG,KAAK,WAAW;QAC5B,OAAO,CAAC,GAAG,GAAG,MAAM,IAAA,wBAAS,EAC3B,MAAM,EACN,4BAAW,CACZ,CAAC;YACA,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE;SAC/B,CAAC,CAAA;IAE7B,IAAA,gCAAa,EAAC,OAAkC,CAAC,CAAA;IAEjD,OAAO,OAIN,CAAA;AACH,CAAC;AA5FD,8DA4FC"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.requestAddresses = void 0;
|
4
|
+
const getAddress_js_1 = require("../../utils/address/getAddress.js");
|
5
|
+
async function requestAddresses(client) {
|
6
|
+
const addresses = await client.request({ method: 'eth_requestAccounts' });
|
7
|
+
return addresses.map((address) => (0, getAddress_js_1.getAddress)(address));
|
8
|
+
}
|
9
|
+
exports.requestAddresses = requestAddresses;
|
10
|
+
//# sourceMappingURL=requestAddresses.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"requestAddresses.js","sourceRoot":"","sources":["../../../actions/wallet/requestAddresses.ts"],"names":[],"mappings":";;;AAOA,qEAA8D;AA+BvD,KAAK,UAAU,gBAAgB,CAIpC,MAA2C;IAE3C,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,qBAAqB,EAAE,CAAC,CAAA;IACzE,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,IAAA,0BAAU,EAAC,OAAO,CAAC,CAAC,CAAA;AACxD,CAAC;AARD,4CAQC"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.requestPermissions = void 0;
|
4
|
+
async function requestPermissions(client, permissions) {
|
5
|
+
return client.request({
|
6
|
+
method: 'wallet_requestPermissions',
|
7
|
+
params: [permissions],
|
8
|
+
});
|
9
|
+
}
|
10
|
+
exports.requestPermissions = requestPermissions;
|
11
|
+
//# sourceMappingURL=requestPermissions.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"requestPermissions.js","sourceRoot":"","sources":["../../../actions/wallet/requestPermissions.ts"],"names":[],"mappings":";;;AA2CO,KAAK,UAAU,kBAAkB,CAItC,MAA2C,EAC3C,WAAyC;IAEzC,OAAO,MAAM,CAAC,OAAO,CAAC;QACpB,MAAM,EAAE,2BAA2B;QACnC,MAAM,EAAE,CAAC,WAAW,CAAC;KACtB,CAAC,CAAA;AACJ,CAAC;AAXD,gDAWC"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.sendRawTransaction = void 0;
|
4
|
+
async function sendRawTransaction(client, { serializedTransaction }) {
|
5
|
+
return client.request({
|
6
|
+
method: 'eth_sendRawTransaction',
|
7
|
+
params: [serializedTransaction],
|
8
|
+
});
|
9
|
+
}
|
10
|
+
exports.sendRawTransaction = sendRawTransaction;
|
11
|
+
//# sourceMappingURL=sendRawTransaction.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"sendRawTransaction.js","sourceRoot":"","sources":["../../../actions/wallet/sendRawTransaction.ts"],"names":[],"mappings":";;;AA2CO,KAAK,UAAU,kBAAkB,CACtC,MAAiC,EACjC,EAAE,qBAAqB,EAAgC;IAEvD,OAAO,MAAM,CAAC,OAAO,CAAC;QACpB,MAAM,EAAE,wBAAwB;QAChC,MAAM,EAAE,CAAC,qBAAqB,CAAC;KAChC,CAAC,CAAA;AACJ,CAAC;AARD,gDAQC"}
|
@@ -0,0 +1,87 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.sendTransaction = void 0;
|
4
|
+
const parseAccount_js_1 = require("../../accounts/utils/parseAccount.js");
|
5
|
+
const account_js_1 = require("../../errors/account.js");
|
6
|
+
const assertCurrentChain_js_1 = require("../../utils/chain/assertCurrentChain.js");
|
7
|
+
const getTransactionError_js_1 = require("../../utils/errors/getTransactionError.js");
|
8
|
+
const extract_js_1 = require("../../utils/formatters/extract.js");
|
9
|
+
const transactionRequest_js_1 = require("../../utils/formatters/transactionRequest.js");
|
10
|
+
const getAction_js_1 = require("../../utils/getAction.js");
|
11
|
+
const assertRequest_js_1 = require("../../utils/transaction/assertRequest.js");
|
12
|
+
const getChainId_js_1 = require("../public/getChainId.js");
|
13
|
+
const prepareTransactionRequest_js_1 = require("./prepareTransactionRequest.js");
|
14
|
+
const sendRawTransaction_js_1 = require("./sendRawTransaction.js");
|
15
|
+
async function sendTransaction(client, args) {
|
16
|
+
const { account: account_ = client.account, chain = client.chain, accessList, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, ...rest } = args;
|
17
|
+
if (!account_)
|
18
|
+
throw new account_js_1.AccountNotFoundError({
|
19
|
+
docsPath: '/docs/actions/wallet/sendTransaction',
|
20
|
+
});
|
21
|
+
const account = (0, parseAccount_js_1.parseAccount)(account_);
|
22
|
+
try {
|
23
|
+
(0, assertRequest_js_1.assertRequest)(args);
|
24
|
+
let chainId;
|
25
|
+
if (chain !== null) {
|
26
|
+
chainId = await (0, getAction_js_1.getAction)(client, getChainId_js_1.getChainId)({});
|
27
|
+
(0, assertCurrentChain_js_1.assertCurrentChain)({
|
28
|
+
currentChainId: chainId,
|
29
|
+
chain,
|
30
|
+
});
|
31
|
+
}
|
32
|
+
if (account.type === 'local') {
|
33
|
+
const request = await (0, getAction_js_1.getAction)(client, prepareTransactionRequest_js_1.prepareTransactionRequest)({
|
34
|
+
account,
|
35
|
+
accessList,
|
36
|
+
chain,
|
37
|
+
data,
|
38
|
+
gas,
|
39
|
+
gasPrice,
|
40
|
+
maxFeePerGas,
|
41
|
+
maxPriorityFeePerGas,
|
42
|
+
nonce,
|
43
|
+
to,
|
44
|
+
value,
|
45
|
+
...rest,
|
46
|
+
});
|
47
|
+
if (!chainId)
|
48
|
+
chainId = await (0, getAction_js_1.getAction)(client, getChainId_js_1.getChainId)({});
|
49
|
+
const serializer = chain?.serializers?.transaction;
|
50
|
+
const serializedTransaction = (await account.signTransaction({
|
51
|
+
...request,
|
52
|
+
chainId,
|
53
|
+
}, { serializer }));
|
54
|
+
return await (0, getAction_js_1.getAction)(client, sendRawTransaction_js_1.sendRawTransaction)({
|
55
|
+
serializedTransaction,
|
56
|
+
});
|
57
|
+
}
|
58
|
+
const chainFormat = client.chain?.formatters?.transactionRequest?.format;
|
59
|
+
const format = chainFormat || transactionRequest_js_1.formatTransactionRequest;
|
60
|
+
const request = format({
|
61
|
+
...(0, extract_js_1.extract)(rest, { format: chainFormat }),
|
62
|
+
accessList,
|
63
|
+
data,
|
64
|
+
from: account.address,
|
65
|
+
gas,
|
66
|
+
gasPrice,
|
67
|
+
maxFeePerGas,
|
68
|
+
maxPriorityFeePerGas,
|
69
|
+
nonce,
|
70
|
+
to,
|
71
|
+
value,
|
72
|
+
});
|
73
|
+
return await client.request({
|
74
|
+
method: 'eth_sendTransaction',
|
75
|
+
params: [request],
|
76
|
+
});
|
77
|
+
}
|
78
|
+
catch (err) {
|
79
|
+
throw (0, getTransactionError_js_1.getTransactionError)(err, {
|
80
|
+
...args,
|
81
|
+
account,
|
82
|
+
chain: args.chain || undefined,
|
83
|
+
});
|
84
|
+
}
|
85
|
+
}
|
86
|
+
exports.sendTransaction = sendTransaction;
|
87
|
+
//# sourceMappingURL=sendTransaction.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"sendTransaction.js","sourceRoot":"","sources":["../../../actions/wallet/sendTransaction.ts"],"names":[],"mappings":"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"}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.signMessage = void 0;
|
4
|
+
const parseAccount_js_1 = require("../../accounts/utils/parseAccount.js");
|
5
|
+
const account_js_1 = require("../../errors/account.js");
|
6
|
+
const toHex_js_1 = require("../../utils/encoding/toHex.js");
|
7
|
+
async function signMessage(client, { account: account_ = client.account, message, }) {
|
8
|
+
if (!account_)
|
9
|
+
throw new account_js_1.AccountNotFoundError({
|
10
|
+
docsPath: '/docs/actions/wallet/signMessage',
|
11
|
+
});
|
12
|
+
const account = (0, parseAccount_js_1.parseAccount)(account_);
|
13
|
+
if (account.type === 'local')
|
14
|
+
return account.signMessage({ message });
|
15
|
+
const message_ = (() => {
|
16
|
+
if (typeof message === 'string')
|
17
|
+
return (0, toHex_js_1.stringToHex)(message);
|
18
|
+
if (message.raw instanceof Uint8Array)
|
19
|
+
return (0, toHex_js_1.toHex)(message.raw);
|
20
|
+
return message.raw;
|
21
|
+
})();
|
22
|
+
return client.request({
|
23
|
+
method: 'personal_sign',
|
24
|
+
params: [message_, account.address],
|
25
|
+
});
|
26
|
+
}
|
27
|
+
exports.signMessage = signMessage;
|
28
|
+
//# sourceMappingURL=signMessage.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"signMessage.js","sourceRoot":"","sources":["../../../actions/wallet/signMessage.ts"],"names":[],"mappings":";;;AACA,0EAG6C;AAI7C,wDAA8D;AAM9D,4DAIsC;AA+D/B,KAAK,UAAU,WAAW,CAI/B,MAA2C,EAC3C,EACE,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAClC,OAAO,GACyB;IAElC,IAAI,CAAC,QAAQ;QACX,MAAM,IAAI,iCAAoB,CAAC;YAC7B,QAAQ,EAAE,kCAAkC;SAC7C,CAAC,CAAA;IACJ,MAAM,OAAO,GAAG,IAAA,8BAAY,EAAC,QAAQ,CAAC,CAAA;IACtC,IAAI,OAAO,CAAC,IAAI,KAAK,OAAO;QAAE,OAAO,OAAO,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;IAErE,MAAM,QAAQ,GAAG,CAAC,GAAG,EAAE;QACrB,IAAI,OAAO,OAAO,KAAK,QAAQ;YAAE,OAAO,IAAA,sBAAW,EAAC,OAAO,CAAC,CAAA;QAC5D,IAAI,OAAO,CAAC,GAAG,YAAY,UAAU;YAAE,OAAO,IAAA,gBAAK,EAAC,OAAO,CAAC,GAAG,CAAC,CAAA;QAChE,OAAO,OAAO,CAAC,GAAG,CAAA;IACpB,CAAC,CAAC,EAAE,CAAA;IAEJ,OAAO,MAAM,CAAC,OAAO,CAAC;QACpB,MAAM,EAAE,eAAe;QACvB,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC;KACpC,CAAC,CAAA;AACJ,CAAC;AA3BD,kCA2BC"}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.signTransaction = void 0;
|
4
|
+
const parseAccount_js_1 = require("../../accounts/utils/parseAccount.js");
|
5
|
+
const account_js_1 = require("../../errors/account.js");
|
6
|
+
const assertCurrentChain_js_1 = require("../../utils/chain/assertCurrentChain.js");
|
7
|
+
const transactionRequest_js_1 = require("../../utils/formatters/transactionRequest.js");
|
8
|
+
const getAction_js_1 = require("../../utils/getAction.js");
|
9
|
+
const index_js_1 = require("../../utils/index.js");
|
10
|
+
const assertRequest_js_1 = require("../../utils/transaction/assertRequest.js");
|
11
|
+
const getChainId_js_1 = require("../public/getChainId.js");
|
12
|
+
async function signTransaction(client, args) {
|
13
|
+
const { account: account_ = client.account, chain = client.chain, ...transaction } = args;
|
14
|
+
if (!account_)
|
15
|
+
throw new account_js_1.AccountNotFoundError({
|
16
|
+
docsPath: '/docs/actions/wallet/signTransaction',
|
17
|
+
});
|
18
|
+
const account = (0, parseAccount_js_1.parseAccount)(account_);
|
19
|
+
(0, assertRequest_js_1.assertRequest)({
|
20
|
+
account,
|
21
|
+
...args,
|
22
|
+
});
|
23
|
+
const chainId = await (0, getAction_js_1.getAction)(client, getChainId_js_1.getChainId)({});
|
24
|
+
if (chain !== null)
|
25
|
+
(0, assertCurrentChain_js_1.assertCurrentChain)({
|
26
|
+
currentChainId: chainId,
|
27
|
+
chain,
|
28
|
+
});
|
29
|
+
const formatters = chain?.formatters || client.chain?.formatters;
|
30
|
+
const format = formatters?.transactionRequest?.format || transactionRequest_js_1.formatTransactionRequest;
|
31
|
+
if (account.type === 'local')
|
32
|
+
return account.signTransaction({
|
33
|
+
...transaction,
|
34
|
+
chainId,
|
35
|
+
}, { serializer: client.chain?.serializers?.transaction });
|
36
|
+
return await client.request({
|
37
|
+
method: 'eth_signTransaction',
|
38
|
+
params: [
|
39
|
+
{
|
40
|
+
...format(transaction),
|
41
|
+
chainId: (0, index_js_1.numberToHex)(chainId),
|
42
|
+
from: account.address,
|
43
|
+
},
|
44
|
+
],
|
45
|
+
});
|
46
|
+
}
|
47
|
+
exports.signTransaction = signTransaction;
|
48
|
+
//# sourceMappingURL=signTransaction.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"signTransaction.js","sourceRoot":"","sources":["../../../actions/wallet/signTransaction.ts"],"names":[],"mappings":";;;AACA,0EAG6C;AAI7C,wDAA8D;AAY9D,mFAGgD;AAEhD,wFAGqD;AACrD,2DAAoD;AACpD,mDAAkD;AAClD,+EAGiD;AACjD,2DAA8E;AAsEvE,KAAK,UAAU,eAAe,CAKnC,MAA2C,EAC3C,IAAiE;IAEjE,MAAM,EACJ,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAClC,KAAK,GAAG,MAAM,CAAC,KAAK,EACpB,GAAG,WAAW,EACf,GAAG,IAAI,CAAA;IAER,IAAI,CAAC,QAAQ;QACX,MAAM,IAAI,iCAAoB,CAAC;YAC7B,QAAQ,EAAE,sCAAsC;SACjD,CAAC,CAAA;IACJ,MAAM,OAAO,GAAG,IAAA,8BAAY,EAAC,QAAQ,CAAC,CAAA;IAEtC,IAAA,gCAAa,EAAC;QACZ,OAAO;QACP,GAAG,IAAI;KACR,CAAC,CAAA;IAEF,MAAM,OAAO,GAAG,MAAM,IAAA,wBAAS,EAAC,MAAM,EAAE,0BAAU,CAAC,CAAC,EAAE,CAAC,CAAA;IACvD,IAAI,KAAK,KAAK,IAAI;QAChB,IAAA,0CAAkB,EAAC;YACjB,cAAc,EAAE,OAAO;YACvB,KAAK;SACN,CAAC,CAAA;IAEJ,MAAM,UAAU,GAAG,KAAK,EAAE,UAAU,IAAI,MAAM,CAAC,KAAK,EAAE,UAAU,CAAA;IAChE,MAAM,MAAM,GACV,UAAU,EAAE,kBAAkB,EAAE,MAAM,IAAI,gDAAwB,CAAA;IAEpE,IAAI,OAAO,CAAC,IAAI,KAAK,OAAO;QAC1B,OAAO,OAAO,CAAC,eAAe,CAC5B;YACE,GAAG,WAAW;YACd,OAAO;SAC8B,EACvC,EAAE,UAAU,EAAE,MAAM,CAAC,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,CACjB,CAAA;IAEzC,OAAO,MAAM,MAAM,CAAC,OAAO,CAAC;QAC1B,MAAM,EAAE,qBAAqB;QAC7B,MAAM,EAAE;YACN;gBACE,GAAG,MAAM,CAAC,WAA4C,CAAC;gBACvD,OAAO,EAAE,IAAA,sBAAW,EAAC,OAAO,CAAC;gBAC7B,IAAI,EAAE,OAAO,CAAC,OAAO;aACc;SACtC;KACF,CAAC,CAAA;AACJ,CAAC;AAvDD,0CAuDC"}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.signTypedData = void 0;
|
4
|
+
const parseAccount_js_1 = require("../../accounts/utils/parseAccount.js");
|
5
|
+
const account_js_1 = require("../../errors/account.js");
|
6
|
+
const isHex_js_1 = require("../../utils/data/isHex.js");
|
7
|
+
const stringify_js_1 = require("../../utils/stringify.js");
|
8
|
+
const typedData_js_1 = require("../../utils/typedData.js");
|
9
|
+
async function signTypedData(client, parameters) {
|
10
|
+
const { account: account_ = client.account, domain, message, primaryType, } = parameters;
|
11
|
+
if (!account_)
|
12
|
+
throw new account_js_1.AccountNotFoundError({
|
13
|
+
docsPath: '/docs/actions/wallet/signTypedData',
|
14
|
+
});
|
15
|
+
const account = (0, parseAccount_js_1.parseAccount)(account_);
|
16
|
+
const types = {
|
17
|
+
EIP712Domain: (0, typedData_js_1.getTypesForEIP712Domain)({ domain }),
|
18
|
+
...parameters.types,
|
19
|
+
};
|
20
|
+
(0, typedData_js_1.validateTypedData)({ domain, message, primaryType, types });
|
21
|
+
if (account.type === 'local')
|
22
|
+
return account.signTypedData({ domain, message, primaryType, types });
|
23
|
+
const typedData = (0, stringify_js_1.stringify)({ domain: domain ?? {}, message, primaryType, types }, (_, value) => ((0, isHex_js_1.isHex)(value) ? value.toLowerCase() : value));
|
24
|
+
return client.request({
|
25
|
+
method: 'eth_signTypedData_v4',
|
26
|
+
params: [account.address, typedData],
|
27
|
+
});
|
28
|
+
}
|
29
|
+
exports.signTypedData = signTypedData;
|
30
|
+
//# sourceMappingURL=signTypedData.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"signTypedData.js","sourceRoot":"","sources":["../../../actions/wallet/signTypedData.ts"],"names":[],"mappings":";;;AAGA,0EAG6C;AAI7C,wDAGgC;AAOhC,wDAAsE;AACtE,2DAA6E;AAC7E,2DAKiC;AA0H1B,KAAK,UAAU,aAAa,CAMjC,MAAyC,EACzC,UAAoE;IAEpE,MAAM,EACJ,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAClC,MAAM,EACN,OAAO,EACP,WAAW,GACZ,GAAG,UAAgD,CAAA;IAEpD,IAAI,CAAC,QAAQ;QACX,MAAM,IAAI,iCAAoB,CAAC;YAC7B,QAAQ,EAAE,oCAAoC;SAC/C,CAAC,CAAA;IACJ,MAAM,OAAO,GAAG,IAAA,8BAAY,EAAC,QAAQ,CAAC,CAAA;IAEtC,MAAM,KAAK,GAAG;QACZ,YAAY,EAAE,IAAA,sCAAuB,EAAC,EAAE,MAAM,EAAE,CAAC;QACjD,GAAG,UAAU,CAAC,KAAK;KACpB,CAAA;IAID,IAAA,gCAAiB,EAAC,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAA;IAE1D,IAAI,OAAO,CAAC,IAAI,KAAK,OAAO;QAC1B,OAAO,OAAO,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAA;IAEvE,MAAM,SAAS,GAAG,IAAA,wBAAS,EACzB,EAAE,MAAM,EAAE,MAAM,IAAI,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,EACrD,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,IAAA,gBAAK,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAC3D,CAAA;IACD,OAAO,MAAM,CAAC,OAAO,CAAC;QACpB,MAAM,EAAE,sBAAsB;QAC9B,MAAM,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,SAAS,CAAC;KACrC,CAAC,CAAA;AACJ,CAAC;AA1CD,sCA0CC"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.switchChain = void 0;
|
4
|
+
const toHex_js_1 = require("../../utils/encoding/toHex.js");
|
5
|
+
async function switchChain(client, { id }) {
|
6
|
+
await client.request({
|
7
|
+
method: 'wallet_switchEthereumChain',
|
8
|
+
params: [
|
9
|
+
{
|
10
|
+
chainId: (0, toHex_js_1.numberToHex)(id),
|
11
|
+
},
|
12
|
+
],
|
13
|
+
});
|
14
|
+
}
|
15
|
+
exports.switchChain = switchChain;
|
16
|
+
//# sourceMappingURL=switchChain.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"switchChain.js","sourceRoot":"","sources":["../../../actions/wallet/switchChain.ts"],"names":[],"mappings":";;;AAMA,4DAGsC;AAgC/B,KAAK,UAAU,WAAW,CAG/B,MAA2C,EAAE,EAAE,EAAE,EAAyB;IAC1E,MAAM,MAAM,CAAC,OAAO,CAAC;QACnB,MAAM,EAAE,4BAA4B;QACpC,MAAM,EAAE;YACN;gBACE,OAAO,EAAE,IAAA,sBAAW,EAAC,EAAE,CAAC;aACzB;SACF;KACF,CAAC,CAAA;AACJ,CAAC;AAZD,kCAYC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.watchAsset = void 0;
|
4
|
+
async function watchAsset(client, params) {
|
5
|
+
const added = await client.request({
|
6
|
+
method: 'wallet_watchAsset',
|
7
|
+
params,
|
8
|
+
});
|
9
|
+
return added;
|
10
|
+
}
|
11
|
+
exports.watchAsset = watchAsset;
|
12
|
+
//# sourceMappingURL=watchAsset.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"watchAsset.js","sourceRoot":"","sources":["../../../actions/wallet/watchAsset.ts"],"names":[],"mappings":";;;AAwCO,KAAK,UAAU,UAAU,CAI9B,MAA2C,EAC3C,MAA4B;IAE5B,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QACjC,MAAM,EAAE,mBAAmB;QAC3B,MAAM;KACP,CAAC,CAAA;IACF,OAAO,KAAK,CAAA;AACd,CAAC;AAZD,gCAYC"}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.writeContract = void 0;
|
4
|
+
const encodeFunctionData_js_1 = require("../../utils/abi/encodeFunctionData.js");
|
5
|
+
const getAction_js_1 = require("../../utils/getAction.js");
|
6
|
+
const sendTransaction_js_1 = require("./sendTransaction.js");
|
7
|
+
async function writeContract(client, parameters) {
|
8
|
+
const { abi, address, args, dataSuffix, functionName, ...request } = parameters;
|
9
|
+
const data = (0, encodeFunctionData_js_1.encodeFunctionData)({ abi, args, functionName });
|
10
|
+
const action = (0, getAction_js_1.getAction)(client, sendTransaction_js_1.sendTransaction);
|
11
|
+
return action({
|
12
|
+
data: `${data}${dataSuffix ? dataSuffix.replace('0x', '') : ''}`,
|
13
|
+
to: address,
|
14
|
+
...request,
|
15
|
+
});
|
16
|
+
}
|
17
|
+
exports.writeContract = writeContract;
|
18
|
+
//# sourceMappingURL=writeContract.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"writeContract.js","sourceRoot":"","sources":["../../../actions/wallet/writeContract.ts"],"names":[],"mappings":";;;AAgBA,iFAG8C;AAE9C,2DAAoD;AACpD,6DAI6B;AAyGtB,KAAK,UAAU,aAAa,CAQjC,MAAyC,EACzC,UAOC;IAED,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,OAAO,EAAE,GAChE,UAAqC,CAAA;IACvC,MAAM,IAAI,GAAG,IAAA,0CAAkB,EAAC,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAA;IAC5D,MAAM,MAAM,GAAG,IAAA,wBAAS,EAAC,MAAM,EAAE,oCAAe,CAAC,CAAA;IACjD,OAAO,MAAM,CAAC;QACZ,IAAI,EAAE,GAAG,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;QAChE,EAAE,EAAE,OAAO;QACX,GAAG,OAAO;KACX,CAAC,CAAA;AACJ,CAAC;AA3BD,sCA2BC"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.chainConfig = void 0;
|
4
|
+
const formatters_js_1 = require("./formatters.js");
|
5
|
+
const serializers_js_1 = require("./serializers.js");
|
6
|
+
exports.chainConfig = {
|
7
|
+
formatters: formatters_js_1.formatters,
|
8
|
+
serializers: serializers_js_1.serializers,
|
9
|
+
};
|
10
|
+
//# sourceMappingURL=chainConfig.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"chainConfig.js","sourceRoot":"","sources":["../../../chains/celo/chainConfig.ts"],"names":[],"mappings":";;;AAAA,mDAA4C;AAC5C,qDAA8C;AAEjC,QAAA,WAAW,GAAG;IACzB,UAAU,EAAV,0BAAU;IACV,WAAW,EAAX,4BAAW;CACH,CAAA"}
|
@@ -0,0 +1,82 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.formatters = void 0;
|
4
|
+
const fromHex_js_1 = require("../../utils/encoding/fromHex.js");
|
5
|
+
const toHex_js_1 = require("../../utils/encoding/toHex.js");
|
6
|
+
const block_js_1 = require("../../utils/formatters/block.js");
|
7
|
+
const transaction_js_1 = require("../../utils/formatters/transaction.js");
|
8
|
+
const transactionReceipt_js_1 = require("../../utils/formatters/transactionReceipt.js");
|
9
|
+
const transactionRequest_js_1 = require("../../utils/formatters/transactionRequest.js");
|
10
|
+
const utils_js_1 = require("./utils.js");
|
11
|
+
exports.formatters = {
|
12
|
+
block: (0, block_js_1.defineBlock)({
|
13
|
+
exclude: ['difficulty', 'gasLimit', 'mixHash', 'nonce', 'uncles'],
|
14
|
+
format(args) {
|
15
|
+
const transactions = args.transactions?.map((transaction) => {
|
16
|
+
if (typeof transaction === 'string')
|
17
|
+
return transaction;
|
18
|
+
return {
|
19
|
+
...(0, transaction_js_1.formatTransaction)(transaction),
|
20
|
+
feeCurrency: transaction.feeCurrency,
|
21
|
+
...(transaction.type !== '0x7b'
|
22
|
+
? {
|
23
|
+
gatewayFee: transaction.gatewayFee
|
24
|
+
? (0, fromHex_js_1.hexToBigInt)(transaction.gatewayFee)
|
25
|
+
: null,
|
26
|
+
gatewayFeeRecipient: transaction.gatewayFeeRecipient || null,
|
27
|
+
}
|
28
|
+
: {}),
|
29
|
+
};
|
30
|
+
});
|
31
|
+
return {
|
32
|
+
randomness: args.randomness,
|
33
|
+
transactions,
|
34
|
+
};
|
35
|
+
},
|
36
|
+
}),
|
37
|
+
transaction: (0, transaction_js_1.defineTransaction)({
|
38
|
+
format(args) {
|
39
|
+
const transaction = { feeCurrency: args.feeCurrency };
|
40
|
+
if (args.type === '0x7b')
|
41
|
+
transaction.type = 'cip64';
|
42
|
+
else {
|
43
|
+
if (args.type === '0x7c')
|
44
|
+
transaction.type = 'cip42';
|
45
|
+
transaction.gatewayFee = args.gatewayFee
|
46
|
+
? (0, fromHex_js_1.hexToBigInt)(args.gatewayFee)
|
47
|
+
: null;
|
48
|
+
transaction.gatewayFeeRecipient = args.gatewayFeeRecipient;
|
49
|
+
}
|
50
|
+
return transaction;
|
51
|
+
},
|
52
|
+
}),
|
53
|
+
transactionReceipt: (0, transactionReceipt_js_1.defineTransactionReceipt)({
|
54
|
+
format(args) {
|
55
|
+
return {
|
56
|
+
feeCurrency: args.feeCurrency,
|
57
|
+
gatewayFee: args.gatewayFee ? (0, fromHex_js_1.hexToBigInt)(args.gatewayFee) : null,
|
58
|
+
gatewayFeeRecipient: args.gatewayFeeRecipient,
|
59
|
+
};
|
60
|
+
},
|
61
|
+
}),
|
62
|
+
transactionRequest: (0, transactionRequest_js_1.defineTransactionRequest)({
|
63
|
+
format(args) {
|
64
|
+
const request = {
|
65
|
+
feeCurrency: args.feeCurrency,
|
66
|
+
};
|
67
|
+
if ((0, utils_js_1.isCIP64)(args))
|
68
|
+
request.type = '0x7b';
|
69
|
+
else {
|
70
|
+
if ((0, utils_js_1.isCIP42)(args))
|
71
|
+
request.type = '0x7c';
|
72
|
+
request.gatewayFee =
|
73
|
+
typeof args.gatewayFee !== 'undefined'
|
74
|
+
? (0, toHex_js_1.numberToHex)(args.gatewayFee)
|
75
|
+
: undefined;
|
76
|
+
request.gatewayFeeRecipient = args.gatewayFeeRecipient;
|
77
|
+
}
|
78
|
+
return request;
|
79
|
+
},
|
80
|
+
}),
|
81
|
+
};
|
82
|
+
//# sourceMappingURL=formatters.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"formatters.js","sourceRoot":"","sources":["../../../chains/celo/formatters.ts"],"names":[],"mappings":"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"}
|