viem 1.1.7 → 1.2.0
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/actions/package.json +5 -0
- package/dist/cjs/actions/ens/getEnsAddress.js.map +1 -1
- package/dist/cjs/actions/ens/getEnsAvatar.js.map +1 -1
- package/dist/cjs/actions/ens/getEnsName.js.map +1 -1
- package/dist/cjs/actions/ens/getEnsResolver.js.map +1 -1
- package/dist/cjs/actions/ens/getEnsText.js.map +1 -1
- package/dist/cjs/actions/index.js +155 -0
- package/dist/cjs/actions/index.js.map +1 -0
- package/dist/cjs/actions/public/call.js.map +1 -1
- package/dist/cjs/actions/public/createBlockFilter.js.map +1 -1
- package/dist/cjs/actions/public/createContractEventFilter.js.map +1 -1
- package/dist/cjs/actions/public/createEventFilter.js.map +1 -1
- package/dist/cjs/actions/public/createPendingTransactionFilter.js.map +1 -1
- package/dist/cjs/actions/public/estimateContractGas.js.map +1 -1
- package/dist/cjs/actions/public/estimateGas.js.map +1 -1
- package/dist/cjs/actions/public/getBalance.js.map +1 -1
- package/dist/cjs/actions/public/getBlock.js.map +1 -1
- package/dist/cjs/actions/public/getBlockNumber.js.map +1 -1
- package/dist/cjs/actions/public/getBlockTransactionCount.js.map +1 -1
- package/dist/cjs/actions/public/getBytecode.js.map +1 -1
- package/dist/cjs/actions/public/getChainId.js.map +1 -1
- package/dist/cjs/actions/public/getFeeHistory.js.map +1 -1
- package/dist/cjs/actions/public/getFilterChanges.js.map +1 -1
- package/dist/cjs/actions/public/getFilterLogs.js.map +1 -1
- package/dist/cjs/actions/public/getGasPrice.js.map +1 -1
- package/dist/cjs/actions/public/getLogs.js.map +1 -1
- package/dist/cjs/actions/public/getStorageAt.js.map +1 -1
- package/dist/cjs/actions/public/getTransaction.js.map +1 -1
- package/dist/cjs/actions/public/getTransactionConfirmations.js.map +1 -1
- package/dist/cjs/actions/public/getTransactionCount.js.map +1 -1
- package/dist/cjs/actions/public/getTransactionReceipt.js.map +1 -1
- package/dist/cjs/actions/public/multicall.js.map +1 -1
- package/dist/cjs/actions/public/readContract.js.map +1 -1
- package/dist/cjs/actions/public/simulateContract.js.map +1 -1
- package/dist/cjs/actions/public/uninstallFilter.js.map +1 -1
- package/dist/cjs/actions/public/verifyHash.js.map +1 -1
- package/dist/cjs/actions/public/verifyMessage.js.map +1 -1
- package/dist/cjs/actions/public/verifyTypedData.js +2 -2
- package/dist/cjs/actions/public/verifyTypedData.js.map +1 -1
- package/dist/cjs/actions/public/waitForTransactionReceipt.js.map +1 -1
- package/dist/cjs/actions/public/watchBlockNumber.js.map +1 -1
- package/dist/cjs/actions/public/watchBlocks.js.map +1 -1
- package/dist/cjs/actions/public/watchContractEvent.js.map +1 -1
- package/dist/cjs/actions/public/watchEvent.js.map +1 -1
- package/dist/cjs/actions/public/watchPendingTransactions.js.map +1 -1
- package/dist/cjs/actions/test/dropTransaction.js.map +1 -1
- package/dist/cjs/actions/test/getAutomine.js.map +1 -1
- package/dist/cjs/actions/test/getTxpoolContent.js.map +1 -1
- package/dist/cjs/actions/test/getTxpoolStatus.js.map +1 -1
- package/dist/cjs/actions/test/impersonateAccount.js.map +1 -1
- package/dist/cjs/actions/test/increaseTime.js.map +1 -1
- package/dist/cjs/actions/test/inspectTxpool.js.map +1 -1
- package/dist/cjs/actions/test/mine.js.map +1 -1
- package/dist/cjs/actions/test/removeBlockTimestampInterval.js.map +1 -1
- package/dist/cjs/actions/test/reset.js.map +1 -1
- package/dist/cjs/actions/test/revert.js.map +1 -1
- package/dist/cjs/actions/test/sendUnsignedTransaction.js.map +1 -1
- package/dist/cjs/actions/test/setAutomine.js.map +1 -1
- package/dist/cjs/actions/test/setBalance.js.map +1 -1
- package/dist/cjs/actions/test/setBlockGasLimit.js.map +1 -1
- package/dist/cjs/actions/test/setBlockTimestampInterval.js.map +1 -1
- package/dist/cjs/actions/test/setCode.js.map +1 -1
- package/dist/cjs/actions/test/setCoinbase.js.map +1 -1
- package/dist/cjs/actions/test/setIntervalMining.js.map +1 -1
- package/dist/cjs/actions/test/setLoggingEnabled.js.map +1 -1
- package/dist/cjs/actions/test/setMinGasPrice.js.map +1 -1
- package/dist/cjs/actions/test/setNextBlockBaseFeePerGas.js.map +1 -1
- package/dist/cjs/actions/test/setNextBlockTimestamp.js.map +1 -1
- package/dist/cjs/actions/test/setNonce.js.map +1 -1
- package/dist/cjs/actions/test/setRpcUrl.js.map +1 -1
- package/dist/cjs/actions/test/setStorageAt.js.map +1 -1
- package/dist/cjs/actions/test/snapshot.js.map +1 -1
- package/dist/cjs/actions/test/stopImpersonatingAccount.js.map +1 -1
- package/dist/cjs/actions/wallet/addChain.js.map +1 -1
- package/dist/cjs/actions/wallet/deployContract.js.map +1 -1
- package/dist/cjs/actions/wallet/getAddresses.js.map +1 -1
- package/dist/cjs/actions/wallet/getPermissions.js.map +1 -1
- package/dist/cjs/actions/wallet/requestAddresses.js.map +1 -1
- package/dist/cjs/actions/wallet/requestPermissions.js.map +1 -1
- package/dist/cjs/actions/wallet/sendTransaction.js.map +1 -1
- package/dist/cjs/actions/wallet/signMessage.js.map +1 -1
- package/dist/cjs/actions/wallet/signTypedData.js.map +1 -1
- package/dist/cjs/actions/wallet/switchChain.js.map +1 -1
- package/dist/cjs/actions/wallet/watchAsset.js.map +1 -1
- package/dist/cjs/actions/wallet/writeContract.js.map +1 -1
- package/dist/cjs/clients/createClient.js +18 -3
- package/dist/cjs/clients/createClient.js.map +1 -1
- package/dist/cjs/clients/createPublicClient.js +8 -14
- package/dist/cjs/clients/createPublicClient.js.map +1 -1
- package/dist/cjs/clients/createTestClient.js +12 -16
- package/dist/cjs/clients/createTestClient.js.map +1 -1
- package/dist/cjs/clients/createWalletClient.js +9 -16
- package/dist/cjs/clients/createWalletClient.js.map +1 -1
- package/dist/cjs/clients/decorators/public.js.map +1 -1
- package/dist/cjs/clients/decorators/test.js +35 -30
- package/dist/cjs/clients/decorators/test.js.map +1 -1
- package/dist/cjs/clients/decorators/wallet.js.map +1 -1
- package/dist/cjs/errors/rpc.js +132 -18
- package/dist/cjs/errors/rpc.js.map +1 -1
- package/dist/cjs/errors/version.js +1 -1
- package/dist/cjs/index.js +11 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/utils/buildRequest.js +42 -41
- package/dist/cjs/utils/buildRequest.js.map +1 -1
- package/dist/cjs/utils/ccip.js.map +1 -1
- package/dist/cjs/utils/ens/avatar/parseAvatarRecord.js.map +1 -1
- package/dist/cjs/utils/ens/avatar/utils.js.map +1 -1
- package/dist/cjs/utils/filters/createFilterRequestScope.js.map +1 -1
- package/dist/cjs/utils/transaction/prepareRequest.js.map +1 -1
- package/dist/esm/actions/ens/getEnsAddress.js.map +1 -1
- package/dist/esm/actions/ens/getEnsAvatar.js.map +1 -1
- package/dist/esm/actions/ens/getEnsName.js.map +1 -1
- package/dist/esm/actions/ens/getEnsResolver.js.map +1 -1
- package/dist/esm/actions/ens/getEnsText.js.map +1 -1
- package/dist/esm/actions/index.js +76 -0
- package/dist/esm/actions/index.js.map +1 -0
- package/dist/esm/actions/public/call.js.map +1 -1
- package/dist/esm/actions/public/createBlockFilter.js.map +1 -1
- package/dist/esm/actions/public/createContractEventFilter.js.map +1 -1
- package/dist/esm/actions/public/createEventFilter.js.map +1 -1
- package/dist/esm/actions/public/createPendingTransactionFilter.js.map +1 -1
- package/dist/esm/actions/public/estimateContractGas.js.map +1 -1
- package/dist/esm/actions/public/estimateGas.js.map +1 -1
- package/dist/esm/actions/public/getBalance.js.map +1 -1
- package/dist/esm/actions/public/getBlock.js.map +1 -1
- package/dist/esm/actions/public/getBlockNumber.js.map +1 -1
- package/dist/esm/actions/public/getBlockTransactionCount.js.map +1 -1
- package/dist/esm/actions/public/getBytecode.js.map +1 -1
- package/dist/esm/actions/public/getChainId.js.map +1 -1
- package/dist/esm/actions/public/getFeeHistory.js.map +1 -1
- package/dist/esm/actions/public/getFilterChanges.js.map +1 -1
- package/dist/esm/actions/public/getFilterLogs.js.map +1 -1
- package/dist/esm/actions/public/getGasPrice.js.map +1 -1
- package/dist/esm/actions/public/getLogs.js.map +1 -1
- package/dist/esm/actions/public/getStorageAt.js.map +1 -1
- package/dist/esm/actions/public/getTransaction.js.map +1 -1
- package/dist/esm/actions/public/getTransactionConfirmations.js.map +1 -1
- package/dist/esm/actions/public/getTransactionCount.js.map +1 -1
- package/dist/esm/actions/public/getTransactionReceipt.js.map +1 -1
- package/dist/esm/actions/public/multicall.js.map +1 -1
- package/dist/esm/actions/public/readContract.js.map +1 -1
- package/dist/esm/actions/public/simulateContract.js.map +1 -1
- package/dist/esm/actions/public/uninstallFilter.js.map +1 -1
- package/dist/esm/actions/public/verifyHash.js.map +1 -1
- package/dist/esm/actions/public/verifyMessage.js.map +1 -1
- package/dist/esm/actions/public/verifyTypedData.js +1 -1
- package/dist/esm/actions/public/verifyTypedData.js.map +1 -1
- package/dist/esm/actions/public/waitForTransactionReceipt.js.map +1 -1
- package/dist/esm/actions/public/watchBlockNumber.js.map +1 -1
- package/dist/esm/actions/public/watchBlocks.js.map +1 -1
- package/dist/esm/actions/public/watchContractEvent.js.map +1 -1
- package/dist/esm/actions/public/watchEvent.js.map +1 -1
- package/dist/esm/actions/public/watchPendingTransactions.js.map +1 -1
- package/dist/esm/actions/test/dropTransaction.js.map +1 -1
- package/dist/esm/actions/test/getAutomine.js.map +1 -1
- package/dist/esm/actions/test/getTxpoolContent.js.map +1 -1
- package/dist/esm/actions/test/getTxpoolStatus.js.map +1 -1
- package/dist/esm/actions/test/impersonateAccount.js.map +1 -1
- package/dist/esm/actions/test/increaseTime.js.map +1 -1
- package/dist/esm/actions/test/inspectTxpool.js.map +1 -1
- package/dist/esm/actions/test/mine.js.map +1 -1
- package/dist/esm/actions/test/removeBlockTimestampInterval.js.map +1 -1
- package/dist/esm/actions/test/reset.js.map +1 -1
- package/dist/esm/actions/test/revert.js.map +1 -1
- package/dist/esm/actions/test/sendUnsignedTransaction.js.map +1 -1
- package/dist/esm/actions/test/setAutomine.js.map +1 -1
- package/dist/esm/actions/test/setBalance.js.map +1 -1
- package/dist/esm/actions/test/setBlockGasLimit.js.map +1 -1
- package/dist/esm/actions/test/setBlockTimestampInterval.js.map +1 -1
- package/dist/esm/actions/test/setCode.js.map +1 -1
- package/dist/esm/actions/test/setCoinbase.js.map +1 -1
- package/dist/esm/actions/test/setIntervalMining.js.map +1 -1
- package/dist/esm/actions/test/setLoggingEnabled.js.map +1 -1
- package/dist/esm/actions/test/setMinGasPrice.js.map +1 -1
- package/dist/esm/actions/test/setNextBlockBaseFeePerGas.js.map +1 -1
- package/dist/esm/actions/test/setNextBlockTimestamp.js.map +1 -1
- package/dist/esm/actions/test/setNonce.js.map +1 -1
- package/dist/esm/actions/test/setRpcUrl.js.map +1 -1
- package/dist/esm/actions/test/setStorageAt.js.map +1 -1
- package/dist/esm/actions/test/snapshot.js.map +1 -1
- package/dist/esm/actions/test/stopImpersonatingAccount.js.map +1 -1
- package/dist/esm/actions/wallet/addChain.js.map +1 -1
- package/dist/esm/actions/wallet/deployContract.js.map +1 -1
- package/dist/esm/actions/wallet/getAddresses.js.map +1 -1
- package/dist/esm/actions/wallet/getPermissions.js.map +1 -1
- package/dist/esm/actions/wallet/requestAddresses.js.map +1 -1
- package/dist/esm/actions/wallet/requestPermissions.js.map +1 -1
- package/dist/esm/actions/wallet/sendTransaction.js.map +1 -1
- package/dist/esm/actions/wallet/signMessage.js.map +1 -1
- package/dist/esm/actions/wallet/signTypedData.js.map +1 -1
- package/dist/esm/actions/wallet/switchChain.js.map +1 -1
- package/dist/esm/actions/wallet/watchAsset.js.map +1 -1
- package/dist/esm/actions/wallet/writeContract.js.map +1 -1
- package/dist/esm/clients/createClient.js +18 -3
- package/dist/esm/clients/createClient.js.map +1 -1
- package/dist/esm/clients/createPublicClient.js +8 -14
- package/dist/esm/clients/createPublicClient.js.map +1 -1
- package/dist/esm/clients/createTestClient.js +12 -16
- package/dist/esm/clients/createTestClient.js.map +1 -1
- package/dist/esm/clients/createWalletClient.js +9 -16
- package/dist/esm/clients/createWalletClient.js.map +1 -1
- package/dist/esm/clients/decorators/public.js.map +1 -1
- package/dist/esm/clients/decorators/test.js +35 -30
- package/dist/esm/clients/decorators/test.js.map +1 -1
- package/dist/esm/clients/decorators/wallet.js.map +1 -1
- package/dist/esm/errors/rpc.js +168 -36
- package/dist/esm/errors/rpc.js.map +1 -1
- package/dist/esm/errors/version.js +1 -1
- package/dist/esm/index.js +5 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/utils/buildRequest.js +60 -41
- package/dist/esm/utils/buildRequest.js.map +1 -1
- package/dist/esm/utils/ccip.js.map +1 -1
- package/dist/esm/utils/ens/avatar/parseAvatarRecord.js.map +1 -1
- package/dist/esm/utils/ens/avatar/utils.js.map +1 -1
- package/dist/esm/utils/filters/createFilterRequestScope.js.map +1 -1
- package/dist/esm/utils/transaction/prepareRequest.js.map +1 -1
- package/dist/types/actions/ens/getEnsAddress.d.ts +2 -2
- package/dist/types/actions/ens/getEnsAddress.d.ts.map +1 -1
- package/dist/types/actions/ens/getEnsAvatar.d.ts +2 -2
- package/dist/types/actions/ens/getEnsAvatar.d.ts.map +1 -1
- package/dist/types/actions/ens/getEnsName.d.ts +2 -2
- package/dist/types/actions/ens/getEnsName.d.ts.map +1 -1
- package/dist/types/actions/ens/getEnsResolver.d.ts +2 -2
- package/dist/types/actions/ens/getEnsResolver.d.ts.map +1 -1
- package/dist/types/actions/ens/getEnsText.d.ts +2 -2
- package/dist/types/actions/ens/getEnsText.d.ts.map +1 -1
- package/dist/types/actions/index.d.ts +76 -0
- package/dist/types/actions/index.d.ts.map +1 -0
- package/dist/types/actions/public/call.d.ts +2 -2
- package/dist/types/actions/public/call.d.ts.map +1 -1
- package/dist/types/actions/public/createBlockFilter.d.ts +2 -2
- package/dist/types/actions/public/createBlockFilter.d.ts.map +1 -1
- package/dist/types/actions/public/createContractEventFilter.d.ts +2 -2
- package/dist/types/actions/public/createContractEventFilter.d.ts.map +1 -1
- package/dist/types/actions/public/createEventFilter.d.ts +2 -2
- package/dist/types/actions/public/createEventFilter.d.ts.map +1 -1
- package/dist/types/actions/public/createPendingTransactionFilter.d.ts +2 -2
- package/dist/types/actions/public/createPendingTransactionFilter.d.ts.map +1 -1
- package/dist/types/actions/public/estimateContractGas.d.ts +2 -3
- package/dist/types/actions/public/estimateContractGas.d.ts.map +1 -1
- package/dist/types/actions/public/estimateGas.d.ts +2 -3
- package/dist/types/actions/public/estimateGas.d.ts.map +1 -1
- package/dist/types/actions/public/getBalance.d.ts +2 -2
- package/dist/types/actions/public/getBalance.d.ts.map +1 -1
- package/dist/types/actions/public/getBlock.d.ts +2 -3
- package/dist/types/actions/public/getBlock.d.ts.map +1 -1
- package/dist/types/actions/public/getBlockNumber.d.ts +4 -4
- package/dist/types/actions/public/getBlockNumber.d.ts.map +1 -1
- package/dist/types/actions/public/getBlockTransactionCount.d.ts +2 -2
- package/dist/types/actions/public/getBlockTransactionCount.d.ts.map +1 -1
- package/dist/types/actions/public/getBytecode.d.ts +2 -2
- package/dist/types/actions/public/getBytecode.d.ts.map +1 -1
- package/dist/types/actions/public/getChainId.d.ts +2 -3
- package/dist/types/actions/public/getChainId.d.ts.map +1 -1
- package/dist/types/actions/public/getFeeHistory.d.ts +2 -2
- package/dist/types/actions/public/getFeeHistory.d.ts.map +1 -1
- package/dist/types/actions/public/getFilterChanges.d.ts +2 -2
- package/dist/types/actions/public/getFilterChanges.d.ts.map +1 -1
- package/dist/types/actions/public/getFilterLogs.d.ts +2 -2
- package/dist/types/actions/public/getFilterLogs.d.ts.map +1 -1
- package/dist/types/actions/public/getGasPrice.d.ts +2 -3
- package/dist/types/actions/public/getGasPrice.d.ts.map +1 -1
- package/dist/types/actions/public/getLogs.d.ts +2 -2
- package/dist/types/actions/public/getLogs.d.ts.map +1 -1
- package/dist/types/actions/public/getStorageAt.d.ts +2 -2
- package/dist/types/actions/public/getStorageAt.d.ts.map +1 -1
- package/dist/types/actions/public/getTransaction.d.ts +2 -2
- package/dist/types/actions/public/getTransaction.d.ts.map +1 -1
- package/dist/types/actions/public/getTransactionConfirmations.d.ts +2 -2
- package/dist/types/actions/public/getTransactionConfirmations.d.ts.map +1 -1
- package/dist/types/actions/public/getTransactionCount.d.ts +2 -3
- package/dist/types/actions/public/getTransactionCount.d.ts.map +1 -1
- package/dist/types/actions/public/getTransactionReceipt.d.ts +2 -2
- package/dist/types/actions/public/getTransactionReceipt.d.ts.map +1 -1
- package/dist/types/actions/public/multicall.d.ts +2 -2
- package/dist/types/actions/public/multicall.d.ts.map +1 -1
- package/dist/types/actions/public/readContract.d.ts +2 -2
- package/dist/types/actions/public/readContract.d.ts.map +1 -1
- package/dist/types/actions/public/simulateContract.d.ts +2 -2
- package/dist/types/actions/public/simulateContract.d.ts.map +1 -1
- package/dist/types/actions/public/uninstallFilter.d.ts +2 -2
- package/dist/types/actions/public/uninstallFilter.d.ts.map +1 -1
- package/dist/types/actions/public/verifyHash.d.ts +2 -2
- package/dist/types/actions/public/verifyHash.d.ts.map +1 -1
- package/dist/types/actions/public/verifyMessage.d.ts +2 -2
- package/dist/types/actions/public/verifyMessage.d.ts.map +1 -1
- package/dist/types/actions/public/verifyTypedData.d.ts +2 -2
- package/dist/types/actions/public/verifyTypedData.d.ts.map +1 -1
- package/dist/types/actions/public/waitForTransactionReceipt.d.ts +2 -2
- package/dist/types/actions/public/waitForTransactionReceipt.d.ts.map +1 -1
- package/dist/types/actions/public/watchBlockNumber.d.ts +2 -2
- package/dist/types/actions/public/watchBlockNumber.d.ts.map +1 -1
- package/dist/types/actions/public/watchBlocks.d.ts +2 -2
- package/dist/types/actions/public/watchBlocks.d.ts.map +1 -1
- package/dist/types/actions/public/watchContractEvent.d.ts +2 -2
- package/dist/types/actions/public/watchContractEvent.d.ts.map +1 -1
- package/dist/types/actions/public/watchEvent.d.ts +2 -2
- package/dist/types/actions/public/watchEvent.d.ts.map +1 -1
- package/dist/types/actions/public/watchPendingTransactions.d.ts +2 -2
- package/dist/types/actions/public/watchPendingTransactions.d.ts.map +1 -1
- package/dist/types/actions/test/dropTransaction.d.ts +2 -1
- package/dist/types/actions/test/dropTransaction.d.ts.map +1 -1
- package/dist/types/actions/test/getAutomine.d.ts +2 -1
- package/dist/types/actions/test/getAutomine.d.ts.map +1 -1
- package/dist/types/actions/test/getTxpoolContent.d.ts +2 -1
- package/dist/types/actions/test/getTxpoolContent.d.ts.map +1 -1
- package/dist/types/actions/test/getTxpoolStatus.d.ts +2 -1
- package/dist/types/actions/test/getTxpoolStatus.d.ts.map +1 -1
- package/dist/types/actions/test/impersonateAccount.d.ts +2 -1
- package/dist/types/actions/test/impersonateAccount.d.ts.map +1 -1
- package/dist/types/actions/test/increaseTime.d.ts +2 -1
- package/dist/types/actions/test/increaseTime.d.ts.map +1 -1
- package/dist/types/actions/test/inspectTxpool.d.ts +2 -1
- package/dist/types/actions/test/inspectTxpool.d.ts.map +1 -1
- package/dist/types/actions/test/mine.d.ts +2 -1
- package/dist/types/actions/test/mine.d.ts.map +1 -1
- package/dist/types/actions/test/removeBlockTimestampInterval.d.ts +2 -1
- package/dist/types/actions/test/removeBlockTimestampInterval.d.ts.map +1 -1
- package/dist/types/actions/test/reset.d.ts +2 -1
- package/dist/types/actions/test/reset.d.ts.map +1 -1
- package/dist/types/actions/test/revert.d.ts +2 -1
- package/dist/types/actions/test/revert.d.ts.map +1 -1
- package/dist/types/actions/test/sendUnsignedTransaction.d.ts +2 -1
- package/dist/types/actions/test/sendUnsignedTransaction.d.ts.map +1 -1
- package/dist/types/actions/test/setAutomine.d.ts +2 -1
- package/dist/types/actions/test/setAutomine.d.ts.map +1 -1
- package/dist/types/actions/test/setBalance.d.ts +2 -1
- package/dist/types/actions/test/setBalance.d.ts.map +1 -1
- package/dist/types/actions/test/setBlockGasLimit.d.ts +2 -1
- package/dist/types/actions/test/setBlockGasLimit.d.ts.map +1 -1
- package/dist/types/actions/test/setBlockTimestampInterval.d.ts +2 -1
- package/dist/types/actions/test/setBlockTimestampInterval.d.ts.map +1 -1
- package/dist/types/actions/test/setCode.d.ts +2 -1
- package/dist/types/actions/test/setCode.d.ts.map +1 -1
- package/dist/types/actions/test/setCoinbase.d.ts +2 -1
- package/dist/types/actions/test/setCoinbase.d.ts.map +1 -1
- package/dist/types/actions/test/setIntervalMining.d.ts +2 -1
- package/dist/types/actions/test/setIntervalMining.d.ts.map +1 -1
- package/dist/types/actions/test/setLoggingEnabled.d.ts +2 -1
- package/dist/types/actions/test/setLoggingEnabled.d.ts.map +1 -1
- package/dist/types/actions/test/setMinGasPrice.d.ts +2 -1
- package/dist/types/actions/test/setMinGasPrice.d.ts.map +1 -1
- package/dist/types/actions/test/setNextBlockBaseFeePerGas.d.ts +2 -1
- package/dist/types/actions/test/setNextBlockBaseFeePerGas.d.ts.map +1 -1
- package/dist/types/actions/test/setNextBlockTimestamp.d.ts +2 -1
- package/dist/types/actions/test/setNextBlockTimestamp.d.ts.map +1 -1
- package/dist/types/actions/test/setNonce.d.ts +2 -1
- package/dist/types/actions/test/setNonce.d.ts.map +1 -1
- package/dist/types/actions/test/setRpcUrl.d.ts +2 -1
- package/dist/types/actions/test/setRpcUrl.d.ts.map +1 -1
- package/dist/types/actions/test/setStorageAt.d.ts +2 -1
- package/dist/types/actions/test/setStorageAt.d.ts.map +1 -1
- package/dist/types/actions/test/snapshot.d.ts +2 -1
- package/dist/types/actions/test/snapshot.d.ts.map +1 -1
- package/dist/types/actions/test/stopImpersonatingAccount.d.ts +2 -1
- package/dist/types/actions/test/stopImpersonatingAccount.d.ts.map +1 -1
- package/dist/types/actions/wallet/addChain.d.ts +2 -2
- package/dist/types/actions/wallet/addChain.d.ts.map +1 -1
- package/dist/types/actions/wallet/deployContract.d.ts +2 -2
- package/dist/types/actions/wallet/deployContract.d.ts.map +1 -1
- package/dist/types/actions/wallet/getAddresses.d.ts +2 -2
- package/dist/types/actions/wallet/getAddresses.d.ts.map +1 -1
- package/dist/types/actions/wallet/getPermissions.d.ts +2 -2
- package/dist/types/actions/wallet/getPermissions.d.ts.map +1 -1
- package/dist/types/actions/wallet/requestAddresses.d.ts +2 -2
- package/dist/types/actions/wallet/requestAddresses.d.ts.map +1 -1
- package/dist/types/actions/wallet/requestPermissions.d.ts +2 -2
- package/dist/types/actions/wallet/requestPermissions.d.ts.map +1 -1
- package/dist/types/actions/wallet/sendTransaction.d.ts +2 -2
- package/dist/types/actions/wallet/sendTransaction.d.ts.map +1 -1
- package/dist/types/actions/wallet/signMessage.d.ts +2 -2
- package/dist/types/actions/wallet/signMessage.d.ts.map +1 -1
- package/dist/types/actions/wallet/signTypedData.d.ts +2 -2
- package/dist/types/actions/wallet/signTypedData.d.ts.map +1 -1
- package/dist/types/actions/wallet/switchChain.d.ts +2 -2
- package/dist/types/actions/wallet/switchChain.d.ts.map +1 -1
- package/dist/types/actions/wallet/watchAsset.d.ts +2 -2
- package/dist/types/actions/wallet/watchAsset.d.ts.map +1 -1
- package/dist/types/actions/wallet/writeContract.d.ts +2 -2
- package/dist/types/actions/wallet/writeContract.d.ts.map +1 -1
- package/dist/types/clients/createClient.d.ts +35 -3
- package/dist/types/clients/createClient.d.ts.map +1 -1
- package/dist/types/clients/createPublicClient.d.ts +3 -15
- package/dist/types/clients/createPublicClient.d.ts.map +1 -1
- package/dist/types/clients/createTestClient.d.ts +6 -3
- package/dist/types/clients/createTestClient.d.ts.map +1 -1
- package/dist/types/clients/createWalletClient.d.ts +5 -10
- package/dist/types/clients/createWalletClient.d.ts.map +1 -1
- package/dist/types/clients/decorators/public.d.ts +524 -5
- package/dist/types/clients/decorators/public.d.ts.map +1 -1
- package/dist/types/clients/decorators/test.d.ts +6 -2
- package/dist/types/clients/decorators/test.d.ts.map +1 -1
- package/dist/types/clients/decorators/wallet.d.ts +520 -2
- package/dist/types/clients/decorators/wallet.d.ts.map +1 -1
- package/dist/types/errors/rpc.d.ts +18 -0
- package/dist/types/errors/rpc.d.ts.map +1 -1
- package/dist/types/errors/version.d.ts +1 -1
- package/dist/types/index.d.ts +6 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types/account.d.ts +2 -2
- package/dist/types/types/account.d.ts.map +1 -1
- package/dist/types/types/utils.d.ts +2 -2
- package/dist/types/utils/buildRequest.d.ts.map +1 -1
- package/dist/types/utils/ccip.d.ts +2 -2
- package/dist/types/utils/ccip.d.ts.map +1 -1
- package/dist/types/utils/ens/avatar/parseAvatarRecord.d.ts +2 -2
- package/dist/types/utils/ens/avatar/parseAvatarRecord.d.ts.map +1 -1
- package/dist/types/utils/ens/avatar/utils.d.ts +2 -2
- package/dist/types/utils/ens/avatar/utils.d.ts.map +1 -1
- package/dist/types/utils/filters/createFilterRequestScope.d.ts +4 -3
- package/dist/types/utils/filters/createFilterRequestScope.d.ts.map +1 -1
- package/dist/types/utils/formatters/transaction.d.ts +1 -1
- package/dist/types/utils/transaction/prepareRequest.d.ts +2 -3
- package/dist/types/utils/transaction/prepareRequest.d.ts.map +1 -1
- package/package.json +11 -2
- package/src/actions/ens/getEnsAddress.ts +2 -2
- package/src/actions/ens/getEnsAvatar.ts +2 -2
- package/src/actions/ens/getEnsName.ts +2 -2
- package/src/actions/ens/getEnsResolver.ts +2 -2
- package/src/actions/ens/getEnsText.ts +2 -2
- package/src/actions/index.ts +324 -0
- package/src/actions/public/call.ts +4 -4
- package/src/actions/public/createBlockFilter.ts +2 -2
- package/src/actions/public/createContractEventFilter.ts +2 -2
- package/src/actions/public/createEventFilter.ts +2 -2
- package/src/actions/public/createPendingTransactionFilter.ts +2 -2
- package/src/actions/public/estimateContractGas.ts +2 -6
- package/src/actions/public/estimateGas.ts +4 -7
- package/src/actions/public/getBalance.ts +2 -2
- package/src/actions/public/getBlock.ts +4 -7
- package/src/actions/public/getBlockNumber.ts +2 -2
- package/src/actions/public/getBlockTransactionCount.ts +2 -2
- package/src/actions/public/getBytecode.ts +2 -2
- package/src/actions/public/getChainId.ts +3 -8
- package/src/actions/public/getFeeHistory.ts +2 -2
- package/src/actions/public/getFilterChanges.ts +2 -2
- package/src/actions/public/getFilterLogs.ts +2 -2
- package/src/actions/public/getGasPrice.ts +3 -8
- package/src/actions/public/getLogs.ts +2 -2
- package/src/actions/public/getStorageAt.ts +2 -2
- package/src/actions/public/getTransaction.ts +2 -2
- package/src/actions/public/getTransactionConfirmations.ts +2 -2
- package/src/actions/public/getTransactionCount.ts +3 -6
- package/src/actions/public/getTransactionReceipt.ts +2 -2
- package/src/actions/public/multicall.ts +2 -2
- package/src/actions/public/readContract.ts +2 -2
- package/src/actions/public/simulateContract.ts +2 -2
- package/src/actions/public/uninstallFilter.ts +2 -2
- package/src/actions/public/verifyHash.ts +2 -2
- package/src/actions/public/verifyMessage.ts +2 -2
- package/src/actions/public/verifyTypedData.ts +3 -3
- package/src/actions/public/waitForTransactionReceipt.ts +2 -2
- package/src/actions/public/watchBlockNumber.ts +2 -2
- package/src/actions/public/watchBlocks.ts +2 -2
- package/src/actions/public/watchContractEvent.ts +2 -2
- package/src/actions/public/watchEvent.ts +2 -2
- package/src/actions/public/watchPendingTransactions.ts +2 -2
- package/src/actions/test/dropTransaction.ts +6 -2
- package/src/actions/test/getAutomine.ts +6 -2
- package/src/actions/test/getTxpoolContent.ts +6 -2
- package/src/actions/test/getTxpoolStatus.ts +6 -2
- package/src/actions/test/impersonateAccount.ts +6 -2
- package/src/actions/test/increaseTime.ts +6 -2
- package/src/actions/test/inspectTxpool.ts +6 -2
- package/src/actions/test/mine.ts +6 -2
- package/src/actions/test/removeBlockTimestampInterval.ts +3 -1
- package/src/actions/test/reset.ts +6 -2
- package/src/actions/test/revert.ts +6 -2
- package/src/actions/test/sendUnsignedTransaction.ts +3 -1
- package/src/actions/test/setAutomine.ts +6 -2
- package/src/actions/test/setBalance.ts +6 -2
- package/src/actions/test/setBlockGasLimit.ts +6 -2
- package/src/actions/test/setBlockTimestampInterval.ts +3 -1
- package/src/actions/test/setCode.ts +6 -2
- package/src/actions/test/setCoinbase.ts +6 -2
- package/src/actions/test/setIntervalMining.ts +6 -2
- package/src/actions/test/setLoggingEnabled.ts +6 -2
- package/src/actions/test/setMinGasPrice.ts +6 -2
- package/src/actions/test/setNextBlockBaseFeePerGas.ts +3 -1
- package/src/actions/test/setNextBlockTimestamp.ts +6 -2
- package/src/actions/test/setNonce.ts +6 -2
- package/src/actions/test/setRpcUrl.ts +6 -2
- package/src/actions/test/setStorageAt.ts +6 -2
- package/src/actions/test/snapshot.ts +5 -3
- package/src/actions/test/stopImpersonatingAccount.ts +3 -1
- package/src/actions/wallet/addChain.ts +2 -5
- package/src/actions/wallet/deployContract.ts +2 -2
- package/src/actions/wallet/getAddresses.ts +2 -2
- package/src/actions/wallet/getPermissions.ts +2 -2
- package/src/actions/wallet/requestAddresses.ts +2 -2
- package/src/actions/wallet/requestPermissions.ts +2 -2
- package/src/actions/wallet/sendTransaction.ts +2 -2
- package/src/actions/wallet/signMessage.ts +2 -2
- package/src/actions/wallet/signTypedData.ts +2 -2
- package/src/actions/wallet/switchChain.ts +2 -5
- package/src/actions/wallet/watchAsset.ts +2 -2
- package/src/actions/wallet/writeContract.ts +2 -2
- package/src/clients/createClient.ts +83 -6
- package/src/clients/createPublicClient.ts +18 -38
- package/src/clients/createTestClient.ts +34 -23
- package/src/clients/createWalletClient.ts +22 -41
- package/src/clients/decorators/public.ts +10 -12
- package/src/clients/decorators/test.ts +56 -36
- package/src/clients/decorators/wallet.ts +3 -9
- package/src/errors/rpc.ts +42 -18
- package/src/errors/version.ts +1 -1
- package/src/index.ts +20 -4
- package/src/types/account.ts +9 -5
- package/src/types/utils.ts +2 -2
- package/src/utils/buildRequest.ts +59 -21
- package/src/utils/ccip.ts +3 -3
- package/src/utils/ens/avatar/parseAvatarRecord.ts +3 -3
- package/src/utils/ens/avatar/utils.ts +2 -2
- package/src/utils/filters/createFilterRequestScope.ts +4 -3
- package/src/utils/transaction/prepareRequest.ts +2 -5
@@ -0,0 +1,324 @@
|
|
1
|
+
export {
|
2
|
+
type GetEnsAddressParameters,
|
3
|
+
type GetEnsAddressReturnType,
|
4
|
+
getEnsAddress,
|
5
|
+
} from './ens/getEnsAddress.js'
|
6
|
+
export {
|
7
|
+
type GetEnsAvatarParameters,
|
8
|
+
type GetEnsAvatarReturnType,
|
9
|
+
getEnsAvatar,
|
10
|
+
} from './ens/getEnsAvatar.js'
|
11
|
+
export {
|
12
|
+
type GetEnsNameParameters,
|
13
|
+
type GetEnsNameReturnType,
|
14
|
+
getEnsName,
|
15
|
+
} from './ens/getEnsName.js'
|
16
|
+
export {
|
17
|
+
type GetEnsResolverParameters,
|
18
|
+
type GetEnsResolverReturnType,
|
19
|
+
getEnsResolver,
|
20
|
+
} from './ens/getEnsResolver.js'
|
21
|
+
export {
|
22
|
+
type GetEnsTextParameters,
|
23
|
+
type GetEnsTextReturnType,
|
24
|
+
getEnsText,
|
25
|
+
} from './ens/getEnsText.js'
|
26
|
+
export {
|
27
|
+
type CallParameters,
|
28
|
+
type CallReturnType,
|
29
|
+
call,
|
30
|
+
} from './public/call.js'
|
31
|
+
export {
|
32
|
+
type CreateBlockFilterReturnType,
|
33
|
+
createBlockFilter,
|
34
|
+
} from './public/createBlockFilter.js'
|
35
|
+
export {
|
36
|
+
type CreateContractEventFilterParameters,
|
37
|
+
type CreateContractEventFilterReturnType,
|
38
|
+
createContractEventFilter,
|
39
|
+
} from './public/createContractEventFilter.js'
|
40
|
+
export {
|
41
|
+
type CreateEventFilterParameters,
|
42
|
+
type CreateEventFilterReturnType,
|
43
|
+
createEventFilter,
|
44
|
+
} from './public/createEventFilter.js'
|
45
|
+
export {
|
46
|
+
type CreatePendingTransactionFilterReturnType,
|
47
|
+
createPendingTransactionFilter,
|
48
|
+
} from './public/createPendingTransactionFilter.js'
|
49
|
+
export {
|
50
|
+
type EstimateContractGasParameters,
|
51
|
+
type EstimateContractGasReturnType,
|
52
|
+
estimateContractGas,
|
53
|
+
} from './public/estimateContractGas.js'
|
54
|
+
export {
|
55
|
+
type EstimateGasParameters,
|
56
|
+
type EstimateGasReturnType,
|
57
|
+
estimateGas,
|
58
|
+
} from './public/estimateGas.js'
|
59
|
+
export {
|
60
|
+
type GetBalanceParameters,
|
61
|
+
type GetBalanceReturnType,
|
62
|
+
getBalance,
|
63
|
+
} from './public/getBalance.js'
|
64
|
+
export {
|
65
|
+
type GetBlockParameters,
|
66
|
+
type GetBlockReturnType,
|
67
|
+
getBlock,
|
68
|
+
} from './public/getBlock.js'
|
69
|
+
export {
|
70
|
+
type GetBlockNumberParameters,
|
71
|
+
type GetBlockNumberReturnType,
|
72
|
+
getBlockNumber,
|
73
|
+
} from './public/getBlockNumber.js'
|
74
|
+
export {
|
75
|
+
type GetBlockTransactionCountParameters,
|
76
|
+
type GetBlockTransactionCountReturnType,
|
77
|
+
getBlockTransactionCount,
|
78
|
+
} from './public/getBlockTransactionCount.js'
|
79
|
+
export {
|
80
|
+
type GetBytecodeParameters,
|
81
|
+
type GetBytecodeReturnType,
|
82
|
+
getBytecode,
|
83
|
+
} from './public/getBytecode.js'
|
84
|
+
export { type GetChainIdReturnType, getChainId } from './public/getChainId.js'
|
85
|
+
export {
|
86
|
+
type GetFeeHistoryParameters,
|
87
|
+
type GetFeeHistoryReturnType,
|
88
|
+
getFeeHistory,
|
89
|
+
} from './public/getFeeHistory.js'
|
90
|
+
export {
|
91
|
+
type GetFilterChangesParameters,
|
92
|
+
type GetFilterChangesReturnType,
|
93
|
+
getFilterChanges,
|
94
|
+
} from './public/getFilterChanges.js'
|
95
|
+
export {
|
96
|
+
type GetFilterLogsParameters,
|
97
|
+
type GetFilterLogsReturnType,
|
98
|
+
getFilterLogs,
|
99
|
+
} from './public/getFilterLogs.js'
|
100
|
+
export {
|
101
|
+
type GetGasPriceReturnType,
|
102
|
+
getGasPrice,
|
103
|
+
} from './public/getGasPrice.js'
|
104
|
+
export {
|
105
|
+
type GetLogsParameters,
|
106
|
+
type GetLogsReturnType,
|
107
|
+
getLogs,
|
108
|
+
} from './public/getLogs.js'
|
109
|
+
export {
|
110
|
+
type GetStorageAtParameters,
|
111
|
+
type GetStorageAtReturnType,
|
112
|
+
getStorageAt,
|
113
|
+
} from './public/getStorageAt.js'
|
114
|
+
export {
|
115
|
+
type GetTransactionConfirmationsParameters,
|
116
|
+
type GetTransactionConfirmationsReturnType,
|
117
|
+
getTransactionConfirmations,
|
118
|
+
} from './public/getTransactionConfirmations.js'
|
119
|
+
export {
|
120
|
+
type GetTransactionCountParameters,
|
121
|
+
type GetTransactionCountReturnType,
|
122
|
+
getTransactionCount,
|
123
|
+
} from './public/getTransactionCount.js'
|
124
|
+
export {
|
125
|
+
type GetTransactionParameters,
|
126
|
+
type GetTransactionReturnType,
|
127
|
+
getTransaction,
|
128
|
+
} from './public/getTransaction.js'
|
129
|
+
export {
|
130
|
+
type GetTransactionReceiptParameters,
|
131
|
+
type GetTransactionReceiptReturnType,
|
132
|
+
getTransactionReceipt,
|
133
|
+
} from './public/getTransactionReceipt.js'
|
134
|
+
export {
|
135
|
+
type ImpersonateAccountParameters,
|
136
|
+
impersonateAccount,
|
137
|
+
} from './test/impersonateAccount.js'
|
138
|
+
export {
|
139
|
+
type IncreaseTimeParameters,
|
140
|
+
increaseTime,
|
141
|
+
} from './test/increaseTime.js'
|
142
|
+
export { type MineParameters, mine } from './test/mine.js'
|
143
|
+
export {
|
144
|
+
type MulticallParameters,
|
145
|
+
type MulticallReturnType,
|
146
|
+
multicall,
|
147
|
+
} from './public/multicall.js'
|
148
|
+
export {
|
149
|
+
type OnBlock,
|
150
|
+
type OnBlockParameter,
|
151
|
+
type WatchBlocksParameters,
|
152
|
+
type WatchBlocksReturnType,
|
153
|
+
watchBlocks,
|
154
|
+
} from './public/watchBlocks.js'
|
155
|
+
export {
|
156
|
+
type OnBlockNumberFn,
|
157
|
+
type OnBlockNumberParameter,
|
158
|
+
type WatchBlockNumberParameters,
|
159
|
+
type WatchBlockNumberReturnType,
|
160
|
+
watchBlockNumber,
|
161
|
+
} from './public/watchBlockNumber.js'
|
162
|
+
export {
|
163
|
+
type OnLogsFn,
|
164
|
+
type OnLogsParameter,
|
165
|
+
type WatchEventParameters,
|
166
|
+
type WatchEventReturnType,
|
167
|
+
watchEvent,
|
168
|
+
} from './public/watchEvent.js'
|
169
|
+
export {
|
170
|
+
type OnTransactionsFn,
|
171
|
+
type OnTransactionsParameter,
|
172
|
+
type WatchPendingTransactionsParameters,
|
173
|
+
type WatchPendingTransactionsReturnType,
|
174
|
+
watchPendingTransactions,
|
175
|
+
} from './public/watchPendingTransactions.js'
|
176
|
+
export {
|
177
|
+
type ReadContractParameters,
|
178
|
+
type ReadContractReturnType,
|
179
|
+
readContract,
|
180
|
+
} from './public/readContract.js'
|
181
|
+
export {
|
182
|
+
type GetPermissionsReturnType,
|
183
|
+
getPermissions,
|
184
|
+
} from './wallet/getPermissions.js'
|
185
|
+
export {
|
186
|
+
type ReplacementReason,
|
187
|
+
type ReplacementReturnType,
|
188
|
+
type WaitForTransactionReceiptParameters,
|
189
|
+
type WaitForTransactionReceiptReturnType,
|
190
|
+
waitForTransactionReceipt,
|
191
|
+
} from './public/waitForTransactionReceipt.js'
|
192
|
+
export {
|
193
|
+
type RequestAddressesReturnType,
|
194
|
+
requestAddresses,
|
195
|
+
} from './wallet/requestAddresses.js'
|
196
|
+
export {
|
197
|
+
type RequestPermissionsReturnType,
|
198
|
+
type RequestPermissionsParameters,
|
199
|
+
requestPermissions,
|
200
|
+
} from './wallet/requestPermissions.js'
|
201
|
+
export {
|
202
|
+
type DropTransactionParameters,
|
203
|
+
dropTransaction,
|
204
|
+
} from './test/dropTransaction.js'
|
205
|
+
export {
|
206
|
+
type GetAutomineReturnType,
|
207
|
+
getAutomine,
|
208
|
+
} from './test/getAutomine.js'
|
209
|
+
export {
|
210
|
+
type GetTxpoolContentReturnType,
|
211
|
+
getTxpoolContent,
|
212
|
+
} from './test/getTxpoolContent.js'
|
213
|
+
export {
|
214
|
+
type GetTxpoolStatusReturnType,
|
215
|
+
getTxpoolStatus,
|
216
|
+
} from './test/getTxpoolStatus.js'
|
217
|
+
export {
|
218
|
+
type InspectTxpoolReturnType,
|
219
|
+
inspectTxpool,
|
220
|
+
} from './test/inspectTxpool.js'
|
221
|
+
export { type ResetParameters, reset } from './test/reset.js'
|
222
|
+
export { type RevertParameters, revert } from './test/revert.js'
|
223
|
+
export {
|
224
|
+
type SendTransactionParameters,
|
225
|
+
type SendTransactionReturnType,
|
226
|
+
sendTransaction,
|
227
|
+
} from './wallet/sendTransaction.js'
|
228
|
+
export {
|
229
|
+
type SendUnsignedTransactionParameters,
|
230
|
+
type SendUnsignedTransactionReturnType,
|
231
|
+
sendUnsignedTransaction,
|
232
|
+
} from './test/sendUnsignedTransaction.js'
|
233
|
+
export { type SetBalanceParameters, setBalance } from './test/setBalance.js'
|
234
|
+
export { setAutomine } from './test/setAutomine.js'
|
235
|
+
export {
|
236
|
+
type SetBlockGasLimitParameters,
|
237
|
+
setBlockGasLimit,
|
238
|
+
} from './test/setBlockGasLimit.js'
|
239
|
+
export {
|
240
|
+
type SetBlockTimestampIntervalParameters,
|
241
|
+
setBlockTimestampInterval,
|
242
|
+
} from './test/setBlockTimestampInterval.js'
|
243
|
+
export { type SetCodeParameters, setCode } from './test/setCode.js'
|
244
|
+
export { type SetCoinbaseParameters, setCoinbase } from './test/setCoinbase.js'
|
245
|
+
export {
|
246
|
+
type SetIntervalMiningParameters,
|
247
|
+
setIntervalMining,
|
248
|
+
} from './test/setIntervalMining.js'
|
249
|
+
export {
|
250
|
+
type SetMinGasPriceParameters,
|
251
|
+
setMinGasPrice,
|
252
|
+
} from './test/setMinGasPrice.js'
|
253
|
+
export {
|
254
|
+
type SetNextBlockBaseFeePerGasParameters,
|
255
|
+
setNextBlockBaseFeePerGas,
|
256
|
+
} from './test/setNextBlockBaseFeePerGas.js'
|
257
|
+
export {
|
258
|
+
type SetNextBlockTimestampParameters,
|
259
|
+
setNextBlockTimestamp,
|
260
|
+
} from './test/setNextBlockTimestamp.js'
|
261
|
+
export { type SetNonceParameters, setNonce } from './test/setNonce.js'
|
262
|
+
export {
|
263
|
+
type SetStorageAtParameters,
|
264
|
+
setStorageAt,
|
265
|
+
} from './test/setStorageAt.js'
|
266
|
+
export { snapshot } from './test/snapshot.js'
|
267
|
+
export {
|
268
|
+
type SignMessageParameters,
|
269
|
+
type SignMessageReturnType,
|
270
|
+
signMessage,
|
271
|
+
} from './wallet/signMessage.js'
|
272
|
+
export {
|
273
|
+
type SignTypedDataParameters,
|
274
|
+
type SignTypedDataReturnType,
|
275
|
+
signTypedData,
|
276
|
+
} from './wallet/signTypedData.js'
|
277
|
+
export {
|
278
|
+
type SimulateContractParameters,
|
279
|
+
type SimulateContractReturnType,
|
280
|
+
simulateContract,
|
281
|
+
} from './public/simulateContract.js'
|
282
|
+
export {
|
283
|
+
type StopImpersonatingAccountParameters,
|
284
|
+
stopImpersonatingAccount,
|
285
|
+
} from './test/stopImpersonatingAccount.js'
|
286
|
+
export {
|
287
|
+
type SwitchChainParameters,
|
288
|
+
switchChain,
|
289
|
+
} from './wallet/switchChain.js'
|
290
|
+
export {
|
291
|
+
type UninstallFilterParameters,
|
292
|
+
type UninstallFilterReturnType,
|
293
|
+
uninstallFilter,
|
294
|
+
} from './public/uninstallFilter.js'
|
295
|
+
export {
|
296
|
+
type VerifyHashParameters,
|
297
|
+
type VerifyHashReturnType,
|
298
|
+
verifyHash,
|
299
|
+
} from './public/verifyHash.js'
|
300
|
+
export {
|
301
|
+
type VerifyMessageParameters,
|
302
|
+
type VerifyMessageReturnType,
|
303
|
+
verifyMessage,
|
304
|
+
} from './public/verifyMessage.js'
|
305
|
+
export {
|
306
|
+
type VerifyTypedDataParameters,
|
307
|
+
type VerifyTypedDataReturnType,
|
308
|
+
verifyTypedData,
|
309
|
+
} from './public/verifyTypedData.js'
|
310
|
+
export {
|
311
|
+
type WatchAssetParameters,
|
312
|
+
type WatchAssetReturnType,
|
313
|
+
watchAsset,
|
314
|
+
} from './wallet/watchAsset.js'
|
315
|
+
export {
|
316
|
+
type WatchContractEventParameters,
|
317
|
+
type WatchContractEventReturnType,
|
318
|
+
watchContractEvent,
|
319
|
+
} from './public/watchContractEvent.js'
|
320
|
+
export {
|
321
|
+
type WriteContractParameters,
|
322
|
+
type WriteContractReturnType,
|
323
|
+
writeContract,
|
324
|
+
} from './wallet/writeContract.js'
|
@@ -2,7 +2,7 @@ import type { Address } from 'abitype'
|
|
2
2
|
|
3
3
|
import type { Account } from '../../accounts/types.js'
|
4
4
|
import { parseAccount } from '../../accounts/utils/parseAccount.js'
|
5
|
-
import type {
|
5
|
+
import type { Client } from '../../clients/createClient.js'
|
6
6
|
import type { Transport } from '../../clients/transports/createTransport.js'
|
7
7
|
import { multicall3Abi } from '../../constants/abis.js'
|
8
8
|
import { aggregate3Signature } from '../../constants/contract.js'
|
@@ -83,7 +83,7 @@ export type CallReturnType = { data: Hex | undefined }
|
|
83
83
|
* })
|
84
84
|
*/
|
85
85
|
export async function call<TChain extends Chain | undefined>(
|
86
|
-
client:
|
86
|
+
client: Client<Transport, TChain>,
|
87
87
|
args: CallParameters<TChain>,
|
88
88
|
): Promise<CallReturnType> {
|
89
89
|
const {
|
@@ -194,8 +194,8 @@ type ScheduleMulticallParameters<TChain extends Chain | undefined> = Pick<
|
|
194
194
|
to: Address
|
195
195
|
}
|
196
196
|
|
197
|
-
async function scheduleMulticall<TChain extends Chain | undefined
|
198
|
-
client:
|
197
|
+
async function scheduleMulticall<TChain extends Chain | undefined,>(
|
198
|
+
client: Client<Transport>,
|
199
199
|
args: ScheduleMulticallParameters<TChain>,
|
200
200
|
) {
|
201
201
|
const { batchSize = 1024, wait = 0 } =
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { Client } from '../../clients/createClient.js'
|
2
2
|
import type { Transport } from '../../clients/transports/createTransport.js'
|
3
3
|
import type { Chain } from '../../types/chain.js'
|
4
4
|
import type { Filter } from '../../types/filter.js'
|
@@ -28,7 +28,7 @@ export type CreateBlockFilterReturnType = Filter<'block'>
|
|
28
28
|
* // { id: "0x345a6572337856574a76364e457a4366", type: 'block' }
|
29
29
|
*/
|
30
30
|
export async function createBlockFilter<TChain extends Chain | undefined>(
|
31
|
-
client:
|
31
|
+
client: Client<Transport, TChain>,
|
32
32
|
): Promise<CreateBlockFilterReturnType> {
|
33
33
|
const getRequest = createFilterRequestScope(client, {
|
34
34
|
method: 'eth_newBlockFilter',
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { Abi, Address, Narrow } from 'abitype'
|
2
2
|
|
3
|
-
import type {
|
3
|
+
import type { Client } from '../../clients/createClient.js'
|
4
4
|
import type { Transport } from '../../clients/transports/createTransport.js'
|
5
5
|
import type { BlockNumber, BlockTag } from '../../types/block.js'
|
6
6
|
import type { Chain } from '../../types/chain.js'
|
@@ -87,7 +87,7 @@ export async function createContractEventFilter<
|
|
87
87
|
TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined,
|
88
88
|
TStrict extends boolean | undefined = undefined,
|
89
89
|
>(
|
90
|
-
client:
|
90
|
+
client: Client<Transport, TChain>,
|
91
91
|
{
|
92
92
|
address,
|
93
93
|
abi,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { Abi, AbiEvent, Address, Narrow } from 'abitype'
|
2
2
|
|
3
|
-
import type {
|
3
|
+
import type { Client } from '../../clients/createClient.js'
|
4
4
|
import type { Transport } from '../../clients/transports/createTransport.js'
|
5
5
|
import type { BlockNumber, BlockTag } from '../../types/block.js'
|
6
6
|
import type { Chain } from '../../types/chain.js'
|
@@ -109,7 +109,7 @@ export async function createEventFilter<
|
|
109
109
|
| MaybeExtractEventArgsFromAbi<_Abi, _EventName>
|
110
110
|
| undefined = undefined,
|
111
111
|
>(
|
112
|
-
client:
|
112
|
+
client: Client<Transport, TChain>,
|
113
113
|
{
|
114
114
|
address,
|
115
115
|
args,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { Client } from '../../clients/createClient.js'
|
2
2
|
import type { Transport } from '../../clients/transports/createTransport.js'
|
3
3
|
import type { Chain } from '../../types/chain.js'
|
4
4
|
import type { Filter } from '../../types/filter.js'
|
@@ -31,7 +31,7 @@ export async function createPendingTransactionFilter<
|
|
31
31
|
TTransport extends Transport,
|
32
32
|
TChain extends Chain | undefined,
|
33
33
|
>(
|
34
|
-
client:
|
34
|
+
client: Client<TTransport, TChain>,
|
35
35
|
): Promise<CreatePendingTransactionFilterReturnType> {
|
36
36
|
const getRequest = createFilterRequestScope(client, {
|
37
37
|
method: 'eth_newPendingTransactionFilter',
|
@@ -2,7 +2,7 @@ import type { Abi } from 'abitype'
|
|
2
2
|
|
3
3
|
import type { Account } from '../../accounts/types.js'
|
4
4
|
import { parseAccount } from '../../accounts/utils/parseAccount.js'
|
5
|
-
import type {
|
5
|
+
import type { Client } from '../../clients/createClient.js'
|
6
6
|
import type { Transport } from '../../clients/transports/createTransport.js'
|
7
7
|
import type { BaseError } from '../../errors/base.js'
|
8
8
|
import type { Chain } from '../../types/chain.js'
|
@@ -12,8 +12,6 @@ import {
|
|
12
12
|
encodeFunctionData,
|
13
13
|
} from '../../utils/abi/encodeFunctionData.js'
|
14
14
|
import { getContractError } from '../../utils/errors/getContractError.js'
|
15
|
-
|
16
|
-
import type { WalletClient } from '../../clients/createWalletClient.js'
|
17
15
|
import { type EstimateGasParameters, estimateGas } from './estimateGas.js'
|
18
16
|
|
19
17
|
export type EstimateContractGasParameters<
|
@@ -66,9 +64,7 @@ export async function estimateContractGas<
|
|
66
64
|
TChain extends Chain | undefined,
|
67
65
|
TAccount extends Account | undefined = undefined,
|
68
66
|
>(
|
69
|
-
client:
|
70
|
-
| PublicClient<Transport, TChain>
|
71
|
-
| WalletClient<Transport, TChain, TAccount>,
|
67
|
+
client: Client<Transport, TChain, TAccount>,
|
72
68
|
{
|
73
69
|
abi,
|
74
70
|
address,
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import type { Account } from '../../accounts/types.js'
|
2
2
|
import { parseAccount } from '../../accounts/utils/parseAccount.js'
|
3
|
-
import type {
|
4
|
-
import type { WalletClient } from '../../clients/createWalletClient.js'
|
3
|
+
import type { Client } from '../../clients/createClient.js'
|
5
4
|
import type { Transport } from '../../clients/transports/createTransport.js'
|
6
5
|
import { AccountNotFoundError } from '../../errors/account.js'
|
7
6
|
import type { BaseError } from '../../errors/base.js'
|
@@ -75,12 +74,10 @@ export async function estimateGas<
|
|
75
74
|
TChain extends Chain | undefined,
|
76
75
|
TAccount extends Account | undefined = undefined,
|
77
76
|
>(
|
78
|
-
client:
|
79
|
-
| PublicClient<Transport, TChain>
|
80
|
-
| WalletClient<Transport, TChain, TAccount>,
|
77
|
+
client: Client<Transport, TChain, TAccount>,
|
81
78
|
args: EstimateGasParameters<TChain, TAccount>,
|
82
79
|
): Promise<EstimateGasReturnType> {
|
83
|
-
const account_ = args.account ??
|
80
|
+
const account_ = args.account ?? client.account
|
84
81
|
if (!account_)
|
85
82
|
throw new AccountNotFoundError({
|
86
83
|
docsPath: '/docs/actions/public/estimateGas',
|
@@ -126,7 +123,7 @@ export async function estimateGas<
|
|
126
123
|
value,
|
127
124
|
} as TransactionRequest)
|
128
125
|
|
129
|
-
const balance = await
|
126
|
+
const balance = await client.request({
|
130
127
|
method: 'eth_estimateGas',
|
131
128
|
params: block ? [request, block] : [request],
|
132
129
|
})
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { Address } from 'abitype'
|
2
2
|
|
3
|
-
import type {
|
3
|
+
import type { Client } from '../../clients/createClient.js'
|
4
4
|
import type { Transport } from '../../clients/transports/createTransport.js'
|
5
5
|
import type { BlockTag } from '../../types/block.js'
|
6
6
|
import type { Chain } from '../../types/chain.js'
|
@@ -60,7 +60,7 @@ export type GetBalanceReturnType = bigint
|
|
60
60
|
* // 10000000000000000000000n (wei)
|
61
61
|
*/
|
62
62
|
export async function getBalance<TChain extends Chain | undefined>(
|
63
|
-
client:
|
63
|
+
client: Client<Transport, TChain>,
|
64
64
|
{ address, blockNumber, blockTag = 'latest' }: GetBalanceParameters,
|
65
65
|
): Promise<GetBalanceReturnType> {
|
66
66
|
const blockNumberHex = blockNumber ? numberToHex(blockNumber) : undefined
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import type { Account } from '../../accounts/types.js'
|
2
|
-
import type {
|
3
|
-
import type { WalletClient } from '../../clients/createWalletClient.js'
|
2
|
+
import type { Client } from '../../clients/createClient.js'
|
4
3
|
import type { Transport } from '../../clients/transports/createTransport.js'
|
5
4
|
import { BlockNotFoundError } from '../../errors/block.js'
|
6
5
|
import type { BlockTag } from '../../types/block.js'
|
@@ -72,9 +71,7 @@ export async function getBlock<
|
|
72
71
|
TChain extends Chain | undefined,
|
73
72
|
TAccount extends Account | undefined,
|
74
73
|
>(
|
75
|
-
client:
|
76
|
-
| PublicClient<Transport, TChain>
|
77
|
-
| WalletClient<Transport, TChain, TAccount>,
|
74
|
+
client: Client<Transport, TChain, TAccount>,
|
78
75
|
{
|
79
76
|
blockHash,
|
80
77
|
blockNumber,
|
@@ -87,12 +84,12 @@ export async function getBlock<
|
|
87
84
|
|
88
85
|
let block: RpcBlock | null = null
|
89
86
|
if (blockHash) {
|
90
|
-
block = await
|
87
|
+
block = await client.request({
|
91
88
|
method: 'eth_getBlockByHash',
|
92
89
|
params: [blockHash, includeTransactions],
|
93
90
|
})
|
94
91
|
} else {
|
95
|
-
block = await
|
92
|
+
block = await client.request({
|
96
93
|
method: 'eth_getBlockByNumber',
|
97
94
|
params: [blockNumberHex || blockTag, includeTransactions],
|
98
95
|
})
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { Client } from '../../clients/createClient.js'
|
2
2
|
import type { Transport } from '../../clients/transports/createTransport.js'
|
3
3
|
import type { Chain } from '../../types/chain.js'
|
4
4
|
import { getCache, withCache } from '../../utils/promise/withCache.js'
|
@@ -40,7 +40,7 @@ export function getBlockNumberCache(id: string) {
|
|
40
40
|
* // 69420n
|
41
41
|
*/
|
42
42
|
export async function getBlockNumber<TChain extends Chain | undefined>(
|
43
|
-
client:
|
43
|
+
client: Client<Transport, TChain>,
|
44
44
|
{ maxAge = client.pollingInterval }: GetBlockNumberParameters = {},
|
45
45
|
): Promise<GetBlockNumberReturnType> {
|
46
46
|
const blockNumberHex = await withCache(
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { Client } from '../../clients/createClient.js'
|
2
2
|
import type { Transport } from '../../clients/transports/createTransport.js'
|
3
3
|
import type { BlockTag } from '../../types/block.js'
|
4
4
|
import type { Chain } from '../../types/chain.js'
|
@@ -55,7 +55,7 @@ export type GetBlockTransactionCountReturnType = number
|
|
55
55
|
export async function getBlockTransactionCount<
|
56
56
|
TChain extends Chain | undefined,
|
57
57
|
>(
|
58
|
-
client:
|
58
|
+
client: Client<Transport, TChain>,
|
59
59
|
{
|
60
60
|
blockHash,
|
61
61
|
blockNumber,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { Address } from 'abitype'
|
2
2
|
|
3
|
-
import type {
|
3
|
+
import type { Client } from '../../clients/createClient.js'
|
4
4
|
import type { Transport } from '../../clients/transports/createTransport.js'
|
5
5
|
import type { BlockTag } from '../../types/block.js'
|
6
6
|
import type { Chain } from '../../types/chain.js'
|
@@ -46,7 +46,7 @@ export type GetBytecodeReturnType = Hex | undefined
|
|
46
46
|
* })
|
47
47
|
*/
|
48
48
|
export async function getBytecode<TChain extends Chain | undefined>(
|
49
|
-
client:
|
49
|
+
client: Client<Transport, TChain>,
|
50
50
|
{ address, blockNumber, blockTag = 'latest' }: GetBytecodeParameters,
|
51
51
|
): Promise<GetBytecodeReturnType> {
|
52
52
|
const blockNumberHex =
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import type { Account } from '../../accounts/types.js'
|
2
|
-
import type {
|
3
|
-
import type { WalletClient } from '../../clients/createWalletClient.js'
|
2
|
+
import type { Client } from '../../clients/createClient.js'
|
4
3
|
import type { Transport } from '../../clients/transports/createTransport.js'
|
5
4
|
import type { Chain } from '../../types/chain.js'
|
6
5
|
import { hexToNumber } from '../../utils/encoding/fromHex.js'
|
@@ -31,12 +30,8 @@ export type GetChainIdReturnType = number
|
|
31
30
|
export async function getChainId<
|
32
31
|
TChain extends Chain | undefined,
|
33
32
|
TAccount extends Account | undefined,
|
34
|
-
>(
|
35
|
-
client
|
36
|
-
| PublicClient<Transport, TChain>
|
37
|
-
| WalletClient<Transport, TChain, TAccount>,
|
38
|
-
): Promise<GetChainIdReturnType> {
|
39
|
-
const chainIdHex = await (client as PublicClient).request({
|
33
|
+
>(client: Client<Transport, TChain, TAccount>): Promise<GetChainIdReturnType> {
|
34
|
+
const chainIdHex = await client.request({
|
40
35
|
method: 'eth_chainId',
|
41
36
|
})
|
42
37
|
return hexToNumber(chainIdHex)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { Client } from '../../clients/createClient.js'
|
2
2
|
import type { Transport } from '../../clients/transports/createTransport.js'
|
3
3
|
import type { BlockTag } from '../../types/block.js'
|
4
4
|
import type { Chain } from '../../types/chain.js'
|
@@ -57,7 +57,7 @@ export type GetFeeHistoryReturnType = FeeHistory
|
|
57
57
|
* })
|
58
58
|
*/
|
59
59
|
export async function getFeeHistory<TChain extends Chain | undefined>(
|
60
|
-
client:
|
60
|
+
client: Client<Transport, TChain>,
|
61
61
|
{
|
62
62
|
blockCount,
|
63
63
|
blockNumber,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { Abi, AbiEvent, ExtractAbiEvent } from 'abitype'
|
2
2
|
|
3
|
-
import type {
|
3
|
+
import type { Client } from '../../clients/createClient.js'
|
4
4
|
import type { Transport } from '../../clients/transports/createTransport.js'
|
5
5
|
import {
|
6
6
|
DecodeLogDataMismatch,
|
@@ -126,7 +126,7 @@ export async function getFilterChanges<
|
|
126
126
|
TEventName extends string | undefined,
|
127
127
|
TStrict extends boolean | undefined = undefined,
|
128
128
|
>(
|
129
|
-
_client:
|
129
|
+
_client: Client<TTransport, TChain>,
|
130
130
|
{
|
131
131
|
filter,
|
132
132
|
}: GetFilterChangesParameters<TFilterType, TAbi, TEventName, TStrict>,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { Abi, AbiEvent, ExtractAbiEvent } from 'abitype'
|
2
2
|
|
3
|
-
import type {
|
3
|
+
import type { Client } from '../../clients/createClient.js'
|
4
4
|
import type { Transport } from '../../clients/transports/createTransport.js'
|
5
5
|
import {
|
6
6
|
DecodeLogDataMismatch,
|
@@ -63,7 +63,7 @@ export async function getFilterLogs<
|
|
63
63
|
TEventName extends string | undefined,
|
64
64
|
TStrict extends boolean | undefined = undefined,
|
65
65
|
>(
|
66
|
-
_client:
|
66
|
+
_client: Client<Transport, TChain>,
|
67
67
|
{ filter }: GetFilterLogsParameters<TAbi, TEventName, TStrict>,
|
68
68
|
): Promise<GetFilterLogsReturnType<TAbi, TEventName, TStrict>> {
|
69
69
|
const strict = filter.strict ?? false
|