viem 1.6.4 → 1.6.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/chains/dist/cjs/celo/formatters.js.map +1 -0
- package/chains/dist/cjs/celo/parsers.js.map +1 -0
- package/chains/dist/cjs/celo/serializers.js.map +1 -0
- package/chains/dist/cjs/celo/types.js.map +1 -0
- package/chains/dist/cjs/index.js.map +1 -0
- package/chains/dist/cjs/optimism/fees.js.map +1 -0
- package/chains/dist/cjs/optimism/formatters.js.map +1 -0
- package/chains/dist/cjs/optimism/types.js.map +1 -0
- package/chains/dist/cjs/types.js.map +1 -0
- package/chains/dist/cjs/utils.js.map +1 -0
- package/chains/dist/tsconfig.build.tsbuildinfo +1 -0
- package/chains/node_modules/.bin/tsc +17 -0
- package/chains/node_modules/.bin/tsserver +17 -0
- package/chains/tsconfig.tsbuildinfo +1 -0
- package/dist/cjs/chains/celo/parsers.js +76 -0
- package/dist/cjs/chains/celo/parsers.js.map +1 -0
- package/dist/cjs/chains/celo/serializers.js +2 -1
- package/dist/cjs/chains/celo/serializers.js.map +1 -1
- package/dist/cjs/chains/utils.js +3 -1
- package/dist/cjs/chains/utils.js.map +1 -1
- package/dist/cjs/errors/version.js +1 -1
- package/dist/cjs/utils/rpc.js +5 -7
- package/dist/cjs/utils/rpc.js.map +1 -1
- package/dist/cjs/utils/transaction/parseTransaction.js +8 -3
- package/dist/cjs/utils/transaction/parseTransaction.js.map +1 -1
- package/dist/esm/chains/celo/parsers.js +72 -0
- package/dist/esm/chains/celo/parsers.js.map +1 -0
- package/dist/esm/chains/celo/serializers.js +1 -3
- package/dist/esm/chains/celo/serializers.js.map +1 -1
- package/dist/esm/chains/utils.js +1 -0
- package/dist/esm/chains/utils.js.map +1 -1
- package/dist/esm/errors/version.js +1 -1
- package/dist/esm/utils/rpc.js +5 -7
- package/dist/esm/utils/rpc.js.map +1 -1
- package/dist/esm/utils/transaction/parseTransaction.js +6 -3
- package/dist/esm/utils/transaction/parseTransaction.js.map +1 -1
- package/package.json +1 -1
- package/src/chains/celo/parsers.ts +123 -0
- package/src/chains/celo/serializers.ts +13 -34
- package/src/chains/celo/types.ts +32 -0
- package/src/chains/utils.ts +6 -2
- package/src/errors/version.ts +1 -1
- package/src/utils/rpc.ts +5 -8
- package/src/utils/transaction/parseTransaction.ts +7 -9
- package/dist/types/abi.d.ts +0 -6
- package/dist/types/abi.d.ts.map +0 -1
- package/dist/types/accounts/generateMnemonic.d.ts +0 -9
- package/dist/types/accounts/generateMnemonic.d.ts.map +0 -1
- package/dist/types/accounts/generatePrivateKey.d.ts +0 -8
- package/dist/types/accounts/generatePrivateKey.d.ts.map +0 -1
- package/dist/types/accounts/hdKeyToAccount.d.ts +0 -9
- package/dist/types/accounts/hdKeyToAccount.d.ts.map +0 -1
- package/dist/types/accounts/index.d.ts +0 -27
- package/dist/types/accounts/index.d.ts.map +0 -1
- package/dist/types/accounts/mnemonicToAccount.d.ts +0 -8
- package/dist/types/accounts/mnemonicToAccount.d.ts.map +0 -1
- package/dist/types/accounts/privateKeyToAccount.d.ts +0 -9
- package/dist/types/accounts/privateKeyToAccount.d.ts.map +0 -1
- package/dist/types/accounts/toAccount.d.ts +0 -11
- package/dist/types/accounts/toAccount.d.ts.map +0 -1
- package/dist/types/accounts/types.d.ts +0 -52
- package/dist/types/accounts/types.d.ts.map +0 -1
- package/dist/types/accounts/utils/parseAccount.d.ts +0 -4
- package/dist/types/accounts/utils/parseAccount.d.ts.map +0 -1
- package/dist/types/accounts/utils/privateKeyToAddress.d.ts +0 -11
- package/dist/types/accounts/utils/privateKeyToAddress.d.ts.map +0 -1
- package/dist/types/accounts/utils/publicKeyToAddress.d.ts +0 -11
- package/dist/types/accounts/utils/publicKeyToAddress.d.ts.map +0 -1
- package/dist/types/accounts/utils/sign.d.ts +0 -16
- package/dist/types/accounts/utils/sign.d.ts.map +0 -1
- package/dist/types/accounts/utils/signMessage.d.ts +0 -16
- package/dist/types/accounts/utils/signMessage.d.ts.map +0 -1
- package/dist/types/accounts/utils/signTransaction.d.ts +0 -12
- package/dist/types/accounts/utils/signTransaction.d.ts.map +0 -1
- package/dist/types/accounts/utils/signTypedData.d.ts +0 -20
- package/dist/types/accounts/utils/signTypedData.d.ts.map +0 -1
- package/dist/types/accounts/wordlists/czech.d.ts +0 -2
- package/dist/types/accounts/wordlists/czech.d.ts.map +0 -1
- package/dist/types/accounts/wordlists/english.d.ts +0 -2
- package/dist/types/accounts/wordlists/english.d.ts.map +0 -1
- package/dist/types/accounts/wordlists/french.d.ts +0 -2
- package/dist/types/accounts/wordlists/french.d.ts.map +0 -1
- package/dist/types/accounts/wordlists/italian.d.ts +0 -2
- package/dist/types/accounts/wordlists/italian.d.ts.map +0 -1
- package/dist/types/accounts/wordlists/japanese.d.ts +0 -2
- package/dist/types/accounts/wordlists/japanese.d.ts.map +0 -1
- package/dist/types/accounts/wordlists/korean.d.ts +0 -2
- package/dist/types/accounts/wordlists/korean.d.ts.map +0 -1
- package/dist/types/accounts/wordlists/simplifiedChinese.d.ts +0 -2
- package/dist/types/accounts/wordlists/simplifiedChinese.d.ts.map +0 -1
- package/dist/types/accounts/wordlists/spanish.d.ts +0 -2
- package/dist/types/accounts/wordlists/spanish.d.ts.map +0 -1
- package/dist/types/accounts/wordlists/traditionalChinese.d.ts +0 -2
- package/dist/types/accounts/wordlists/traditionalChinese.d.ts.map +0 -1
- package/dist/types/actions/ens/getEnsAddress.d.ts +0 -45
- package/dist/types/actions/ens/getEnsAddress.d.ts.map +0 -1
- package/dist/types/actions/ens/getEnsAvatar.d.ts +0 -41
- package/dist/types/actions/ens/getEnsAvatar.d.ts.map +0 -1
- package/dist/types/actions/ens/getEnsName.d.ts +0 -41
- package/dist/types/actions/ens/getEnsName.d.ts.map +0 -1
- package/dist/types/actions/ens/getEnsResolver.d.ts +0 -43
- package/dist/types/actions/ens/getEnsResolver.d.ts.map +0 -1
- package/dist/types/actions/ens/getEnsText.d.ts +0 -46
- package/dist/types/actions/ens/getEnsText.d.ts.map +0 -1
- package/dist/types/actions/getContract.d.ts +0 -314
- package/dist/types/actions/getContract.d.ts.map +0 -1
- package/dist/types/actions/index.d.ts +0 -80
- package/dist/types/actions/index.d.ts.map +0 -1
- package/dist/types/actions/public/call.d.ts +0 -56
- package/dist/types/actions/public/call.d.ts.map +0 -1
- package/dist/types/actions/public/createBlockFilter.d.ts +0 -28
- package/dist/types/actions/public/createBlockFilter.d.ts.map +0 -1
- package/dist/types/actions/public/createContractEventFilter.d.ts +0 -50
- package/dist/types/actions/public/createContractEventFilter.d.ts.map +0 -1
- package/dist/types/actions/public/createEventFilter.d.ts +0 -76
- package/dist/types/actions/public/createEventFilter.d.ts.map +0 -1
- package/dist/types/actions/public/createPendingTransactionFilter.d.ts +0 -28
- package/dist/types/actions/public/createPendingTransactionFilter.d.ts.map +0 -1
- package/dist/types/actions/public/estimateContractGas.d.ts +0 -39
- package/dist/types/actions/public/estimateContractGas.d.ts.map +0 -1
- package/dist/types/actions/public/estimateGas.d.ts +0 -49
- package/dist/types/actions/public/estimateGas.d.ts.map +0 -1
- package/dist/types/actions/public/getBalance.d.ts +0 -55
- package/dist/types/actions/public/getBalance.d.ts.map +0 -1
- package/dist/types/actions/public/getBlock.d.ts +0 -56
- package/dist/types/actions/public/getBlock.d.ts.map +0 -1
- package/dist/types/actions/public/getBlockNumber.d.ts +0 -57
- package/dist/types/actions/public/getBlockNumber.d.ts.map +0 -1
- package/dist/types/actions/public/getBlockTransactionCount.d.ts +0 -47
- package/dist/types/actions/public/getBlockTransactionCount.d.ts.map +0 -1
- package/dist/types/actions/public/getBytecode.d.ts +0 -41
- package/dist/types/actions/public/getBytecode.d.ts.map +0 -1
- package/dist/types/actions/public/getChainId.d.ts +0 -28
- package/dist/types/actions/public/getChainId.d.ts.map +0 -1
- package/dist/types/actions/public/getFeeHistory.d.ts +0 -53
- package/dist/types/actions/public/getFeeHistory.d.ts.map +0 -1
- package/dist/types/actions/public/getFilterChanges.d.ts +0 -96
- package/dist/types/actions/public/getFilterChanges.d.ts.map +0 -1
- package/dist/types/actions/public/getFilterLogs.d.ts +0 -40
- package/dist/types/actions/public/getFilterLogs.d.ts.map +0 -1
- package/dist/types/actions/public/getGasPrice.d.ts +0 -27
- package/dist/types/actions/public/getGasPrice.d.ts.map +0 -1
- package/dist/types/actions/public/getLogs.d.ts +0 -71
- package/dist/types/actions/public/getLogs.d.ts.map +0 -1
- package/dist/types/actions/public/getStorageAt.d.ts +0 -43
- package/dist/types/actions/public/getStorageAt.d.ts.map +0 -1
- package/dist/types/actions/public/getTransaction.d.ts +0 -65
- package/dist/types/actions/public/getTransaction.d.ts.map +0 -1
- package/dist/types/actions/public/getTransactionConfirmations.d.ts +0 -41
- package/dist/types/actions/public/getTransactionConfirmations.d.ts.map +0 -1
- package/dist/types/actions/public/getTransactionCount.d.ts +0 -44
- package/dist/types/actions/public/getTransactionCount.d.ts.map +0 -1
- package/dist/types/actions/public/getTransactionReceipt.d.ts +0 -36
- package/dist/types/actions/public/getTransactionReceipt.d.ts.map +0 -1
- package/dist/types/actions/public/multicall.d.ts +0 -56
- package/dist/types/actions/public/multicall.d.ts.map +0 -1
- package/dist/types/actions/public/readContract.d.ts +0 -41
- package/dist/types/actions/public/readContract.d.ts.map +0 -1
- package/dist/types/actions/public/simulateContract.d.ts +0 -54
- package/dist/types/actions/public/simulateContract.d.ts.map +0 -1
- package/dist/types/actions/public/uninstallFilter.d.ts +0 -34
- package/dist/types/actions/public/uninstallFilter.d.ts.map +0 -1
- package/dist/types/actions/public/verifyHash.d.ts +0 -24
- package/dist/types/actions/public/verifyHash.d.ts.map +0 -1
- package/dist/types/actions/public/verifyMessage.d.ts +0 -28
- package/dist/types/actions/public/verifyMessage.d.ts.map +0 -1
- package/dist/types/actions/public/verifyTypedData.d.ts +0 -27
- package/dist/types/actions/public/verifyTypedData.d.ts.map +0 -1
- package/dist/types/actions/public/waitForTransactionReceipt.d.ts +0 -72
- package/dist/types/actions/public/waitForTransactionReceipt.d.ts.map +0 -1
- package/dist/types/actions/public/watchBlockNumber.d.ts +0 -59
- package/dist/types/actions/public/watchBlockNumber.d.ts.map +0 -1
- package/dist/types/actions/public/watchBlocks.d.ts +0 -67
- package/dist/types/actions/public/watchBlocks.d.ts.map +0 -1
- package/dist/types/actions/public/watchContractEvent.d.ts +0 -89
- package/dist/types/actions/public/watchContractEvent.d.ts.map +0 -1
- package/dist/types/actions/public/watchEvent.d.ts +0 -104
- package/dist/types/actions/public/watchEvent.d.ts.map +0 -1
- package/dist/types/actions/public/watchPendingTransactions.d.ts +0 -74
- package/dist/types/actions/public/watchPendingTransactions.d.ts.map +0 -1
- package/dist/types/actions/test/dropTransaction.d.ts +0 -33
- package/dist/types/actions/test/dropTransaction.d.ts.map +0 -1
- package/dist/types/actions/test/getAutomine.d.ts +0 -27
- package/dist/types/actions/test/getAutomine.d.ts.map +0 -1
- package/dist/types/actions/test/getTxpoolContent.d.ts +0 -34
- package/dist/types/actions/test/getTxpoolContent.d.ts.map +0 -1
- package/dist/types/actions/test/getTxpoolStatus.d.ts +0 -30
- package/dist/types/actions/test/getTxpoolStatus.d.ts.map +0 -1
- package/dist/types/actions/test/impersonateAccount.d.ts +0 -33
- package/dist/types/actions/test/impersonateAccount.d.ts.map +0 -1
- package/dist/types/actions/test/increaseTime.d.ts +0 -32
- package/dist/types/actions/test/increaseTime.d.ts.map +0 -1
- package/dist/types/actions/test/inspectTxpool.d.ts +0 -31
- package/dist/types/actions/test/inspectTxpool.d.ts.map +0 -1
- package/dist/types/actions/test/mine.d.ts +0 -32
- package/dist/types/actions/test/mine.d.ts.map +0 -1
- package/dist/types/actions/test/removeBlockTimestampInterval.d.ts +0 -25
- package/dist/types/actions/test/removeBlockTimestampInterval.d.ts.map +0 -1
- package/dist/types/actions/test/reset.d.ts +0 -32
- package/dist/types/actions/test/reset.d.ts.map +0 -1
- package/dist/types/actions/test/revert.d.ts +0 -31
- package/dist/types/actions/test/revert.d.ts.map +0 -1
- package/dist/types/actions/test/sendUnsignedTransaction.d.ts +0 -35
- package/dist/types/actions/test/sendUnsignedTransaction.d.ts.map +0 -1
- package/dist/types/actions/test/setAutomine.d.ts +0 -25
- package/dist/types/actions/test/setAutomine.d.ts.map +0 -1
- package/dist/types/actions/test/setBalance.d.ts +0 -36
- package/dist/types/actions/test/setBalance.d.ts.map +0 -1
- package/dist/types/actions/test/setBlockGasLimit.d.ts +0 -30
- package/dist/types/actions/test/setBlockGasLimit.d.ts.map +0 -1
- package/dist/types/actions/test/setBlockTimestampInterval.d.ts +0 -30
- package/dist/types/actions/test/setBlockTimestampInterval.d.ts.map +0 -1
- package/dist/types/actions/test/setCode.d.ts +0 -37
- package/dist/types/actions/test/setCode.d.ts.map +0 -1
- package/dist/types/actions/test/setCoinbase.d.ts +0 -33
- package/dist/types/actions/test/setCoinbase.d.ts.map +0 -1
- package/dist/types/actions/test/setIntervalMining.d.ts +0 -30
- package/dist/types/actions/test/setIntervalMining.d.ts.map +0 -1
- package/dist/types/actions/test/setLoggingEnabled.d.ts +0 -25
- package/dist/types/actions/test/setLoggingEnabled.d.ts.map +0 -1
- package/dist/types/actions/test/setMinGasPrice.d.ts +0 -34
- package/dist/types/actions/test/setMinGasPrice.d.ts.map +0 -1
- package/dist/types/actions/test/setNextBlockBaseFeePerGas.d.ts +0 -32
- package/dist/types/actions/test/setNextBlockBaseFeePerGas.d.ts.map +0 -1
- package/dist/types/actions/test/setNextBlockTimestamp.d.ts +0 -30
- package/dist/types/actions/test/setNextBlockTimestamp.d.ts.map +0 -1
- package/dist/types/actions/test/setNonce.d.ts +0 -36
- package/dist/types/actions/test/setNonce.d.ts.map +0 -1
- package/dist/types/actions/test/setRpcUrl.d.ts +0 -26
- package/dist/types/actions/test/setRpcUrl.d.ts.map +0 -1
- package/dist/types/actions/test/setStorageAt.d.ts +0 -40
- package/dist/types/actions/test/setStorageAt.d.ts.map +0 -1
- package/dist/types/actions/test/snapshot.d.ts +0 -25
- package/dist/types/actions/test/snapshot.d.ts.map +0 -1
- package/dist/types/actions/test/stopImpersonatingAccount.d.ts +0 -33
- package/dist/types/actions/test/stopImpersonatingAccount.d.ts.map +0 -1
- package/dist/types/actions/wallet/addChain.d.ts +0 -29
- package/dist/types/actions/wallet/addChain.d.ts.map +0 -1
- package/dist/types/actions/wallet/deployContract.d.ts +0 -43
- package/dist/types/actions/wallet/deployContract.d.ts.map +0 -1
- package/dist/types/actions/wallet/getAddresses.d.ts +0 -28
- package/dist/types/actions/wallet/getAddresses.d.ts.map +0 -1
- package/dist/types/actions/wallet/getPermissions.d.ts +0 -28
- package/dist/types/actions/wallet/getPermissions.d.ts.map +0 -1
- package/dist/types/actions/wallet/requestAddresses.d.ts +0 -32
- package/dist/types/actions/wallet/requestAddresses.d.ts.map +0 -1
- package/dist/types/actions/wallet/requestPermissions.d.ts +0 -37
- package/dist/types/actions/wallet/requestPermissions.d.ts.map +0 -1
- package/dist/types/actions/wallet/sendTransaction.d.ts +0 -57
- package/dist/types/actions/wallet/sendTransaction.d.ts.map +0 -1
- package/dist/types/actions/wallet/signMessage.d.ts +0 -58
- package/dist/types/actions/wallet/signMessage.d.ts.map +0 -1
- package/dist/types/actions/wallet/signTypedData.d.ts +0 -114
- package/dist/types/actions/wallet/signTypedData.d.ts.map +0 -1
- package/dist/types/actions/wallet/switchChain.d.ts +0 -30
- package/dist/types/actions/wallet/switchChain.d.ts.map +0 -1
- package/dist/types/actions/wallet/watchAsset.d.ts +0 -37
- package/dist/types/actions/wallet/watchAsset.d.ts.map +0 -1
- package/dist/types/actions/wallet/writeContract.d.ts +0 -68
- package/dist/types/actions/wallet/writeContract.d.ts.map +0 -1
- package/dist/types/chains/celo/formatters.d.ts +0 -195
- package/dist/types/chains/celo/formatters.d.ts.map +0 -1
- package/dist/types/chains/celo/serializers.d.ts +0 -20
- package/dist/types/chains/celo/serializers.d.ts.map +0 -1
- package/dist/types/chains/celo/types.d.ts +0 -60
- package/dist/types/chains/celo/types.d.ts.map +0 -1
- package/dist/types/chains/index.d.ts +0 -5329
- package/dist/types/chains/index.d.ts.map +0 -1
- package/dist/types/chains/optimism/fees.d.ts +0 -4
- package/dist/types/chains/optimism/fees.d.ts.map +0 -1
- package/dist/types/chains/optimism/formatters.d.ts +0 -299
- package/dist/types/chains/optimism/formatters.d.ts.map +0 -1
- package/dist/types/chains/optimism/types.d.ts +0 -53
- package/dist/types/chains/optimism/types.d.ts.map +0 -1
- package/dist/types/chains/utils.d.ts +0 -6
- package/dist/types/chains/utils.d.ts.map +0 -1
- package/dist/types/clients/createClient.d.ts +0 -79
- package/dist/types/clients/createClient.d.ts.map +0 -1
- package/dist/types/clients/createPublicClient.d.ts +0 -29
- package/dist/types/clients/createPublicClient.d.ts.map +0 -1
- package/dist/types/clients/createTestClient.d.ts +0 -43
- package/dist/types/clients/createTestClient.d.ts.map +0 -1
- package/dist/types/clients/createWalletClient.d.ts +0 -49
- package/dist/types/clients/createWalletClient.d.ts.map +0 -1
- package/dist/types/clients/decorators/public.d.ts +0 -1087
- package/dist/types/clients/decorators/public.d.ts.map +0 -1
- package/dist/types/clients/decorators/test.d.ts +0 -599
- package/dist/types/clients/decorators/test.d.ts.map +0 -1
- package/dist/types/clients/decorators/wallet.d.ts +0 -449
- package/dist/types/clients/decorators/wallet.d.ts.map +0 -1
- package/dist/types/clients/transports/createTransport.d.ts +0 -34
- package/dist/types/clients/transports/createTransport.d.ts.map +0 -1
- package/dist/types/clients/transports/custom.d.ts +0 -21
- package/dist/types/clients/transports/custom.d.ts.map +0 -1
- package/dist/types/clients/transports/fallback.d.ts +0 -75
- package/dist/types/clients/transports/fallback.d.ts.map +0 -1
- package/dist/types/clients/transports/http.d.ts +0 -40
- package/dist/types/clients/transports/http.d.ts.map +0 -1
- package/dist/types/clients/transports/webSocket.d.ts +0 -46
- package/dist/types/clients/transports/webSocket.d.ts.map +0 -1
- package/dist/types/constants/abis.d.ts +0 -165
- package/dist/types/constants/abis.d.ts.map +0 -1
- package/dist/types/constants/address.d.ts +0 -2
- package/dist/types/constants/address.d.ts.map +0 -1
- package/dist/types/constants/contract.d.ts +0 -2
- package/dist/types/constants/contract.d.ts.map +0 -1
- package/dist/types/constants/contracts.d.ts +0 -2
- package/dist/types/constants/contracts.d.ts.map +0 -1
- package/dist/types/constants/number.d.ts +0 -97
- package/dist/types/constants/number.d.ts.map +0 -1
- package/dist/types/constants/solidity.d.ts +0 -15
- package/dist/types/constants/solidity.d.ts.map +0 -1
- package/dist/types/constants/unit.d.ts +0 -13
- package/dist/types/constants/unit.d.ts.map +0 -1
- package/dist/types/contract.d.ts +0 -30
- package/dist/types/contract.d.ts.map +0 -1
- package/dist/types/ens.d.ts +0 -9
- package/dist/types/ens.d.ts.map +0 -1
- package/dist/types/errors/abi.d.ts +0 -169
- package/dist/types/errors/abi.d.ts.map +0 -1
- package/dist/types/errors/account.d.ts +0 -8
- package/dist/types/errors/account.d.ts.map +0 -1
- package/dist/types/errors/address.d.ts +0 -8
- package/dist/types/errors/address.d.ts.map +0 -1
- package/dist/types/errors/base.d.ts +0 -24
- package/dist/types/errors/base.d.ts.map +0 -1
- package/dist/types/errors/block.d.ts +0 -10
- package/dist/types/errors/block.d.ts.map +0 -1
- package/dist/types/errors/ccip.d.ts +0 -29
- package/dist/types/errors/ccip.d.ts.map +0 -1
- package/dist/types/errors/chain.d.ts +0 -35
- package/dist/types/errors/chain.d.ts.map +0 -1
- package/dist/types/errors/contract.d.ts +0 -64
- package/dist/types/errors/contract.d.ts.map +0 -1
- package/dist/types/errors/data.d.ts +0 -18
- package/dist/types/errors/data.d.ts.map +0 -1
- package/dist/types/errors/encoding.d.ts +0 -53
- package/dist/types/errors/encoding.d.ts.map +0 -1
- package/dist/types/errors/ens.d.ts +0 -26
- package/dist/types/errors/ens.d.ts.map +0 -1
- package/dist/types/errors/estimateGas.d.ts +0 -14
- package/dist/types/errors/estimateGas.d.ts.map +0 -1
- package/dist/types/errors/log.d.ts +0 -6
- package/dist/types/errors/log.d.ts.map +0 -1
- package/dist/types/errors/node.d.ts +0 -105
- package/dist/types/errors/node.d.ts.map +0 -1
- package/dist/types/errors/request.d.ts +0 -61
- package/dist/types/errors/request.d.ts.map +0 -1
- package/dist/types/errors/rpc.d.ts +0 -221
- package/dist/types/errors/rpc.d.ts.map +0 -1
- package/dist/types/errors/transaction.d.ts +0 -79
- package/dist/types/errors/transaction.d.ts.map +0 -1
- package/dist/types/errors/transport.d.ts +0 -5
- package/dist/types/errors/transport.d.ts.map +0 -1
- package/dist/types/errors/utils.d.ts +0 -5
- package/dist/types/errors/utils.d.ts.map +0 -1
- package/dist/types/errors/version.d.ts +0 -2
- package/dist/types/errors/version.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -211
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/public.d.ts +0 -31
- package/dist/types/public.d.ts.map +0 -1
- package/dist/types/test.d.ts +0 -29
- package/dist/types/test.d.ts.map +0 -1
- package/dist/types/types/account.d.ts +0 -12
- package/dist/types/types/account.d.ts.map +0 -1
- package/dist/types/types/block.d.ts +0 -62
- package/dist/types/types/block.d.ts.map +0 -1
- package/dist/types/types/chain.d.ts +0 -62
- package/dist/types/types/chain.d.ts.map +0 -1
- package/dist/types/types/contract.d.ts +0 -138
- package/dist/types/types/contract.d.ts.map +0 -1
- package/dist/types/types/eip1193.d.ts +0 -1216
- package/dist/types/types/eip1193.d.ts.map +0 -1
- package/dist/types/types/ens.d.ts +0 -5
- package/dist/types/types/ens.d.ts.map +0 -1
- package/dist/types/types/fee.d.ts +0 -29
- package/dist/types/types/fee.d.ts.map +0 -1
- package/dist/types/types/filter.d.ts +0 -40
- package/dist/types/types/filter.d.ts.map +0 -1
- package/dist/types/types/log.d.ts +0 -55
- package/dist/types/types/log.d.ts.map +0 -1
- package/dist/types/types/misc.d.ts +0 -14
- package/dist/types/types/misc.d.ts.map +0 -1
- package/dist/types/types/multicall.d.ts +0 -48
- package/dist/types/types/multicall.d.ts.map +0 -1
- package/dist/types/types/rpc.d.ts +0 -20
- package/dist/types/types/rpc.d.ts.map +0 -1
- package/dist/types/types/transaction.d.ts +0 -147
- package/dist/types/types/transaction.d.ts.map +0 -1
- package/dist/types/types/transport.d.ts +0 -3
- package/dist/types/types/transport.d.ts.map +0 -1
- package/dist/types/types/typedData.d.ts +0 -47
- package/dist/types/types/typedData.d.ts.map +0 -1
- package/dist/types/types/utils.d.ts +0 -188
- package/dist/types/types/utils.d.ts.map +0 -1
- package/dist/types/types/window.d.ts +0 -7
- package/dist/types/types/window.d.ts.map +0 -1
- package/dist/types/utils/abi/decodeAbiParameters.d.ts +0 -5
- package/dist/types/utils/abi/decodeAbiParameters.d.ts.map +0 -1
- package/dist/types/utils/abi/decodeDeployData.d.ts +0 -13
- package/dist/types/utils/abi/decodeDeployData.d.ts.map +0 -1
- package/dist/types/utils/abi/decodeErrorResult.d.ts +0 -16
- package/dist/types/utils/abi/decodeErrorResult.d.ts.map +0 -1
- package/dist/types/utils/abi/decodeEventLog.d.ts +0 -20
- package/dist/types/utils/abi/decodeEventLog.d.ts.map +0 -1
- package/dist/types/utils/abi/decodeFunctionData.d.ts +0 -15
- package/dist/types/utils/abi/decodeFunctionData.d.ts.map +0 -1
- package/dist/types/utils/abi/decodeFunctionResult.d.ts +0 -14
- package/dist/types/utils/abi/decodeFunctionResult.d.ts.map +0 -1
- package/dist/types/utils/abi/encodeAbiParameters.d.ts +0 -9
- package/dist/types/utils/abi/encodeAbiParameters.d.ts.map +0 -1
- package/dist/types/utils/abi/encodeDeployData.d.ts +0 -9
- package/dist/types/utils/abi/encodeDeployData.d.ts.map +0 -1
- package/dist/types/utils/abi/encodeErrorResult.d.ts +0 -11
- package/dist/types/utils/abi/encodeErrorResult.d.ts.map +0 -1
- package/dist/types/utils/abi/encodeEventTopics.d.ts +0 -13
- package/dist/types/utils/abi/encodeEventTopics.d.ts.map +0 -1
- package/dist/types/utils/abi/encodeFunctionData.d.ts +0 -11
- package/dist/types/utils/abi/encodeFunctionData.d.ts.map +0 -1
- package/dist/types/utils/abi/encodeFunctionResult.d.ts +0 -13
- package/dist/types/utils/abi/encodeFunctionResult.d.ts.map +0 -1
- package/dist/types/utils/abi/encodePacked.d.ts +0 -11
- package/dist/types/utils/abi/encodePacked.d.ts.map +0 -1
- package/dist/types/utils/abi/formatAbiItem.d.ts +0 -9
- package/dist/types/utils/abi/formatAbiItem.d.ts.map +0 -1
- package/dist/types/utils/abi/formatAbiItemWithArgs.d.ts +0 -8
- package/dist/types/utils/abi/formatAbiItemWithArgs.d.ts.map +0 -1
- package/dist/types/utils/abi/getAbiItem.d.ts +0 -12
- package/dist/types/utils/abi/getAbiItem.d.ts.map +0 -1
- package/dist/types/utils/accounts.d.ts +0 -3
- package/dist/types/utils/accounts.d.ts.map +0 -1
- package/dist/types/utils/address/getAddress.d.ts +0 -4
- package/dist/types/utils/address/getAddress.d.ts.map +0 -1
- package/dist/types/utils/address/getContractAddress.d.ts +0 -20
- package/dist/types/utils/address/getContractAddress.d.ts.map +0 -1
- package/dist/types/utils/address/isAddress.d.ts +0 -3
- package/dist/types/utils/address/isAddress.d.ts.map +0 -1
- package/dist/types/utils/address/isAddressEqual.d.ts +0 -3
- package/dist/types/utils/address/isAddressEqual.d.ts.map +0 -1
- package/dist/types/utils/buildRequest.d.ts +0 -6
- package/dist/types/utils/buildRequest.d.ts.map +0 -1
- package/dist/types/utils/ccip.d.ts +0 -37
- package/dist/types/utils/ccip.d.ts.map +0 -1
- package/dist/types/utils/chain.d.ts +0 -14
- package/dist/types/utils/chain.d.ts.map +0 -1
- package/dist/types/utils/contract/extractFunctionParts.d.ts +0 -13
- package/dist/types/utils/contract/extractFunctionParts.d.ts.map +0 -1
- package/dist/types/utils/data/concat.d.ts +0 -6
- package/dist/types/utils/data/concat.d.ts.map +0 -1
- package/dist/types/utils/data/isBytes.d.ts +0 -3
- package/dist/types/utils/data/isBytes.d.ts.map +0 -1
- package/dist/types/utils/data/isBytesEqual.d.ts +0 -3
- package/dist/types/utils/data/isBytesEqual.d.ts.map +0 -1
- package/dist/types/utils/data/isHex.d.ts +0 -5
- package/dist/types/utils/data/isHex.d.ts.map +0 -1
- package/dist/types/utils/data/pad.d.ts +0 -11
- package/dist/types/utils/data/pad.d.ts.map +0 -1
- package/dist/types/utils/data/size.d.ts +0 -9
- package/dist/types/utils/data/size.d.ts.map +0 -1
- package/dist/types/utils/data/slice.d.ts +0 -33
- package/dist/types/utils/data/slice.d.ts.map +0 -1
- package/dist/types/utils/data/trim.d.ts +0 -8
- package/dist/types/utils/data/trim.d.ts.map +0 -1
- package/dist/types/utils/encoding/fromBytes.d.ts +0 -109
- package/dist/types/utils/encoding/fromBytes.d.ts.map +0 -1
- package/dist/types/utils/encoding/fromHex.d.ts +0 -138
- package/dist/types/utils/encoding/fromHex.d.ts.map +0 -1
- package/dist/types/utils/encoding/fromRlp.d.ts +0 -6
- package/dist/types/utils/encoding/fromRlp.d.ts.map +0 -1
- package/dist/types/utils/encoding/toBytes.d.ts +0 -125
- package/dist/types/utils/encoding/toBytes.d.ts.map +0 -1
- package/dist/types/utils/encoding/toHex.d.ts +0 -139
- package/dist/types/utils/encoding/toHex.d.ts.map +0 -1
- package/dist/types/utils/encoding/toRlp.d.ts +0 -8
- package/dist/types/utils/encoding/toRlp.d.ts.map +0 -1
- package/dist/types/utils/ens/avatar/parseAvatarRecord.d.ts +0 -9
- package/dist/types/utils/ens/avatar/parseAvatarRecord.d.ts.map +0 -1
- package/dist/types/utils/ens/avatar/utils.d.ts +0 -37
- package/dist/types/utils/ens/avatar/utils.d.ts.map +0 -1
- package/dist/types/utils/ens/encodeLabelhash.d.ts +0 -3
- package/dist/types/utils/ens/encodeLabelhash.d.ts.map +0 -1
- package/dist/types/utils/ens/encodedLabelToLabelhash.d.ts +0 -3
- package/dist/types/utils/ens/encodedLabelToLabelhash.d.ts.map +0 -1
- package/dist/types/utils/ens/errors.d.ts +0 -2
- package/dist/types/utils/ens/errors.d.ts.map +0 -1
- package/dist/types/utils/ens/labelhash.d.ts +0 -11
- package/dist/types/utils/ens/labelhash.d.ts.map +0 -1
- package/dist/types/utils/ens/namehash.d.ts +0 -13
- package/dist/types/utils/ens/namehash.d.ts.map +0 -1
- package/dist/types/utils/ens/normalize.d.ts +0 -12
- package/dist/types/utils/ens/normalize.d.ts.map +0 -1
- package/dist/types/utils/ens/packetToBytes.d.ts +0 -3
- package/dist/types/utils/ens/packetToBytes.d.ts.map +0 -1
- package/dist/types/utils/errors/getCallError.d.ts +0 -9
- package/dist/types/utils/errors/getCallError.d.ts.map +0 -1
- package/dist/types/utils/errors/getContractError.d.ts +0 -12
- package/dist/types/utils/errors/getContractError.d.ts.map +0 -1
- package/dist/types/utils/errors/getEstimateGasError.d.ts +0 -11
- package/dist/types/utils/errors/getEstimateGasError.d.ts.map +0 -1
- package/dist/types/utils/errors/getNodeError.d.ts +0 -7
- package/dist/types/utils/errors/getNodeError.d.ts.map +0 -1
- package/dist/types/utils/errors/getTransactionError.d.ts +0 -12
- package/dist/types/utils/errors/getTransactionError.d.ts.map +0 -1
- package/dist/types/utils/filters/createFilterRequestScope.d.ts +0 -22
- package/dist/types/utils/filters/createFilterRequestScope.d.ts.map +0 -1
- package/dist/types/utils/formatters/block.d.ts +0 -28
- package/dist/types/utils/formatters/block.d.ts.map +0 -1
- package/dist/types/utils/formatters/extract.d.ts +0 -8
- package/dist/types/utils/formatters/extract.d.ts.map +0 -1
- package/dist/types/utils/formatters/feeHistory.d.ts +0 -4
- package/dist/types/utils/formatters/feeHistory.d.ts.map +0 -1
- package/dist/types/utils/formatters/formatter.d.ts +0 -10
- package/dist/types/utils/formatters/formatter.d.ts.map +0 -1
- package/dist/types/utils/formatters/log.d.ts +0 -7
- package/dist/types/utils/formatters/log.d.ts.map +0 -1
- package/dist/types/utils/formatters/transaction.d.ts +0 -30
- package/dist/types/utils/formatters/transaction.d.ts.map +0 -1
- package/dist/types/utils/formatters/transactionReceipt.d.ts +0 -14
- package/dist/types/utils/formatters/transactionReceipt.d.ts.map +0 -1
- package/dist/types/utils/formatters/transactionRequest.d.ts +0 -14
- package/dist/types/utils/formatters/transactionRequest.d.ts.map +0 -1
- package/dist/types/utils/hash/getEventSelector.d.ts +0 -4
- package/dist/types/utils/hash/getEventSelector.d.ts.map +0 -1
- package/dist/types/utils/hash/getFunctionSelector.d.ts +0 -3
- package/dist/types/utils/hash/getFunctionSelector.d.ts.map +0 -1
- package/dist/types/utils/hash/hashFunction.d.ts +0 -4
- package/dist/types/utils/hash/hashFunction.d.ts.map +0 -1
- package/dist/types/utils/hash/isHash.d.ts +0 -3
- package/dist/types/utils/hash/isHash.d.ts.map +0 -1
- package/dist/types/utils/hash/keccak256.d.ts +0 -6
- package/dist/types/utils/hash/keccak256.d.ts.map +0 -1
- package/dist/types/utils/index.d.ts +0 -82
- package/dist/types/utils/index.d.ts.map +0 -1
- package/dist/types/utils/observe.d.ts +0 -17
- package/dist/types/utils/observe.d.ts.map +0 -1
- package/dist/types/utils/poll.d.ts +0 -13
- package/dist/types/utils/poll.d.ts.map +0 -1
- package/dist/types/utils/promise/createBatchScheduler.d.ts +0 -17
- package/dist/types/utils/promise/createBatchScheduler.d.ts.map +0 -1
- package/dist/types/utils/promise/withCache.d.ts +0 -36
- package/dist/types/utils/promise/withCache.d.ts.map +0 -1
- package/dist/types/utils/promise/withRetry.d.ts +0 -12
- package/dist/types/utils/promise/withRetry.d.ts.map +0 -1
- package/dist/types/utils/promise/withTimeout.d.ts +0 -8
- package/dist/types/utils/promise/withTimeout.d.ts.map +0 -1
- package/dist/types/utils/regex.d.ts +0 -4
- package/dist/types/utils/regex.d.ts.map +0 -1
- package/dist/types/utils/rpc.d.ts +0 -72
- package/dist/types/utils/rpc.d.ts.map +0 -1
- package/dist/types/utils/signature/hashMessage.d.ts +0 -6
- package/dist/types/utils/signature/hashMessage.d.ts.map +0 -1
- package/dist/types/utils/signature/hashTypedData.d.ts +0 -11
- package/dist/types/utils/signature/hashTypedData.d.ts.map +0 -1
- package/dist/types/utils/signature/hexToSignature.d.ts +0 -13
- package/dist/types/utils/signature/hexToSignature.d.ts.map +0 -1
- package/dist/types/utils/signature/recoverAddress.d.ts +0 -9
- package/dist/types/utils/signature/recoverAddress.d.ts.map +0 -1
- package/dist/types/utils/signature/recoverMessageAddress.d.ts +0 -9
- package/dist/types/utils/signature/recoverMessageAddress.d.ts.map +0 -1
- package/dist/types/utils/signature/recoverPublicKey.d.ts +0 -8
- package/dist/types/utils/signature/recoverPublicKey.d.ts.map +0 -1
- package/dist/types/utils/signature/recoverTypedDataAddress.d.ts +0 -13
- package/dist/types/utils/signature/recoverTypedDataAddress.d.ts.map +0 -1
- package/dist/types/utils/signature/signatureToHex.d.ts +0 -17
- package/dist/types/utils/signature/signatureToHex.d.ts.map +0 -1
- package/dist/types/utils/signature/verifyMessage.d.ts +0 -25
- package/dist/types/utils/signature/verifyMessage.d.ts.map +0 -1
- package/dist/types/utils/signature/verifyTypedData.d.ts +0 -28
- package/dist/types/utils/signature/verifyTypedData.d.ts.map +0 -1
- package/dist/types/utils/stringify.d.ts +0 -2
- package/dist/types/utils/stringify.d.ts.map +0 -1
- package/dist/types/utils/transaction/assertRequest.d.ts +0 -5
- package/dist/types/utils/transaction/assertRequest.d.ts.map +0 -1
- package/dist/types/utils/transaction/assertTransaction.d.ts +0 -5
- package/dist/types/utils/transaction/assertTransaction.d.ts.map +0 -1
- package/dist/types/utils/transaction/getSerializedTransactionType.d.ts +0 -4
- package/dist/types/utils/transaction/getSerializedTransactionType.d.ts.map +0 -1
- package/dist/types/utils/transaction/getTransactionType.d.ts +0 -4
- package/dist/types/utils/transaction/getTransactionType.d.ts.map +0 -1
- package/dist/types/utils/transaction/parseTransaction.d.ts +0 -5
- package/dist/types/utils/transaction/parseTransaction.d.ts.map +0 -1
- package/dist/types/utils/transaction/prepareRequest.d.ts +0 -20
- package/dist/types/utils/transaction/prepareRequest.d.ts.map +0 -1
- package/dist/types/utils/transaction/serializeAccessList.d.ts +0 -5
- package/dist/types/utils/transaction/serializeAccessList.d.ts.map +0 -1
- package/dist/types/utils/transaction/serializeTransaction.d.ts +0 -7
- package/dist/types/utils/transaction/serializeTransaction.d.ts.map +0 -1
- package/dist/types/utils/typedData.d.ts +0 -6
- package/dist/types/utils/typedData.d.ts.map +0 -1
- package/dist/types/utils/uid.d.ts +0 -2
- package/dist/types/utils/uid.d.ts.map +0 -1
- package/dist/types/utils/unit/formatEther.d.ts +0 -2
- package/dist/types/utils/unit/formatEther.d.ts.map +0 -1
- package/dist/types/utils/unit/formatGwei.d.ts +0 -2
- package/dist/types/utils/unit/formatGwei.d.ts.map +0 -1
- package/dist/types/utils/unit/formatUnits.d.ts +0 -2
- package/dist/types/utils/unit/formatUnits.d.ts.map +0 -1
- package/dist/types/utils/unit/parseEther.d.ts +0 -2
- package/dist/types/utils/unit/parseEther.d.ts.map +0 -1
- package/dist/types/utils/unit/parseGwei.d.ts +0 -2
- package/dist/types/utils/unit/parseGwei.d.ts.map +0 -1
- package/dist/types/utils/unit/parseUnits.d.ts +0 -2
- package/dist/types/utils/unit/parseUnits.d.ts.map +0 -1
- package/dist/types/utils/wait.d.ts +0 -2
- package/dist/types/utils/wait.d.ts.map +0 -1
- package/dist/types/wallet.d.ts +0 -11
- package/dist/types/wallet.d.ts.map +0 -1
- package/dist/types/window.d.ts +0 -2
- package/dist/types/window.d.ts.map +0 -1
@@ -1,89 +0,0 @@
|
|
1
|
-
import type { Abi, Address, ExtractAbiEvent } from 'abitype';
|
2
|
-
import type { Client } from '../../clients/createClient.js';
|
3
|
-
import type { Transport } from '../../clients/transports/createTransport.js';
|
4
|
-
import type { Chain } from '../../types/chain.js';
|
5
|
-
import type { GetEventArgs, InferEventName } from '../../types/contract.js';
|
6
|
-
import type { Log } from '../../types/log.js';
|
7
|
-
import type { GetTransportConfig } from '../../types/transport.js';
|
8
|
-
type PollOptions = {
|
9
|
-
/**
|
10
|
-
* Whether or not the transaction hashes should be batched on each invocation.
|
11
|
-
* @default true
|
12
|
-
*/
|
13
|
-
batch?: boolean;
|
14
|
-
/**
|
15
|
-
* Polling frequency (in ms). Defaults to Client's pollingInterval config.
|
16
|
-
* @default client.pollingInterval
|
17
|
-
*/
|
18
|
-
pollingInterval?: number;
|
19
|
-
};
|
20
|
-
export type WatchContractEventOnLogsParameter<TAbi extends Abi | readonly unknown[] = readonly unknown[], TEventName extends string = string, TStrict extends boolean | undefined = undefined> = TAbi extends Abi ? Log<bigint, number, false, ExtractAbiEvent<TAbi, TEventName>, TStrict>[] : Log[];
|
21
|
-
export type WatchContractEventOnLogsFn<TAbi extends Abi | readonly unknown[] = readonly unknown[], TEventName extends string = string, TStrict extends boolean | undefined = undefined> = (logs: WatchContractEventOnLogsParameter<TAbi, TEventName, TStrict>) => void;
|
22
|
-
export type WatchContractEventParameters<TAbi extends Abi | readonly unknown[] = readonly unknown[], TEventName extends string = string, TStrict extends boolean | undefined = undefined> = {
|
23
|
-
/** The address of the contract. */
|
24
|
-
address?: Address | Address[];
|
25
|
-
/** Contract ABI. */
|
26
|
-
abi: TAbi;
|
27
|
-
args?: GetEventArgs<TAbi, TEventName>;
|
28
|
-
/** Contract event. */
|
29
|
-
eventName?: InferEventName<TAbi, TEventName>;
|
30
|
-
/** The callback to call when an error occurred when trying to get for a new block. */
|
31
|
-
onError?: (error: Error) => void;
|
32
|
-
/** The callback to call when new event logs are received. */
|
33
|
-
onLogs: WatchContractEventOnLogsFn<TAbi, TEventName, TStrict>;
|
34
|
-
/**
|
35
|
-
* Whether or not the logs must match the indexed/non-indexed arguments on `event`.
|
36
|
-
* @default false
|
37
|
-
*/
|
38
|
-
strict?: TStrict;
|
39
|
-
} & (GetTransportConfig<Transport>['type'] extends 'webSocket' ? {
|
40
|
-
batch?: never;
|
41
|
-
/**
|
42
|
-
* Whether or not the WebSocket Transport should poll the JSON-RPC, rather than using `eth_subscribe`.
|
43
|
-
* @default false
|
44
|
-
*/
|
45
|
-
poll?: false;
|
46
|
-
pollingInterval?: never;
|
47
|
-
} | (PollOptions & {
|
48
|
-
/**
|
49
|
-
* Whether or not the WebSocket Transport should poll the JSON-RPC, rather than using `eth_subscribe`.
|
50
|
-
* @default true
|
51
|
-
*/
|
52
|
-
poll?: true;
|
53
|
-
}) : PollOptions & {
|
54
|
-
poll?: true;
|
55
|
-
});
|
56
|
-
export type WatchContractEventReturnType = () => void;
|
57
|
-
/**
|
58
|
-
* Watches and returns emitted contract event logs.
|
59
|
-
*
|
60
|
-
* - Docs: https://viem.sh/docs/contract/watchContractEvent.html
|
61
|
-
*
|
62
|
-
* This Action will batch up all the event logs found within the [`pollingInterval`](https://viem.sh/docs/contract/watchContractEvent.html#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/contract/watchContractEvent.html#onLogs).
|
63
|
-
*
|
64
|
-
* `watchContractEvent` will attempt to create an [Event Filter](https://viem.sh/docs/contract/createContractEventFilter.html) and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. `eth_newFilter`), then `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead.
|
65
|
-
*
|
66
|
-
* @param client - Client to use
|
67
|
-
* @param parameters - {@link WatchContractEventParameters}
|
68
|
-
* @returns A function that can be invoked to stop watching for new event logs. {@link WatchContractEventReturnType}
|
69
|
-
*
|
70
|
-
* @example
|
71
|
-
* import { createPublicClient, http, parseAbi } from 'viem'
|
72
|
-
* import { mainnet } from 'viem/chains'
|
73
|
-
* import { watchContractEvent } from 'viem/contract'
|
74
|
-
*
|
75
|
-
* const client = createPublicClient({
|
76
|
-
* chain: mainnet,
|
77
|
-
* transport: http(),
|
78
|
-
* })
|
79
|
-
* const unwatch = watchContractEvent(client, {
|
80
|
-
* address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
|
81
|
-
* abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']),
|
82
|
-
* eventName: 'Transfer',
|
83
|
-
* args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' },
|
84
|
-
* onLogs: (logs) => console.log(logs),
|
85
|
-
* })
|
86
|
-
*/
|
87
|
-
export declare function watchContractEvent<TChain extends Chain | undefined, const TAbi extends Abi | readonly unknown[], TEventName extends string, TStrict extends boolean | undefined = undefined>(client: Client<Transport, TChain>, { abi, address, args, batch, eventName, onError, onLogs, poll: poll_, pollingInterval, strict: strict_, }: WatchContractEventParameters<TAbi, TEventName, TStrict>): WatchContractEventReturnType;
|
88
|
-
export {};
|
89
|
-
//# sourceMappingURL=watchContractEvent.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"watchContractEvent.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/watchContractEvent.ts"],"names":[],"mappings":"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"}
|
@@ -1,104 +0,0 @@
|
|
1
|
-
import type { AbiEvent, Address } from 'abitype';
|
2
|
-
import type { Client } from '../../clients/createClient.js';
|
3
|
-
import type { Transport } from '../../clients/transports/createTransport.js';
|
4
|
-
import type { Chain } from '../../types/chain.js';
|
5
|
-
import type { MaybeAbiEventName, MaybeExtractEventArgsFromAbi } from '../../types/contract.js';
|
6
|
-
import type { Log } from '../../types/log.js';
|
7
|
-
import type { GetTransportConfig } from '../../types/transport.js';
|
8
|
-
type PollOptions = {
|
9
|
-
/**
|
10
|
-
* Whether or not the transaction hashes should be batched on each invocation.
|
11
|
-
* @default true
|
12
|
-
*/
|
13
|
-
batch?: boolean;
|
14
|
-
/**
|
15
|
-
* Polling frequency (in ms). Defaults to Client's pollingInterval config.
|
16
|
-
* @default client.pollingInterval
|
17
|
-
*/
|
18
|
-
pollingInterval?: number;
|
19
|
-
};
|
20
|
-
export type WatchEventOnLogsParameter<TAbiEvent extends AbiEvent | undefined = undefined, TAbiEvents extends readonly AbiEvent[] | readonly unknown[] | undefined = TAbiEvent extends AbiEvent ? [TAbiEvent] : undefined, TStrict extends boolean | undefined = undefined, TEventName extends string | undefined = MaybeAbiEventName<TAbiEvent>> = Log<bigint, number, false, TAbiEvent, TStrict, TAbiEvents, TEventName>[];
|
21
|
-
export type WatchEventOnLogsFn<TAbiEvent extends AbiEvent | undefined = undefined, TAbiEvents extends readonly AbiEvent[] | readonly unknown[] | undefined = TAbiEvent extends AbiEvent ? [TAbiEvent] : undefined, TStrict extends boolean | undefined = undefined, _EventName extends string | undefined = MaybeAbiEventName<TAbiEvent>> = (logs: WatchEventOnLogsParameter<TAbiEvent, TAbiEvents, TStrict, _EventName>) => void;
|
22
|
-
export type WatchEventParameters<TAbiEvent extends AbiEvent | undefined = undefined, TAbiEvents extends readonly AbiEvent[] | readonly unknown[] | undefined = TAbiEvent extends AbiEvent ? [TAbiEvent] : undefined, TStrict extends boolean | undefined = undefined, _EventName extends string | undefined = MaybeAbiEventName<TAbiEvent>> = {
|
23
|
-
/** The address of the contract. */
|
24
|
-
address?: Address | Address[];
|
25
|
-
/** The callback to call when an error occurred when trying to get for a new block. */
|
26
|
-
onError?: (error: Error) => void;
|
27
|
-
/** The callback to call when new event logs are received. */
|
28
|
-
onLogs: WatchEventOnLogsFn<TAbiEvent, TAbiEvents, TStrict, _EventName>;
|
29
|
-
} & (GetTransportConfig<Transport>['type'] extends 'webSocket' ? {
|
30
|
-
batch?: never;
|
31
|
-
/**
|
32
|
-
* Whether or not the WebSocket Transport should poll the JSON-RPC, rather than using `eth_subscribe`.
|
33
|
-
* @default false
|
34
|
-
*/
|
35
|
-
poll?: false;
|
36
|
-
pollingInterval?: never;
|
37
|
-
} | (PollOptions & {
|
38
|
-
/**
|
39
|
-
* Whether or not the WebSocket Transport should poll the JSON-RPC, rather than using `eth_subscribe`.
|
40
|
-
* @default true
|
41
|
-
*/
|
42
|
-
poll?: true;
|
43
|
-
}) : PollOptions & {
|
44
|
-
poll?: true;
|
45
|
-
}) & ({
|
46
|
-
event: TAbiEvent;
|
47
|
-
events?: never;
|
48
|
-
args?: MaybeExtractEventArgsFromAbi<TAbiEvents, _EventName>;
|
49
|
-
/**
|
50
|
-
* Whether or not the logs must match the indexed/non-indexed arguments on `event`.
|
51
|
-
* @default false
|
52
|
-
*/
|
53
|
-
strict?: TStrict;
|
54
|
-
} | {
|
55
|
-
event?: never;
|
56
|
-
events?: TAbiEvents;
|
57
|
-
args?: never;
|
58
|
-
/**
|
59
|
-
* Whether or not the logs must match the indexed/non-indexed arguments on `event`.
|
60
|
-
* @default false
|
61
|
-
*/
|
62
|
-
strict?: TStrict;
|
63
|
-
} | {
|
64
|
-
event?: never;
|
65
|
-
events?: never;
|
66
|
-
args?: never;
|
67
|
-
strict?: never;
|
68
|
-
});
|
69
|
-
export type WatchEventReturnType = () => void;
|
70
|
-
/**
|
71
|
-
* Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms.html#event-log).
|
72
|
-
*
|
73
|
-
* - Docs: https://viem.sh/docs/actions/public/watchEvent.html
|
74
|
-
* - JSON-RPC Methods:
|
75
|
-
* - **RPC Provider supports `eth_newFilter`:**
|
76
|
-
* - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize).
|
77
|
-
* - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges).
|
78
|
-
* - **RPC Provider does not support `eth_newFilter`:**
|
79
|
-
* - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval.
|
80
|
-
*
|
81
|
-
* This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent.html#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent.html#onLogs).
|
82
|
-
*
|
83
|
-
* `watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter.html) and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. `eth_newFilter`), then `watchEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs.html) instead.
|
84
|
-
*
|
85
|
-
* @param client - Client to use
|
86
|
-
* @param parameters - {@link WatchEventParameters}
|
87
|
-
* @returns A function that can be invoked to stop watching for new Event Logs. {@link WatchEventReturnType}
|
88
|
-
*
|
89
|
-
* @example
|
90
|
-
* import { createPublicClient, http } from 'viem'
|
91
|
-
* import { mainnet } from 'viem/chains'
|
92
|
-
* import { watchEvent } from 'viem/public'
|
93
|
-
*
|
94
|
-
* const client = createPublicClient({
|
95
|
-
* chain: mainnet,
|
96
|
-
* transport: http(),
|
97
|
-
* })
|
98
|
-
* const unwatch = watchEvent(client, {
|
99
|
-
* onLogs: (logs) => console.log(logs),
|
100
|
-
* })
|
101
|
-
*/
|
102
|
-
export declare function watchEvent<TChain extends Chain | undefined, const TAbiEvent extends AbiEvent | undefined = undefined, const TAbiEvents extends readonly AbiEvent[] | readonly unknown[] | undefined = TAbiEvent extends AbiEvent ? [TAbiEvent] : undefined, TStrict extends boolean | undefined = undefined, _EventName extends string | undefined = undefined>(client: Client<Transport, TChain>, { address, args, batch, event, events, onError, onLogs, poll: poll_, pollingInterval, strict: strict_, }: WatchEventParameters<TAbiEvent, TAbiEvents, TStrict>): WatchEventReturnType;
|
103
|
-
export {};
|
104
|
-
//# sourceMappingURL=watchEvent.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"watchEvent.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/watchEvent.ts"],"names":[],"mappings":"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"}
|
@@ -1,74 +0,0 @@
|
|
1
|
-
import type { Client } from '../../clients/createClient.js';
|
2
|
-
import type { Transport } from '../../clients/transports/createTransport.js';
|
3
|
-
import type { Chain } from '../../types/chain.js';
|
4
|
-
import type { Hash } from '../../types/misc.js';
|
5
|
-
import type { GetTransportConfig } from '../../types/transport.js';
|
6
|
-
export type OnTransactionsParameter = Hash[];
|
7
|
-
export type OnTransactionsFn = (transactions: OnTransactionsParameter) => void;
|
8
|
-
type PollOptions = {
|
9
|
-
/**
|
10
|
-
* Whether or not the transaction hashes should be batched on each invocation.
|
11
|
-
* @default true
|
12
|
-
*/
|
13
|
-
batch?: boolean;
|
14
|
-
/**
|
15
|
-
* Polling frequency (in ms). Defaults to Client's pollingInterval config.
|
16
|
-
* @default client.pollingInterval
|
17
|
-
*/
|
18
|
-
pollingInterval?: number;
|
19
|
-
};
|
20
|
-
export type WatchPendingTransactionsParameters<TTransport extends Transport = Transport> = {
|
21
|
-
/** The callback to call when an error occurred when trying to get for a new block. */
|
22
|
-
onError?: (error: Error) => void;
|
23
|
-
/** The callback to call when new transactions are received. */
|
24
|
-
onTransactions: OnTransactionsFn;
|
25
|
-
} & (GetTransportConfig<TTransport>['type'] extends 'webSocket' ? {
|
26
|
-
batch?: never;
|
27
|
-
/**
|
28
|
-
* Whether or not the WebSocket Transport should poll the JSON-RPC, rather than using `eth_subscribe`.
|
29
|
-
* @default false
|
30
|
-
*/
|
31
|
-
poll?: false;
|
32
|
-
pollingInterval?: never;
|
33
|
-
} | (PollOptions & {
|
34
|
-
/**
|
35
|
-
* Whether or not the WebSocket Transport should poll the JSON-RPC, rather than using `eth_subscribe`.
|
36
|
-
* @default true
|
37
|
-
*/
|
38
|
-
poll?: true;
|
39
|
-
}) : PollOptions & {
|
40
|
-
poll?: true;
|
41
|
-
});
|
42
|
-
export type WatchPendingTransactionsReturnType = () => void;
|
43
|
-
/**
|
44
|
-
* Watches and returns pending transaction hashes.
|
45
|
-
*
|
46
|
-
* - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions.html
|
47
|
-
* - JSON-RPC Methods:
|
48
|
-
* - When `poll: true`
|
49
|
-
* - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter.
|
50
|
-
* - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval.
|
51
|
-
* - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event.
|
52
|
-
*
|
53
|
-
* This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions.html#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions.html#ontransactions).
|
54
|
-
*
|
55
|
-
* @param client - Client to use
|
56
|
-
* @param parameters - {@link WatchPendingTransactionsParameters}
|
57
|
-
* @returns A function that can be invoked to stop watching for new pending transaction hashes. {@link WatchPendingTransactionsReturnType}
|
58
|
-
*
|
59
|
-
* @example
|
60
|
-
* import { createPublicClient, http } from 'viem'
|
61
|
-
* import { mainnet } from 'viem/chains'
|
62
|
-
* import { watchPendingTransactions } from 'viem/public'
|
63
|
-
*
|
64
|
-
* const client = createPublicClient({
|
65
|
-
* chain: mainnet,
|
66
|
-
* transport: http(),
|
67
|
-
* })
|
68
|
-
* const unwatch = await watchPendingTransactions(client, {
|
69
|
-
* onTransactions: (hashes) => console.log(hashes),
|
70
|
-
* })
|
71
|
-
*/
|
72
|
-
export declare function watchPendingTransactions<TTransport extends Transport, TChain extends Chain | undefined>(client: Client<TTransport, TChain>, { batch, onError, onTransactions, poll: poll_, pollingInterval, }: WatchPendingTransactionsParameters<TTransport>): () => void;
|
73
|
-
export {};
|
74
|
-
//# sourceMappingURL=watchPendingTransactions.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"watchPendingTransactions.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/watchPendingTransactions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AAC5E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAEjD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AASlE,MAAM,MAAM,uBAAuB,GAAG,IAAI,EAAE,CAAA;AAC5C,MAAM,MAAM,gBAAgB,GAAG,CAAC,YAAY,EAAE,uBAAuB,KAAK,IAAI,CAAA;AAE9E,KAAK,WAAW,GAAG;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IACf;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,kCAAkC,CAC5C,UAAU,SAAS,SAAS,GAAG,SAAS,IACtC;IACF,sFAAsF;IACtF,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IAChC,+DAA+D;IAC/D,cAAc,EAAE,gBAAgB,CAAA;CACjC,GAAG,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,SAAS,WAAW,GAEvD;IACE,KAAK,CAAC,EAAE,KAAK,CAAA;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,CAAA;IACZ,eAAe,CAAC,EAAE,KAAK,CAAA;CACxB,GACD,CAAC,WAAW,GAAG;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,CAAA;CACZ,CAAC,GACN,WAAW,GAAG;IACZ,IAAI,CAAC,EAAE,IAAI,CAAA;CACZ,CAAC,CAAA;AAEN,MAAM,MAAM,kCAAkC,GAAG,MAAM,IAAI,CAAA;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,wBAAwB,CACtC,UAAU,SAAS,SAAS,EAC5B,MAAM,SAAS,KAAK,GAAG,SAAS,EAEhC,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,EAClC,EACE,KAAY,EACZ,OAAO,EACP,cAAc,EACd,IAAI,EAAE,KAAK,EACX,eAAwC,GACzC,EAAE,kCAAkC,CAAC,UAAU,CAAC,cA6ElD"}
|
@@ -1,33 +0,0 @@
|
|
1
|
-
import type { TestClient, TestClientMode } from '../../clients/createTestClient.js';
|
2
|
-
import type { Transport } from '../../clients/transports/createTransport.js';
|
3
|
-
import type { Account } from '../../types/account.js';
|
4
|
-
import type { Chain } from '../../types/chain.js';
|
5
|
-
import type { Hash } from '../../types/misc.js';
|
6
|
-
export type DropTransactionParameters = {
|
7
|
-
/** The hash of the transaction to drop. */
|
8
|
-
hash: Hash;
|
9
|
-
};
|
10
|
-
/**
|
11
|
-
* Removes a transaction from the mempool.
|
12
|
-
*
|
13
|
-
* - Docs: https://viem.sh/docs/actions/test/dropTransaction.html
|
14
|
-
*
|
15
|
-
* @param client - Client to use
|
16
|
-
* @param parameters - {@link DropTransactionParameters}
|
17
|
-
*
|
18
|
-
* @example
|
19
|
-
* import { createTestClient, http } from 'viem'
|
20
|
-
* import { foundry } from 'viem/chains'
|
21
|
-
* import { dropTransaction } from 'viem/test'
|
22
|
-
*
|
23
|
-
* const client = createTestClient({
|
24
|
-
* mode: 'anvil',
|
25
|
-
* chain: 'foundry',
|
26
|
-
* transport: http(),
|
27
|
-
* })
|
28
|
-
* await dropTransaction(client, {
|
29
|
-
* hash: '0xe58dceb6b20b03965bb678e27d141e151d7d4efc2334c2d6a49b9fac523f7364'
|
30
|
-
* })
|
31
|
-
*/
|
32
|
-
export declare function dropTransaction<TChain extends Chain | undefined, TAccount extends Account | undefined>(client: TestClient<TestClientMode, Transport, TChain, TAccount, false>, { hash }: DropTransactionParameters): Promise<void>;
|
33
|
-
//# sourceMappingURL=dropTransaction.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"dropTransaction.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/dropTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACf,MAAM,mCAAmC,CAAA;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AAC5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAE/C,MAAM,MAAM,yBAAyB,GAAG;IACtC,2CAA2C;IAC3C,IAAI,EAAE,IAAI,CAAA;CACX,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,eAAe,CACnC,MAAM,SAAS,KAAK,GAAG,SAAS,EAChC,QAAQ,SAAS,OAAO,GAAG,SAAS,EAEpC,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,EACtE,EAAE,IAAI,EAAE,EAAE,yBAAyB,iBAMpC"}
|
@@ -1,27 +0,0 @@
|
|
1
|
-
import type { TestClient, TestClientMode } from '../../clients/createTestClient.js';
|
2
|
-
import type { Transport } from '../../clients/transports/createTransport.js';
|
3
|
-
import type { Account } from '../../types/account.js';
|
4
|
-
import type { Chain } from '../../types/chain.js';
|
5
|
-
export type GetAutomineReturnType = boolean;
|
6
|
-
/**
|
7
|
-
* Returns the automatic mining status of the node.
|
8
|
-
*
|
9
|
-
* - Docs: https://viem.sh/docs/actions/test/getAutomine.html
|
10
|
-
*
|
11
|
-
* @param client - Client to use
|
12
|
-
* @returns Whether or not the node is auto mining. {@link GetAutomineReturnType}
|
13
|
-
*
|
14
|
-
* @example
|
15
|
-
* import { createTestClient, http } from 'viem'
|
16
|
-
* import { foundry } from 'viem/chains'
|
17
|
-
* import { getAutomine } from 'viem/test'
|
18
|
-
*
|
19
|
-
* const client = createTestClient({
|
20
|
-
* mode: 'anvil',
|
21
|
-
* chain: 'foundry',
|
22
|
-
* transport: http(),
|
23
|
-
* })
|
24
|
-
* const isAutomining = await getAutomine(client)
|
25
|
-
*/
|
26
|
-
export declare function getAutomine<TChain extends Chain | undefined, TAccount extends Account | undefined>(client: TestClient<TestClientMode, Transport, TChain, TAccount, false>): Promise<GetAutomineReturnType>;
|
27
|
-
//# sourceMappingURL=getAutomine.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"getAutomine.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/getAutomine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACf,MAAM,mCAAmC,CAAA;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AAC5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAEjD,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAA;AAE3C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,WAAW,CAC/B,MAAM,SAAS,KAAK,GAAG,SAAS,EAChC,QAAQ,SAAS,OAAO,GAAG,SAAS,EAEpC,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,GACrE,OAAO,CAAC,qBAAqB,CAAC,CAQhC"}
|
@@ -1,34 +0,0 @@
|
|
1
|
-
import type { Address } from 'abitype';
|
2
|
-
import type { TestClient, TestClientMode } from '../../clients/createTestClient.js';
|
3
|
-
import type { Transport } from '../../clients/transports/createTransport.js';
|
4
|
-
import type { Account } from '../../types/account.js';
|
5
|
-
import type { Chain } from '../../types/chain.js';
|
6
|
-
import type { RpcTransaction } from '../../types/rpc.js';
|
7
|
-
export type GetTxpoolContentReturnType = {
|
8
|
-
/** Pending transactions in the pool */
|
9
|
-
pending: Record<Address, Record<string, RpcTransaction>>;
|
10
|
-
/** Queued transactions in the pool */
|
11
|
-
queued: Record<Address, Record<string, RpcTransaction>>;
|
12
|
-
};
|
13
|
-
/**
|
14
|
-
* Returns the details of all transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only.
|
15
|
-
*
|
16
|
-
* - Docs: https://viem.sh/docs/actions/test/getTxpoolContent.html
|
17
|
-
*
|
18
|
-
* @param client - Client to use
|
19
|
-
* @returns Transaction pool content. {@link GetTxpoolContentReturnType}
|
20
|
-
*
|
21
|
-
* @example
|
22
|
-
* import { createTestClient, http } from 'viem'
|
23
|
-
* import { foundry } from 'viem/chains'
|
24
|
-
* import { getTxpoolContent } from 'viem/test'
|
25
|
-
*
|
26
|
-
* const client = createTestClient({
|
27
|
-
* mode: 'anvil',
|
28
|
-
* chain: 'foundry',
|
29
|
-
* transport: http(),
|
30
|
-
* })
|
31
|
-
* const content = await getTxpoolContent(client)
|
32
|
-
*/
|
33
|
-
export declare function getTxpoolContent<TChain extends Chain | undefined, TAccount extends Account | undefined>(client: TestClient<TestClientMode, Transport, TChain, TAccount, false>): Promise<GetTxpoolContentReturnType>;
|
34
|
-
//# sourceMappingURL=getTxpoolContent.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"getTxpoolContent.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/getTxpoolContent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEtC,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACf,MAAM,mCAAmC,CAAA;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AAC5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAExD,MAAM,MAAM,0BAA0B,GAAG;IACvC,uCAAuC;IACvC,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAA;IACxD,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAA;CACxD,CAAA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,SAAS,KAAK,GAAG,SAAS,EAChC,QAAQ,SAAS,OAAO,GAAG,SAAS,EAEpC,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,GACrE,OAAO,CAAC,0BAA0B,CAAC,CAIrC"}
|
@@ -1,30 +0,0 @@
|
|
1
|
-
import type { TestClient, TestClientMode } from '../../clients/createTestClient.js';
|
2
|
-
import type { Transport } from '../../clients/transports/createTransport.js';
|
3
|
-
import type { Account } from '../../types/account.js';
|
4
|
-
import type { Chain } from '../../types/chain.js';
|
5
|
-
export type GetTxpoolStatusReturnType = {
|
6
|
-
pending: number;
|
7
|
-
queued: number;
|
8
|
-
};
|
9
|
-
/**
|
10
|
-
* Returns a summary of all the transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only.
|
11
|
-
*
|
12
|
-
* - Docs: https://viem.sh/docs/actions/test/getTxpoolStatus.html
|
13
|
-
*
|
14
|
-
* @param client - Client to use
|
15
|
-
* @returns Transaction pool status. {@link GetTxpoolStatusReturnType}
|
16
|
-
*
|
17
|
-
* @example
|
18
|
-
* import { createTestClient, http } from 'viem'
|
19
|
-
* import { foundry } from 'viem/chains'
|
20
|
-
* import { getTxpoolStatus } from 'viem/test'
|
21
|
-
*
|
22
|
-
* const client = createTestClient({
|
23
|
-
* mode: 'anvil',
|
24
|
-
* chain: 'foundry',
|
25
|
-
* transport: http(),
|
26
|
-
* })
|
27
|
-
* const status = await getTxpoolStatus(client)
|
28
|
-
*/
|
29
|
-
export declare function getTxpoolStatus<TChain extends Chain | undefined, TAccount extends Account | undefined>(client: TestClient<TestClientMode, Transport, TChain, TAccount, false>): Promise<GetTxpoolStatusReturnType>;
|
30
|
-
//# sourceMappingURL=getTxpoolStatus.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"getTxpoolStatus.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/getTxpoolStatus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACf,MAAM,mCAAmC,CAAA;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AAC5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAGjD,MAAM,MAAM,yBAAyB,GAAG;IACtC,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,eAAe,CACnC,MAAM,SAAS,KAAK,GAAG,SAAS,EAChC,QAAQ,SAAS,OAAO,GAAG,SAAS,EAEpC,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,GACrE,OAAO,CAAC,yBAAyB,CAAC,CAQpC"}
|
@@ -1,33 +0,0 @@
|
|
1
|
-
import type { Address } from 'abitype';
|
2
|
-
import type { TestClient, TestClientMode } from '../../clients/createTestClient.js';
|
3
|
-
import type { Transport } from '../../clients/transports/createTransport.js';
|
4
|
-
import type { Account } from '../../types/account.js';
|
5
|
-
import type { Chain } from '../../types/chain.js';
|
6
|
-
export type ImpersonateAccountParameters = {
|
7
|
-
/** The account to impersonate. */
|
8
|
-
address: Address;
|
9
|
-
};
|
10
|
-
/**
|
11
|
-
* Impersonate an account or contract address. This lets you send transactions from that account even if you don't have access to its private key.
|
12
|
-
*
|
13
|
-
* - Docs: https://viem.sh/docs/actions/test/impersonateAccount.html
|
14
|
-
*
|
15
|
-
* @param client - Client to use
|
16
|
-
* @param parameters - {@link ImpersonateAccountParameters}
|
17
|
-
*
|
18
|
-
* @example
|
19
|
-
* import { createTestClient, http } from 'viem'
|
20
|
-
* import { foundry } from 'viem/chains'
|
21
|
-
* import { impersonateAccount } from 'viem/test'
|
22
|
-
*
|
23
|
-
* const client = createTestClient({
|
24
|
-
* mode: 'anvil',
|
25
|
-
* chain: 'foundry',
|
26
|
-
* transport: http(),
|
27
|
-
* })
|
28
|
-
* const content = await impersonateAccount(client, {
|
29
|
-
* address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
|
30
|
-
* })
|
31
|
-
*/
|
32
|
-
export declare function impersonateAccount<TChain extends Chain | undefined, TAccount extends Account | undefined>(client: TestClient<TestClientMode, Transport, TChain, TAccount, false>, { address }: ImpersonateAccountParameters): Promise<void>;
|
33
|
-
//# sourceMappingURL=impersonateAccount.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"impersonateAccount.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/impersonateAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEtC,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACf,MAAM,mCAAmC,CAAA;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AAC5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAEjD,MAAM,MAAM,4BAA4B,GAAG;IACzC,kCAAkC;IAClC,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,SAAS,KAAK,GAAG,SAAS,EAChC,QAAQ,SAAS,OAAO,GAAG,SAAS,EAEpC,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,EACtE,EAAE,OAAO,EAAE,EAAE,4BAA4B,iBAM1C"}
|
@@ -1,32 +0,0 @@
|
|
1
|
-
import type { TestClient, TestClientMode } from '../../clients/createTestClient.js';
|
2
|
-
import type { Transport } from '../../clients/transports/createTransport.js';
|
3
|
-
import type { Account } from '../../types/account.js';
|
4
|
-
import type { Chain } from '../../types/chain.js';
|
5
|
-
export type IncreaseTimeParameters = {
|
6
|
-
/** The amount of seconds to jump forward in time. */
|
7
|
-
seconds: number;
|
8
|
-
};
|
9
|
-
/**
|
10
|
-
* Jump forward in time by the given amount of time, in seconds.
|
11
|
-
*
|
12
|
-
* - Docs: https://viem.sh/docs/actions/test/increaseTime.html
|
13
|
-
*
|
14
|
-
* @param client - Client to use
|
15
|
-
* @param parameters – {@link IncreaseTimeParameters}
|
16
|
-
*
|
17
|
-
* @example
|
18
|
-
* import { createTestClient, http } from 'viem'
|
19
|
-
* import { foundry } from 'viem/chains'
|
20
|
-
* import { increaseTime } from 'viem/test'
|
21
|
-
*
|
22
|
-
* const client = createTestClient({
|
23
|
-
* mode: 'anvil',
|
24
|
-
* chain: 'foundry',
|
25
|
-
* transport: http(),
|
26
|
-
* })
|
27
|
-
* await increaseTime(client, {
|
28
|
-
* seconds: 420,
|
29
|
-
* })
|
30
|
-
*/
|
31
|
-
export declare function increaseTime<TChain extends Chain | undefined, TAccount extends Account | undefined>(client: TestClient<TestClientMode, Transport, TChain, TAccount, false>, { seconds }: IncreaseTimeParameters): Promise<`0x${string}`>;
|
32
|
-
//# sourceMappingURL=increaseTime.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"increaseTime.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/increaseTime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACf,MAAM,mCAAmC,CAAA;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AAC5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAGjD,MAAM,MAAM,sBAAsB,GAAG;IACnC,qDAAqD;IACrD,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,YAAY,CAChC,MAAM,SAAS,KAAK,GAAG,SAAS,EAChC,QAAQ,SAAS,OAAO,GAAG,SAAS,EAEpC,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,EACtE,EAAE,OAAO,EAAE,EAAE,sBAAsB,0BAMpC"}
|
@@ -1,31 +0,0 @@
|
|
1
|
-
import type { Address } from 'abitype';
|
2
|
-
import type { TestClient, TestClientMode } from '../../clients/createTestClient.js';
|
3
|
-
import type { Transport } from '../../clients/transports/createTransport.js';
|
4
|
-
import type { Account } from '../../types/account.js';
|
5
|
-
import type { Chain } from '../../types/chain.js';
|
6
|
-
export type InspectTxpoolReturnType = {
|
7
|
-
pending: Record<Address, Record<string, string>>;
|
8
|
-
queued: Record<Address, Record<string, string>>;
|
9
|
-
};
|
10
|
-
/**
|
11
|
-
* Returns a summary of all the transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only.
|
12
|
-
*
|
13
|
-
* - Docs: https://viem.sh/docs/actions/test/inspectTxpool.html
|
14
|
-
*
|
15
|
-
* @param client - Client to use
|
16
|
-
* @returns Transaction pool inspection data. {@link InspectTxpoolReturnType}
|
17
|
-
*
|
18
|
-
* @example
|
19
|
-
* import { createTestClient, http } from 'viem'
|
20
|
-
* import { foundry } from 'viem/chains'
|
21
|
-
* import { inspectTxpool } from 'viem/test'
|
22
|
-
*
|
23
|
-
* const client = createTestClient({
|
24
|
-
* mode: 'anvil',
|
25
|
-
* chain: 'foundry',
|
26
|
-
* transport: http(),
|
27
|
-
* })
|
28
|
-
* const data = await inspectTxpool(client)
|
29
|
-
*/
|
30
|
-
export declare function inspectTxpool<TChain extends Chain | undefined, TAccount extends Account | undefined>(client: TestClient<TestClientMode, Transport, TChain, TAccount, false>): Promise<InspectTxpoolReturnType>;
|
31
|
-
//# sourceMappingURL=inspectTxpool.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"inspectTxpool.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/inspectTxpool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEtC,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACf,MAAM,mCAAmC,CAAA;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AAC5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAEjD,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAChD,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;CAChD,CAAA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,aAAa,CACjC,MAAM,SAAS,KAAK,GAAG,SAAS,EAChC,QAAQ,SAAS,OAAO,GAAG,SAAS,EAEpC,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,GACrE,OAAO,CAAC,uBAAuB,CAAC,CAIlC"}
|
@@ -1,32 +0,0 @@
|
|
1
|
-
import type { TestClient, TestClientMode } from '../../clients/createTestClient.js';
|
2
|
-
import type { Transport } from '../../clients/transports/createTransport.js';
|
3
|
-
import type { Account } from '../../types/account.js';
|
4
|
-
import type { Chain } from '../../types/chain.js';
|
5
|
-
export type MineParameters = {
|
6
|
-
/** Number of blocks to mine. */
|
7
|
-
blocks: number;
|
8
|
-
/** Interval between each block in seconds. */
|
9
|
-
interval?: number;
|
10
|
-
};
|
11
|
-
/**
|
12
|
-
* Mine a specified number of blocks.
|
13
|
-
*
|
14
|
-
* - Docs: https://viem.sh/docs/actions/test/mine.html
|
15
|
-
*
|
16
|
-
* @param client - Client to use
|
17
|
-
* @param parameters – {@link MineParameters}
|
18
|
-
*
|
19
|
-
* @example
|
20
|
-
* import { createTestClient, http } from 'viem'
|
21
|
-
* import { foundry } from 'viem/chains'
|
22
|
-
* import { mine } from 'viem/test'
|
23
|
-
*
|
24
|
-
* const client = createTestClient({
|
25
|
-
* mode: 'anvil',
|
26
|
-
* chain: 'foundry',
|
27
|
-
* transport: http(),
|
28
|
-
* })
|
29
|
-
* await mine(client, { blocks: 1 })
|
30
|
-
*/
|
31
|
-
export declare function mine<TChain extends Chain | undefined, TAccount extends Account | undefined>(client: TestClient<TestClientMode, Transport, TChain, TAccount, false>, { blocks, interval }: MineParameters): Promise<void>;
|
32
|
-
//# sourceMappingURL=mine.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"mine.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/mine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACf,MAAM,mCAAmC,CAAA;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AAC5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAGjD,MAAM,MAAM,cAAc,GAAG;IAC3B,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAA;IACd,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,IAAI,CACxB,MAAM,SAAS,KAAK,GAAG,SAAS,EAChC,QAAQ,SAAS,OAAO,GAAG,SAAS,EAEpC,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,EACtE,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,cAAc,iBAYrC"}
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import type { TestClient, TestClientMode } from '../../clients/createTestClient.js';
|
2
|
-
import type { Transport } from '../../clients/transports/createTransport.js';
|
3
|
-
import type { Account } from '../../types/account.js';
|
4
|
-
import type { Chain } from '../../types/chain.js';
|
5
|
-
/**
|
6
|
-
* Removes [`setBlockTimestampInterval`](https://viem.sh/docs/actions/test/setBlockTimestampInterval.html) if it exists.
|
7
|
-
*
|
8
|
-
* - Docs: https://viem.sh/docs/actions/test/removeBlockTimestampInterval.html
|
9
|
-
*
|
10
|
-
* @param client - Client to use
|
11
|
-
*
|
12
|
-
* @example
|
13
|
-
* import { createTestClient, http } from 'viem'
|
14
|
-
* import { foundry } from 'viem/chains'
|
15
|
-
* import { removeBlockTimestampInterval } from 'viem/test'
|
16
|
-
*
|
17
|
-
* const client = createTestClient({
|
18
|
-
* mode: 'anvil',
|
19
|
-
* chain: 'foundry',
|
20
|
-
* transport: http(),
|
21
|
-
* })
|
22
|
-
* await removeBlockTimestampInterval(client)
|
23
|
-
*/
|
24
|
-
export declare function removeBlockTimestampInterval<TChain extends Chain | undefined, TAccount extends Account | undefined>(client: TestClient<TestClientMode, Transport, TChain, TAccount, false>): Promise<void>;
|
25
|
-
//# sourceMappingURL=removeBlockTimestampInterval.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"removeBlockTimestampInterval.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/removeBlockTimestampInterval.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACf,MAAM,mCAAmC,CAAA;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AAC5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAEjD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,4BAA4B,CAChD,MAAM,SAAS,KAAK,GAAG,SAAS,EAChC,QAAQ,SAAS,OAAO,GAAG,SAAS,EACpC,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,iBAIvE"}
|