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,56 +0,0 @@
|
|
1
|
-
import type { Address } from 'abitype';
|
2
|
-
import type { Account } from '../../accounts/types.js';
|
3
|
-
import type { Client } from '../../clients/createClient.js';
|
4
|
-
import type { Transport } from '../../clients/transports/createTransport.js';
|
5
|
-
import type { BlockTag } from '../../types/block.js';
|
6
|
-
import type { Chain } from '../../types/chain.js';
|
7
|
-
import type { Hex } from '../../types/misc.js';
|
8
|
-
import type { UnionOmit } from '../../types/utils.js';
|
9
|
-
import { type FormattedTransactionRequest } from '../../utils/formatters/transactionRequest.js';
|
10
|
-
export type FormattedCall<TChain extends Chain | undefined = Chain | undefined> = FormattedTransactionRequest<TChain>;
|
11
|
-
export type CallParameters<TChain extends Chain | undefined = Chain | undefined> = UnionOmit<FormattedCall<TChain>, 'from'> & {
|
12
|
-
account?: Account | Address;
|
13
|
-
batch?: boolean;
|
14
|
-
} & ({
|
15
|
-
/** The balance of the account at a block number. */
|
16
|
-
blockNumber?: bigint;
|
17
|
-
blockTag?: never;
|
18
|
-
} | {
|
19
|
-
blockNumber?: never;
|
20
|
-
/**
|
21
|
-
* The balance of the account at a block tag.
|
22
|
-
* @default 'latest'
|
23
|
-
*/
|
24
|
-
blockTag?: BlockTag;
|
25
|
-
});
|
26
|
-
export type CallReturnType = {
|
27
|
-
data: Hex | undefined;
|
28
|
-
};
|
29
|
-
/**
|
30
|
-
* Executes a new message call immediately without submitting a transaction to the network.
|
31
|
-
*
|
32
|
-
* - Docs: https://viem.sh/docs/actions/public/call.html
|
33
|
-
* - JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call)
|
34
|
-
*
|
35
|
-
* @param client - Client to use
|
36
|
-
* @param parameters - {@link CallParameters}
|
37
|
-
* @returns The call data. {@link CallReturnType}
|
38
|
-
*
|
39
|
-
* @example
|
40
|
-
* import { createPublicClient, http } from 'viem'
|
41
|
-
* import { mainnet } from 'viem/chains'
|
42
|
-
* import { call } from 'viem/public'
|
43
|
-
*
|
44
|
-
* const client = createPublicClient({
|
45
|
-
* chain: mainnet,
|
46
|
-
* transport: http(),
|
47
|
-
* })
|
48
|
-
* const data = await call(client, {
|
49
|
-
* account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
|
50
|
-
* data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
51
|
-
* to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
|
52
|
-
* })
|
53
|
-
*/
|
54
|
-
export declare function call<TChain extends Chain | undefined>(client: Client<Transport, TChain>, args: CallParameters<TChain>): Promise<CallReturnType>;
|
55
|
-
export declare function getRevertErrorData(err: unknown): `0x${string}` | undefined;
|
56
|
-
//# sourceMappingURL=call.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"call.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/call.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEtC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AAS5E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAG9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAOrD,OAAO,EACL,KAAK,2BAA2B,EAEjC,MAAM,8CAA8C,CAAA;AAKrD,MAAM,MAAM,aAAa,CACvB,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,IAClD,2BAA2B,CAAC,MAAM,CAAC,CAAA;AAEvC,MAAM,MAAM,cAAc,CACxB,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,IAClD,SAAS,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,GAAG;IAC7C,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAA;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,GAAG,CACE;IACE,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB,GACD;IACE,WAAW,CAAC,EAAE,KAAK,CAAA;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACpB,CACJ,CAAA;AAEH,MAAM,MAAM,cAAc,GAAG;IAAE,IAAI,EAAE,GAAG,GAAG,SAAS,CAAA;CAAE,CAAA;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,IAAI,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EACzD,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,EACjC,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,GAC3B,OAAO,CAAC,cAAc,CAAC,CAiFzB;AA4GD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,6BAI9C"}
|
@@ -1,28 +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 { Filter } from '../../types/filter.js';
|
5
|
-
export type CreateBlockFilterReturnType = Filter<'block'>;
|
6
|
-
/**
|
7
|
-
* Creates a [`Filter`](https://viem.sh/docs/glossary/types.html#filter) to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges.html).
|
8
|
-
*
|
9
|
-
* - Docs: https://viem.sh/docs/actions/public/createBlockFilter.html
|
10
|
-
* - JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter)
|
11
|
-
*
|
12
|
-
* @param client - Client to use
|
13
|
-
* @returns [`Filter`](https://viem.sh/docs/glossary/types.html#filter). {@link CreateBlockFilterReturnType}
|
14
|
-
*
|
15
|
-
* @example
|
16
|
-
* import { createPublicClient, http } from 'viem'
|
17
|
-
* import { mainnet } from 'viem/chains'
|
18
|
-
* import { createBlockFilter } from 'viem/public'
|
19
|
-
*
|
20
|
-
* const client = createPublicClient({
|
21
|
-
* chain: mainnet,
|
22
|
-
* transport: http(),
|
23
|
-
* })
|
24
|
-
* const filter = await createBlockFilter(client)
|
25
|
-
* // { id: "0x345a6572337856574a76364e457a4366", type: 'block' }
|
26
|
-
*/
|
27
|
-
export declare function createBlockFilter<TChain extends Chain | undefined>(client: Client<Transport, TChain>): Promise<CreateBlockFilterReturnType>;
|
28
|
-
//# sourceMappingURL=createBlockFilter.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"createBlockFilter.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/createBlockFilter.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;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAGnD,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;AAEzD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,iBAAiB,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EACtE,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,GAChC,OAAO,CAAC,2BAA2B,CAAC,CAQtC"}
|
@@ -1,50 +0,0 @@
|
|
1
|
-
import type { Abi, Address } from 'abitype';
|
2
|
-
import type { Client } from '../../clients/createClient.js';
|
3
|
-
import type { Transport } from '../../clients/transports/createTransport.js';
|
4
|
-
import type { BlockNumber, BlockTag } from '../../types/block.js';
|
5
|
-
import type { Chain } from '../../types/chain.js';
|
6
|
-
import type { InferEventName, MaybeExtractEventArgsFromAbi } from '../../types/contract.js';
|
7
|
-
import type { Filter } from '../../types/filter.js';
|
8
|
-
export type CreateContractEventFilterParameters<TAbi extends Abi | readonly unknown[] = Abi, TEventName extends string | undefined = undefined, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined = undefined, TStrict extends boolean | undefined = undefined, TFromBlock extends BlockNumber | BlockTag | undefined = undefined, TToBlock extends BlockNumber | BlockTag | undefined = undefined> = {
|
9
|
-
address?: Address | Address[];
|
10
|
-
abi: TAbi;
|
11
|
-
eventName?: InferEventName<TAbi, TEventName>;
|
12
|
-
fromBlock?: TFromBlock | BlockNumber | BlockTag;
|
13
|
-
/**
|
14
|
-
* Whether or not the logs must match the indexed/non-indexed arguments in the event ABI item.
|
15
|
-
* @default false
|
16
|
-
*/
|
17
|
-
strict?: TStrict;
|
18
|
-
toBlock?: TToBlock | BlockNumber | BlockTag;
|
19
|
-
} & (undefined extends TEventName ? {
|
20
|
-
args?: never;
|
21
|
-
} : MaybeExtractEventArgsFromAbi<TAbi, TEventName> extends infer TEventFilterArgs ? {
|
22
|
-
args?: TEventFilterArgs | (TArgs extends TEventFilterArgs ? TArgs : never);
|
23
|
-
} : {
|
24
|
-
args?: never;
|
25
|
-
});
|
26
|
-
export type CreateContractEventFilterReturnType<TAbi extends Abi | readonly unknown[] = Abi, TEventName extends string | undefined = undefined, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined = undefined, TStrict extends boolean | undefined = undefined, TFromBlock extends BlockNumber | BlockTag | undefined = undefined, TToBlock extends BlockNumber | BlockTag | undefined = undefined> = Filter<'event', TAbi, TEventName, TArgs, TStrict, TFromBlock, TToBlock>;
|
27
|
-
/**
|
28
|
-
* Creates a Filter to retrieve event logs that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges.html) or [`getFilterLogs`](https://viem.sh/docs/actions/public/getFilterLogs.html).
|
29
|
-
*
|
30
|
-
* - Docs: https://viem.sh/docs/contract/createContractEventFilter.html
|
31
|
-
*
|
32
|
-
* @param client - Client to use
|
33
|
-
* @param parameters - {@link CreateContractEventFilterParameters}
|
34
|
-
* @returns [`Filter`](https://viem.sh/docs/glossary/types.html#filter). {@link CreateContractEventFilterReturnType}
|
35
|
-
*
|
36
|
-
* @example
|
37
|
-
* import { createPublicClient, http, parseAbi } from 'viem'
|
38
|
-
* import { mainnet } from 'viem/chains'
|
39
|
-
* import { createContractEventFilter } from 'viem/contract'
|
40
|
-
*
|
41
|
-
* const client = createPublicClient({
|
42
|
-
* chain: mainnet,
|
43
|
-
* transport: http(),
|
44
|
-
* })
|
45
|
-
* const filter = await createContractEventFilter(client, {
|
46
|
-
* abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']),
|
47
|
-
* })
|
48
|
-
*/
|
49
|
-
export declare function createContractEventFilter<TChain extends Chain | undefined, const TAbi extends Abi | readonly unknown[], TEventName extends string | undefined, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined, TStrict extends boolean | undefined = undefined, TFromBlock extends BlockNumber | BlockTag | undefined = undefined, TToBlock extends BlockNumber | BlockTag | undefined = undefined>(client: Client<Transport, TChain>, { address, abi, args, eventName, fromBlock, strict, toBlock, }: CreateContractEventFilterParameters<TAbi, TEventName, TArgs, TStrict, TFromBlock, TToBlock>): Promise<CreateContractEventFilterReturnType<TAbi, TEventName, TArgs, TStrict, TFromBlock, TToBlock>>;
|
50
|
-
//# sourceMappingURL=createContractEventFilter.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"createContractEventFilter.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/createContractEventFilter.ts"],"names":[],"mappings":"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"}
|
@@ -1,76 +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 { BlockNumber, BlockTag } from '../../types/block.js';
|
5
|
-
import type { Chain } from '../../types/chain.js';
|
6
|
-
import type { MaybeAbiEventName, MaybeExtractEventArgsFromAbi } from '../../types/contract.js';
|
7
|
-
import type { Filter } from '../../types/filter.js';
|
8
|
-
import type { Prettify } from '../../types/utils.js';
|
9
|
-
export type CreateEventFilterParameters<TAbiEvent extends AbiEvent | undefined = undefined, TAbiEvents extends readonly AbiEvent[] | readonly unknown[] | undefined = TAbiEvent extends AbiEvent ? [TAbiEvent] : undefined, TStrict extends boolean | undefined = undefined, TFromBlock extends BlockNumber | BlockTag | undefined = undefined, TToBlock extends BlockNumber | BlockTag | undefined = undefined, _EventName extends string | undefined = MaybeAbiEventName<TAbiEvent>, _Args extends MaybeExtractEventArgsFromAbi<TAbiEvents, _EventName> | undefined = undefined> = {
|
10
|
-
address?: Address | Address[];
|
11
|
-
fromBlock?: TFromBlock | BlockNumber | BlockTag;
|
12
|
-
toBlock?: TToBlock | BlockNumber | BlockTag;
|
13
|
-
} & (MaybeExtractEventArgsFromAbi<TAbiEvents, _EventName> extends infer TEventFilterArgs ? {
|
14
|
-
args: TEventFilterArgs | (_Args extends TEventFilterArgs ? _Args : never);
|
15
|
-
event: TAbiEvent;
|
16
|
-
events?: never;
|
17
|
-
/**
|
18
|
-
* Whether or not the logs must match the indexed/non-indexed arguments on `event`.
|
19
|
-
* @default false
|
20
|
-
*/
|
21
|
-
strict?: TStrict;
|
22
|
-
} | {
|
23
|
-
args?: never;
|
24
|
-
event?: TAbiEvent;
|
25
|
-
events?: never;
|
26
|
-
/**
|
27
|
-
* Whether or not the logs must match the indexed/non-indexed arguments on `event`.
|
28
|
-
* @default false
|
29
|
-
*/
|
30
|
-
strict?: TStrict;
|
31
|
-
} | {
|
32
|
-
args?: never;
|
33
|
-
event?: never;
|
34
|
-
events: TAbiEvents;
|
35
|
-
/**
|
36
|
-
* Whether or not the logs must match the indexed/non-indexed arguments on `event`.
|
37
|
-
* @default false
|
38
|
-
*/
|
39
|
-
strict?: TStrict;
|
40
|
-
} | {
|
41
|
-
args?: never;
|
42
|
-
event?: never;
|
43
|
-
events?: never;
|
44
|
-
strict?: never;
|
45
|
-
} : {
|
46
|
-
args?: never;
|
47
|
-
event?: never;
|
48
|
-
events?: never;
|
49
|
-
strict?: never;
|
50
|
-
});
|
51
|
-
export type CreateEventFilterReturnType<TAbiEvent extends AbiEvent | undefined = undefined, TAbiEvents extends readonly AbiEvent[] | readonly unknown[] | undefined = TAbiEvent extends AbiEvent ? [TAbiEvent] : undefined, TStrict extends boolean | undefined = undefined, TFromBlock extends BlockNumber | BlockTag | undefined = undefined, TToBlock extends BlockNumber | BlockTag | undefined = undefined, _EventName extends string | undefined = MaybeAbiEventName<TAbiEvent>, _Args extends MaybeExtractEventArgsFromAbi<TAbiEvents, _EventName> | undefined = undefined> = Prettify<Filter<'event', TAbiEvents, _EventName, _Args, TStrict, TFromBlock, TToBlock>>;
|
52
|
-
/**
|
53
|
-
* Creates a [`Filter`](https://viem.sh/docs/glossary/types.html#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges.html).
|
54
|
-
*
|
55
|
-
* - Docs: https://viem.sh/docs/actions/public/createEventFilter.html
|
56
|
-
* - JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter)
|
57
|
-
*
|
58
|
-
* @param client - Client to use
|
59
|
-
* @param parameters - {@link CreateEventFilterParameters}
|
60
|
-
* @returns [`Filter`](https://viem.sh/docs/glossary/types.html#filter). {@link CreateEventFilterReturnType}
|
61
|
-
*
|
62
|
-
* @example
|
63
|
-
* import { createPublicClient, http } from 'viem'
|
64
|
-
* import { mainnet } from 'viem/chains'
|
65
|
-
* import { createEventFilter } from 'viem/public'
|
66
|
-
*
|
67
|
-
* const client = createPublicClient({
|
68
|
-
* chain: mainnet,
|
69
|
-
* transport: http(),
|
70
|
-
* })
|
71
|
-
* const filter = await createEventFilter(client, {
|
72
|
-
* address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2',
|
73
|
-
* })
|
74
|
-
*/
|
75
|
-
export declare function createEventFilter<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, TFromBlock extends BlockNumber<bigint> | BlockTag | undefined = undefined, TToBlock extends BlockNumber<bigint> | BlockTag | undefined = undefined, _EventName extends string | undefined = MaybeAbiEventName<TAbiEvent>, _Args extends MaybeExtractEventArgsFromAbi<TAbiEvents, _EventName> | undefined = undefined>(client: Client<Transport, TChain>, { address, args, event, events: events_, fromBlock, strict, toBlock, }?: CreateEventFilterParameters<TAbiEvent, TAbiEvents, TStrict, TFromBlock, TToBlock, _EventName, _Args>): Promise<CreateEventFilterReturnType<TAbiEvent, TAbiEvents, TStrict, TFromBlock, TToBlock, _EventName, _Args>>;
|
76
|
-
//# sourceMappingURL=createEventFilter.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"createEventFilter.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/createEventFilter.ts"],"names":[],"mappings":"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"}
|
@@ -1,28 +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 { Filter } from '../../types/filter.js';
|
5
|
-
export type CreatePendingTransactionFilterReturnType = Filter<'transaction'>;
|
6
|
-
/**
|
7
|
-
* Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges.html).
|
8
|
-
*
|
9
|
-
* - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter.html
|
10
|
-
* - JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter)
|
11
|
-
*
|
12
|
-
* @param client - Client to use
|
13
|
-
* @returns [`Filter`](https://viem.sh/docs/glossary/types.html#filter). {@link CreateBlockFilterReturnType}
|
14
|
-
*
|
15
|
-
* @example
|
16
|
-
* import { createPublicClient, http } from 'viem'
|
17
|
-
* import { mainnet } from 'viem/chains'
|
18
|
-
* import { createPendingTransactionFilter } from 'viem/public'
|
19
|
-
*
|
20
|
-
* const client = createPublicClient({
|
21
|
-
* chain: mainnet,
|
22
|
-
* transport: http(),
|
23
|
-
* })
|
24
|
-
* const filter = await createPendingTransactionFilter(client)
|
25
|
-
* // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' }
|
26
|
-
*/
|
27
|
-
export declare function createPendingTransactionFilter<TTransport extends Transport, TChain extends Chain | undefined>(client: Client<TTransport, TChain>): Promise<CreatePendingTransactionFilterReturnType>;
|
28
|
-
//# sourceMappingURL=createPendingTransactionFilter.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"createPendingTransactionFilter.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/createPendingTransactionFilter.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;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAGnD,MAAM,MAAM,wCAAwC,GAAG,MAAM,CAAC,aAAa,CAAC,CAAA;AAE5E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,8BAA8B,CAClD,UAAU,SAAS,SAAS,EAC5B,MAAM,SAAS,KAAK,GAAG,SAAS,EAEhC,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,GACjC,OAAO,CAAC,wCAAwC,CAAC,CAQnD"}
|
@@ -1,39 +0,0 @@
|
|
1
|
-
import type { Abi } from 'abitype';
|
2
|
-
import type { Account } from '../../accounts/types.js';
|
3
|
-
import type { Client } from '../../clients/createClient.js';
|
4
|
-
import type { Transport } from '../../clients/transports/createTransport.js';
|
5
|
-
import type { Chain } from '../../types/chain.js';
|
6
|
-
import type { ContractFunctionConfig, GetValue } from '../../types/contract.js';
|
7
|
-
import type { UnionOmit } from '../../types/utils.js';
|
8
|
-
import { type EstimateGasParameters } from './estimateGas.js';
|
9
|
-
export type EstimateContractGasParameters<TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = string, TChain extends Chain | undefined = Chain | undefined, TAccount extends Account | undefined = undefined> = ContractFunctionConfig<TAbi, TFunctionName, 'payable' | 'nonpayable'> & UnionOmit<EstimateGasParameters<TChain, TAccount>, 'data' | 'to' | 'value'> & GetValue<TAbi, TFunctionName, EstimateGasParameters<TChain> extends EstimateGasParameters ? EstimateGasParameters<TChain>['value'] : EstimateGasParameters['value']>;
|
10
|
-
export type EstimateContractGasReturnType = bigint;
|
11
|
-
/**
|
12
|
-
* Estimates the gas required to successfully execute a contract write function call.
|
13
|
-
*
|
14
|
-
* - Docs: https://viem.sh/docs/contract/estimateContractGas.html
|
15
|
-
*
|
16
|
-
* Internally, uses a [Public Client](https://viem.sh/docs/clients/public.html) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas.html) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData.html).
|
17
|
-
*
|
18
|
-
* @param client - Client to use
|
19
|
-
* @param parameters - {@link EstimateContractGasParameters}
|
20
|
-
* @returns The gas estimate (in wei). {@link EstimateContractGasReturnType}
|
21
|
-
*
|
22
|
-
* @example
|
23
|
-
* import { createPublicClient, http, parseAbi } from 'viem'
|
24
|
-
* import { mainnet } from 'viem/chains'
|
25
|
-
* import { estimateContractGas } from 'viem/contract'
|
26
|
-
*
|
27
|
-
* const client = createPublicClient({
|
28
|
-
* chain: mainnet,
|
29
|
-
* transport: http(),
|
30
|
-
* })
|
31
|
-
* const gas = await estimateContractGas(client, {
|
32
|
-
* address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
|
33
|
-
* abi: parseAbi(['function mint() public']),
|
34
|
-
* functionName: 'mint',
|
35
|
-
* account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
|
36
|
-
* })
|
37
|
-
*/
|
38
|
-
export declare function estimateContractGas<const TAbi extends Abi | readonly unknown[], TFunctionName extends string, TChain extends Chain | undefined, TAccount extends Account | undefined = undefined>(client: Client<Transport, TChain, TAccount>, { abi, address, args, functionName, ...request }: EstimateContractGasParameters<TAbi, TFunctionName, TChain, TAccount>): Promise<EstimateContractGasReturnType>;
|
39
|
-
//# sourceMappingURL=estimateContractGas.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"estimateContractGas.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/estimateContractGas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAElC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AAE5E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAMrD,OAAO,EAAE,KAAK,qBAAqB,EAAe,MAAM,kBAAkB,CAAA;AAE1E,MAAM,MAAM,6BAA6B,CACvC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,GAAG,EAC3C,aAAa,SAAS,MAAM,GAAG,MAAM,EACrC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,IAC9C,sBAAsB,CAAC,IAAI,EAAE,aAAa,EAAE,SAAS,GAAG,YAAY,CAAC,GACvE,SAAS,CAAC,qBAAqB,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,GAC3E,QAAQ,CACN,IAAI,EACJ,aAAa,EACb,qBAAqB,CAAC,MAAM,CAAC,SAAS,qBAAqB,GACvD,qBAAqB,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,GACtC,qBAAqB,CAAC,OAAO,CAAC,CACnC,CAAA;AAEH,MAAM,MAAM,6BAA6B,GAAG,MAAM,CAAA;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,mBAAmB,CACvC,KAAK,CAAC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,EAC3C,aAAa,SAAS,MAAM,EAC5B,MAAM,SAAS,KAAK,GAAG,SAAS,EAChC,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EAEhD,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,EAC3C,EACE,GAAG,EACH,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,GAAG,OAAO,EACX,EAAE,6BAA6B,CAAC,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,CAAC,GACtE,OAAO,CAAC,6BAA6B,CAAC,CAwBxC"}
|
@@ -1,49 +0,0 @@
|
|
1
|
-
import type { Account } from '../../accounts/types.js';
|
2
|
-
import type { Client } from '../../clients/createClient.js';
|
3
|
-
import type { Transport } from '../../clients/transports/createTransport.js';
|
4
|
-
import type { GetAccountParameter } from '../../types/account.js';
|
5
|
-
import type { BlockTag } from '../../types/block.js';
|
6
|
-
import type { Chain } from '../../types/chain.js';
|
7
|
-
import type { UnionOmit } from '../../types/utils.js';
|
8
|
-
import { type FormattedTransactionRequest } from '../../utils/formatters/transactionRequest.js';
|
9
|
-
export type FormattedEstimateGas<TChain extends Chain | undefined = Chain | undefined> = FormattedTransactionRequest<TChain>;
|
10
|
-
export type EstimateGasParameters<TChain extends Chain | undefined = Chain | undefined, TAccount extends Account | undefined = undefined> = UnionOmit<FormattedEstimateGas<TChain>, 'from'> & GetAccountParameter<TAccount> & ({
|
11
|
-
/** The balance of the account at a block number. */
|
12
|
-
blockNumber?: bigint;
|
13
|
-
blockTag?: never;
|
14
|
-
} | {
|
15
|
-
blockNumber?: never;
|
16
|
-
/**
|
17
|
-
* The balance of the account at a block tag.
|
18
|
-
* @default 'latest'
|
19
|
-
*/
|
20
|
-
blockTag?: BlockTag;
|
21
|
-
});
|
22
|
-
export type EstimateGasReturnType = bigint;
|
23
|
-
/**
|
24
|
-
* Estimates the gas necessary to complete a transaction without submitting it to the network.
|
25
|
-
*
|
26
|
-
* - Docs: https://viem.sh/docs/actions/public/estimateGas.html
|
27
|
-
* - JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas)
|
28
|
-
*
|
29
|
-
* @param client - Client to use
|
30
|
-
* @param parameters - {@link EstimateGasParameters}
|
31
|
-
* @returns The gas estimate (in wei). {@link EstimateGasReturnType}
|
32
|
-
*
|
33
|
-
* @example
|
34
|
-
* import { createPublicClient, http, parseEther } from 'viem'
|
35
|
-
* import { mainnet } from 'viem/chains'
|
36
|
-
* import { estimateGas } from 'viem/public'
|
37
|
-
*
|
38
|
-
* const client = createPublicClient({
|
39
|
-
* chain: mainnet,
|
40
|
-
* transport: http(),
|
41
|
-
* })
|
42
|
-
* const gasEstimate = await estimateGas(client, {
|
43
|
-
* account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
|
44
|
-
* to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
|
45
|
-
* value: parseEther('1'),
|
46
|
-
* })
|
47
|
-
*/
|
48
|
-
export declare function estimateGas<TChain extends Chain | undefined, TAccount extends Account | undefined = undefined>(client: Client<Transport, TChain, TAccount>, args: EstimateGasParameters<TChain, TAccount>): Promise<EstimateGasReturnType>;
|
49
|
-
//# sourceMappingURL=estimateGas.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"estimateGas.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/estimateGas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AAG5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAEjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAIrD,OAAO,EACL,KAAK,2BAA2B,EAEjC,MAAM,8CAA8C,CAAA;AAUrD,MAAM,MAAM,oBAAoB,CAC9B,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,IAClD,2BAA2B,CAAC,MAAM,CAAC,CAAA;AAEvC,MAAM,MAAM,qBAAqB,CAC/B,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,IAC9C,SAAS,CAAC,oBAAoB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,GACjD,mBAAmB,CAAC,QAAQ,CAAC,GAC7B,CACI;IACE,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB,GACD;IACE,WAAW,CAAC,EAAE,KAAK,CAAA;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACpB,CACJ,CAAA;AAEH,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAA;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,WAAW,CAC/B,MAAM,SAAS,KAAK,GAAG,SAAS,EAChC,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EAEhD,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,EAC3C,IAAI,EAAE,qBAAqB,CAAC,MAAM,EAAE,QAAQ,CAAC,GAC5C,OAAO,CAAC,qBAAqB,CAAC,CAiEhC"}
|
@@ -1,55 +0,0 @@
|
|
1
|
-
import type { Address } from 'abitype';
|
2
|
-
import type { Client } from '../../clients/createClient.js';
|
3
|
-
import type { Transport } from '../../clients/transports/createTransport.js';
|
4
|
-
import type { BlockTag } from '../../types/block.js';
|
5
|
-
import type { Chain } from '../../types/chain.js';
|
6
|
-
export type GetBalanceParameters = {
|
7
|
-
/** The address of the account. */
|
8
|
-
address: Address;
|
9
|
-
} & ({
|
10
|
-
/** The balance of the account at a block number. */
|
11
|
-
blockNumber?: bigint;
|
12
|
-
blockTag?: never;
|
13
|
-
} | {
|
14
|
-
blockNumber?: never;
|
15
|
-
/** The balance of the account at a block tag. */
|
16
|
-
blockTag?: BlockTag;
|
17
|
-
});
|
18
|
-
export type GetBalanceReturnType = bigint;
|
19
|
-
/**
|
20
|
-
* Returns the balance of an address in wei.
|
21
|
-
*
|
22
|
-
* - Docs: https://viem.sh/docs/actions/public/getBalance.html
|
23
|
-
* - JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance)
|
24
|
-
*
|
25
|
-
* You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther.html).
|
26
|
-
*
|
27
|
-
* ```ts
|
28
|
-
* const balance = await getBalance(client, {
|
29
|
-
* address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
|
30
|
-
* blockTag: 'safe'
|
31
|
-
* })
|
32
|
-
* const balanceAsEther = formatEther(balance)
|
33
|
-
* // "6.942"
|
34
|
-
* ```
|
35
|
-
*
|
36
|
-
* @param client - Client to use
|
37
|
-
* @param parameters - {@link GetBalanceParameters}
|
38
|
-
* @returns The balance of the address in wei. {@link GetBalanceReturnType}
|
39
|
-
*
|
40
|
-
* @example
|
41
|
-
* import { createPublicClient, http } from 'viem'
|
42
|
-
* import { mainnet } from 'viem/chains'
|
43
|
-
* import { getBalance } from 'viem/public'
|
44
|
-
*
|
45
|
-
* const client = createPublicClient({
|
46
|
-
* chain: mainnet,
|
47
|
-
* transport: http(),
|
48
|
-
* })
|
49
|
-
* const balance = await getBalance(client, {
|
50
|
-
* address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
|
51
|
-
* })
|
52
|
-
* // 10000000000000000000000n (wei)
|
53
|
-
*/
|
54
|
-
export declare function getBalance<TChain extends Chain | undefined>(client: Client<Transport, TChain>, { address, blockNumber, blockTag }: GetBalanceParameters): Promise<GetBalanceReturnType>;
|
55
|
-
//# sourceMappingURL=getBalance.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"getBalance.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/getBalance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEtC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AAC5E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAGjD,MAAM,MAAM,oBAAoB,GAAG;IACjC,kCAAkC;IAClC,OAAO,EAAE,OAAO,CAAA;CACjB,GAAG,CACA;IACE,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB,GACD;IACE,WAAW,CAAC,EAAE,KAAK,CAAA;IACnB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACpB,CACJ,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAA;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAsB,UAAU,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EAC/D,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,EACjC,EAAE,OAAO,EAAE,WAAW,EAAE,QAAmB,EAAE,EAAE,oBAAoB,GAClE,OAAO,CAAC,oBAAoB,CAAC,CAQ/B"}
|
@@ -1,56 +0,0 @@
|
|
1
|
-
import type { Account } from '../../accounts/types.js';
|
2
|
-
import type { Client } from '../../clients/createClient.js';
|
3
|
-
import type { Transport } from '../../clients/transports/createTransport.js';
|
4
|
-
import type { BlockTag } from '../../types/block.js';
|
5
|
-
import type { Chain } from '../../types/chain.js';
|
6
|
-
import type { Hash } from '../../types/misc.js';
|
7
|
-
import { type FormattedBlock } from '../../utils/formatters/block.js';
|
8
|
-
export type GetBlockParameters<TIncludeTransactions extends boolean = false, TBlockTag extends BlockTag = 'latest'> = {
|
9
|
-
/** Whether or not to include transaction data in the response. */
|
10
|
-
includeTransactions?: TIncludeTransactions;
|
11
|
-
} & ({
|
12
|
-
/** Hash of the block. */
|
13
|
-
blockHash?: Hash;
|
14
|
-
blockNumber?: never;
|
15
|
-
blockTag?: never;
|
16
|
-
} | {
|
17
|
-
blockHash?: never;
|
18
|
-
/** The block number. */
|
19
|
-
blockNumber?: bigint;
|
20
|
-
blockTag?: never;
|
21
|
-
} | {
|
22
|
-
blockHash?: never;
|
23
|
-
blockNumber?: never;
|
24
|
-
/**
|
25
|
-
* The block tag.
|
26
|
-
* @default 'latest'
|
27
|
-
*/
|
28
|
-
blockTag?: TBlockTag | BlockTag;
|
29
|
-
});
|
30
|
-
export type GetBlockReturnType<TChain extends Chain | undefined = Chain | undefined, TIncludeTransactions extends boolean = false, TBlockTag extends BlockTag = 'latest'> = FormattedBlock<TChain, TIncludeTransactions, TBlockTag>;
|
31
|
-
/**
|
32
|
-
* Returns information about a block at a block number, hash, or tag.
|
33
|
-
*
|
34
|
-
* - Docs: https://viem.sh/docs/actions/public/getBlock.html
|
35
|
-
* - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/blocks/fetching-blocks
|
36
|
-
* - JSON-RPC Methods:
|
37
|
-
* - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`.
|
38
|
-
* - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`.
|
39
|
-
*
|
40
|
-
* @param client - Client to use
|
41
|
-
* @param parameters - {@link GetBlockParameters}
|
42
|
-
* @returns Information about the block. {@link GetBlockReturnType}
|
43
|
-
*
|
44
|
-
* @example
|
45
|
-
* import { createPublicClient, http } from 'viem'
|
46
|
-
* import { mainnet } from 'viem/chains'
|
47
|
-
* import { getBlock } from 'viem/public'
|
48
|
-
*
|
49
|
-
* const client = createPublicClient({
|
50
|
-
* chain: mainnet,
|
51
|
-
* transport: http(),
|
52
|
-
* })
|
53
|
-
* const block = await getBlock(client)
|
54
|
-
*/
|
55
|
-
export declare function getBlock<TChain extends Chain | undefined, TAccount extends Account | undefined, TIncludeTransactions extends boolean = false, TBlockTag extends BlockTag = 'latest'>(client: Client<Transport, TChain, TAccount>, { blockHash, blockNumber, blockTag: blockTag_, includeTransactions: includeTransactions_, }?: GetBlockParameters<TIncludeTransactions, TBlockTag>): Promise<GetBlockReturnType<TChain, TIncludeTransactions, TBlockTag>>;
|
56
|
-
//# sourceMappingURL=getBlock.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"getBlock.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/getBlock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AAE5E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAG/C,OAAO,EACL,KAAK,cAAc,EAEpB,MAAM,iCAAiC,CAAA;AAExC,MAAM,MAAM,kBAAkB,CAC5B,oBAAoB,SAAS,OAAO,GAAG,KAAK,EAC5C,SAAS,SAAS,QAAQ,GAAG,QAAQ,IACnC;IACF,kEAAkE;IAClE,mBAAmB,CAAC,EAAE,oBAAoB,CAAA;CAC3C,GAAG,CACA;IACE,yBAAyB;IACzB,SAAS,CAAC,EAAE,IAAI,CAAA;IAChB,WAAW,CAAC,EAAE,KAAK,CAAA;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB,GACD;IACE,SAAS,CAAC,EAAE,KAAK,CAAA;IACjB,wBAAwB;IACxB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB,GACD;IACE,SAAS,CAAC,EAAE,KAAK,CAAA;IACjB,WAAW,CAAC,EAAE,KAAK,CAAA;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAA;CAChC,CACJ,CAAA;AAED,MAAM,MAAM,kBAAkB,CAC5B,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,oBAAoB,SAAS,OAAO,GAAG,KAAK,EAC5C,SAAS,SAAS,QAAQ,GAAG,QAAQ,IACnC,cAAc,CAAC,MAAM,EAAE,oBAAoB,EAAE,SAAS,CAAC,CAAA;AAE3D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,QAAQ,CAC5B,MAAM,SAAS,KAAK,GAAG,SAAS,EAChC,QAAQ,SAAS,OAAO,GAAG,SAAS,EACpC,oBAAoB,SAAS,OAAO,GAAG,KAAK,EAC5C,SAAS,SAAS,QAAQ,GAAG,QAAQ,EAErC,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,EAC3C,EACE,SAAS,EACT,WAAW,EACX,QAAQ,EAAE,SAAS,EACnB,mBAAmB,EAAE,oBAAoB,GAC1C,GAAE,kBAAkB,CAAC,oBAAoB,EAAE,SAAS,CAAM,GAC1D,OAAO,CAAC,kBAAkB,CAAC,MAAM,EAAE,oBAAoB,EAAE,SAAS,CAAC,CAAC,CAwBtE"}
|
@@ -1,57 +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
|
-
export type GetBlockNumberParameters = {
|
5
|
-
/** Time (in ms) that cached block number will remain in memory. */
|
6
|
-
cacheTime?: number;
|
7
|
-
/** @deprecated use `cacheTime` instead. */
|
8
|
-
maxAge?: number;
|
9
|
-
};
|
10
|
-
export type GetBlockNumberReturnType = bigint;
|
11
|
-
export declare function getBlockNumberCache(id: string): {
|
12
|
-
clear: () => void;
|
13
|
-
promise: {
|
14
|
-
clear: () => boolean;
|
15
|
-
get: () => Promise<unknown> | undefined;
|
16
|
-
set: (data: Promise<unknown>) => Map<string, Promise<unknown>>;
|
17
|
-
};
|
18
|
-
response: {
|
19
|
-
clear: () => boolean;
|
20
|
-
get: () => {
|
21
|
-
created: Date;
|
22
|
-
data: unknown;
|
23
|
-
} | undefined;
|
24
|
-
set: (data: {
|
25
|
-
created: Date;
|
26
|
-
data: unknown;
|
27
|
-
}) => Map<string, {
|
28
|
-
created: Date;
|
29
|
-
data: unknown;
|
30
|
-
}>;
|
31
|
-
};
|
32
|
-
};
|
33
|
-
/**
|
34
|
-
* Returns the number of the most recent block seen.
|
35
|
-
*
|
36
|
-
* - Docs: https://viem.sh/docs/actions/public/getBlockNumber.html
|
37
|
-
* - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/blocks/fetching-blocks
|
38
|
-
* - JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber)
|
39
|
-
*
|
40
|
-
* @param client - Client to use
|
41
|
-
* @param parameters - {@link GetBlockNumberParameters}
|
42
|
-
* @returns The number of the block. {@link GetBlockNumberReturnType}
|
43
|
-
*
|
44
|
-
* @example
|
45
|
-
* import { createPublicClient, http } from 'viem'
|
46
|
-
* import { mainnet } from 'viem/chains'
|
47
|
-
* import { getBlockNumber } from 'viem/public'
|
48
|
-
*
|
49
|
-
* const client = createPublicClient({
|
50
|
-
* chain: mainnet,
|
51
|
-
* transport: http(),
|
52
|
-
* })
|
53
|
-
* const blockNumber = await getBlockNumber(client)
|
54
|
-
* // 69420n
|
55
|
-
*/
|
56
|
-
export declare function getBlockNumber<TChain extends Chain | undefined>(client: Client<Transport, TChain>, { cacheTime, maxAge }?: GetBlockNumberParameters): Promise<GetBlockNumberReturnType>;
|
57
|
-
//# sourceMappingURL=getBlockNumber.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"getBlockNumber.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/getBlockNumber.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;AAGjD,MAAM,MAAM,wBAAwB,GAAG;IACrC,mEAAmE;IACnE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,2CAA2C;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAA;AAI7C,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;EAE7C;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,cAAc,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EACnE,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,EACjC,EAAE,SAA4B,EAAE,MAAM,EAAE,GAAE,wBAA6B,GACtE,OAAO,CAAC,wBAAwB,CAAC,CASnC"}
|
@@ -1,47 +0,0 @@
|
|
1
|
-
import type { Client } from '../../clients/createClient.js';
|
2
|
-
import type { Transport } from '../../clients/transports/createTransport.js';
|
3
|
-
import type { BlockTag } from '../../types/block.js';
|
4
|
-
import type { Chain } from '../../types/chain.js';
|
5
|
-
import type { Hash } from '../../types/misc.js';
|
6
|
-
export type GetBlockTransactionCountParameters = {
|
7
|
-
/** Hash of the block. */
|
8
|
-
blockHash?: Hash;
|
9
|
-
blockNumber?: never;
|
10
|
-
blockTag?: never;
|
11
|
-
} | {
|
12
|
-
blockHash?: never;
|
13
|
-
/** The block number. */
|
14
|
-
blockNumber?: bigint;
|
15
|
-
blockTag?: never;
|
16
|
-
} | {
|
17
|
-
blockHash?: never;
|
18
|
-
blockNumber?: never;
|
19
|
-
/** The block tag. Defaults to 'latest'. */
|
20
|
-
blockTag?: BlockTag;
|
21
|
-
};
|
22
|
-
export type GetBlockTransactionCountReturnType = number;
|
23
|
-
/**
|
24
|
-
* Returns the number of Transactions at a block number, hash, or tag.
|
25
|
-
*
|
26
|
-
* - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount.html
|
27
|
-
* - JSON-RPC Methods:
|
28
|
-
* - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`.
|
29
|
-
* - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`.
|
30
|
-
*
|
31
|
-
* @param client - Client to use
|
32
|
-
* @param parameters - {@link GetBlockTransactionCountParameters}
|
33
|
-
* @returns The block transaction count. {@link GetBlockTransactionCountReturnType}
|
34
|
-
*
|
35
|
-
* @example
|
36
|
-
* import { createPublicClient, http } from 'viem'
|
37
|
-
* import { mainnet } from 'viem/chains'
|
38
|
-
* import { getBlockTransactionCount } from 'viem/public'
|
39
|
-
*
|
40
|
-
* const client = createPublicClient({
|
41
|
-
* chain: mainnet,
|
42
|
-
* transport: http(),
|
43
|
-
* })
|
44
|
-
* const count = await getBlockTransactionCount(client)
|
45
|
-
*/
|
46
|
-
export declare function getBlockTransactionCount<TChain extends Chain | undefined>(client: Client<Transport, TChain>, { blockHash, blockNumber, blockTag, }?: GetBlockTransactionCountParameters): Promise<GetBlockTransactionCountReturnType>;
|
47
|
-
//# sourceMappingURL=getBlockTransactionCount.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"getBlockTransactionCount.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/getBlockTransactionCount.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,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAK/C,MAAM,MAAM,kCAAkC,GAC1C;IACE,yBAAyB;IACzB,SAAS,CAAC,EAAE,IAAI,CAAA;IAChB,WAAW,CAAC,EAAE,KAAK,CAAA;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB,GACD;IACE,SAAS,CAAC,EAAE,KAAK,CAAA;IACjB,wBAAwB;IACxB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB,GACD;IACE,SAAS,CAAC,EAAE,KAAK,CAAA;IACjB,WAAW,CAAC,EAAE,KAAK,CAAA;IACnB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACpB,CAAA;AAEL,MAAM,MAAM,kCAAkC,GAAG,MAAM,CAAA;AAEvD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,SAAS,KAAK,GAAG,SAAS,EAEhC,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,EACjC,EACE,SAAS,EACT,WAAW,EACX,QAAmB,GACpB,GAAE,kCAAuC,GACzC,OAAO,CAAC,kCAAkC,CAAC,CAkB7C"}
|