viem 0.3.5 → 0.3.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/dist/cjs/errors/version.js +1 -1
- package/dist/esm/errors/version.js +1 -1
- package/dist/types/abi.d.ts +3 -0
- package/dist/types/abi.d.ts.map +1 -0
- package/dist/types/accounts/generateMnemonic.d.ts +9 -0
- package/dist/types/accounts/generateMnemonic.d.ts.map +1 -0
- package/dist/types/accounts/generatePrivateKey.d.ts +8 -0
- package/dist/types/accounts/generatePrivateKey.d.ts.map +1 -0
- package/dist/types/accounts/hdKeyToAccount.d.ts +9 -0
- package/dist/types/accounts/hdKeyToAccount.d.ts.map +1 -0
- package/dist/types/accounts/index.d.ts +21 -0
- package/dist/types/accounts/index.d.ts.map +1 -0
- package/dist/types/accounts/mnemonicToAccount.d.ts +8 -0
- package/dist/types/accounts/mnemonicToAccount.d.ts.map +1 -0
- package/dist/types/accounts/privateKeyToAccount.d.ts +9 -0
- package/dist/types/accounts/privateKeyToAccount.d.ts.map +1 -0
- package/dist/types/accounts/toAccount.d.ts +11 -0
- package/dist/types/accounts/toAccount.d.ts.map +1 -0
- package/dist/types/accounts/types.d.ts +45 -0
- package/dist/types/accounts/types.d.ts.map +1 -0
- package/dist/types/accounts/utils/index.d.ts +10 -0
- package/dist/types/accounts/utils/index.d.ts.map +1 -0
- package/dist/types/accounts/utils/parseAccount.d.ts +4 -0
- package/dist/types/accounts/utils/parseAccount.d.ts.map +1 -0
- package/dist/types/accounts/utils/publicKeyToAddress.d.ts +10 -0
- package/dist/types/accounts/utils/publicKeyToAddress.d.ts.map +1 -0
- package/dist/types/accounts/utils/sign.d.ts +16 -0
- package/dist/types/accounts/utils/sign.d.ts.map +1 -0
- package/dist/types/accounts/utils/signMessage.d.ts +16 -0
- package/dist/types/accounts/utils/signMessage.d.ts.map +1 -0
- package/dist/types/accounts/utils/signTransaction.d.ts +9 -0
- package/dist/types/accounts/utils/signTransaction.d.ts.map +1 -0
- package/dist/types/accounts/utils/signTypedData.d.ts +19 -0
- package/dist/types/accounts/utils/signTypedData.d.ts.map +1 -0
- package/dist/types/accounts/utils/signatureToHex.d.ts +3 -0
- package/dist/types/accounts/utils/signatureToHex.d.ts.map +1 -0
- package/dist/types/accounts/wordlists/czech.d.ts +2 -0
- package/dist/types/accounts/wordlists/czech.d.ts.map +1 -0
- package/dist/types/accounts/wordlists/english.d.ts +2 -0
- package/dist/types/accounts/wordlists/english.d.ts.map +1 -0
- package/dist/types/accounts/wordlists/french.d.ts +2 -0
- package/dist/types/accounts/wordlists/french.d.ts.map +1 -0
- package/dist/types/accounts/wordlists/italian.d.ts +2 -0
- package/dist/types/accounts/wordlists/italian.d.ts.map +1 -0
- package/dist/types/accounts/wordlists/japanese.d.ts +2 -0
- package/dist/types/accounts/wordlists/japanese.d.ts.map +1 -0
- package/dist/types/accounts/wordlists/korean.d.ts +2 -0
- package/dist/types/accounts/wordlists/korean.d.ts.map +1 -0
- package/dist/types/accounts/wordlists/simplifiedChinese.d.ts +2 -0
- package/dist/types/accounts/wordlists/simplifiedChinese.d.ts.map +1 -0
- package/dist/types/accounts/wordlists/spanish.d.ts +2 -0
- package/dist/types/accounts/wordlists/spanish.d.ts.map +1 -0
- package/dist/types/accounts/wordlists/traditionalChinese.d.ts +2 -0
- package/dist/types/accounts/wordlists/traditionalChinese.d.ts.map +1 -0
- package/dist/types/actions/ens/getEnsAddress.d.ts +40 -0
- package/dist/types/actions/ens/getEnsAddress.d.ts.map +1 -0
- package/dist/types/actions/ens/getEnsAvatar.d.ts +38 -0
- package/dist/types/actions/ens/getEnsAvatar.d.ts.map +1 -0
- package/dist/types/actions/ens/getEnsName.d.ts +38 -0
- package/dist/types/actions/ens/getEnsName.d.ts.map +1 -0
- package/dist/types/actions/ens/getEnsResolver.d.ts +40 -0
- package/dist/types/actions/ens/getEnsResolver.d.ts.map +1 -0
- package/dist/types/actions/ens/getEnsText.d.ts +43 -0
- package/dist/types/actions/ens/getEnsText.d.ts.map +1 -0
- package/dist/types/actions/ens/index.d.ts +6 -0
- package/dist/types/actions/ens/index.d.ts.map +1 -0
- package/dist/types/actions/getContract.d.ts +261 -0
- package/dist/types/actions/getContract.d.ts.map +1 -0
- package/dist/types/actions/index.d.ts +11 -0
- package/dist/types/actions/index.d.ts.map +1 -0
- package/dist/types/actions/public/call.d.ts +49 -0
- package/dist/types/actions/public/call.d.ts.map +1 -0
- package/dist/types/actions/public/createBlockFilter.d.ts +26 -0
- package/dist/types/actions/public/createBlockFilter.d.ts.map +1 -0
- package/dist/types/actions/public/createContractEventFilter.d.ts +41 -0
- package/dist/types/actions/public/createContractEventFilter.d.ts.map +1 -0
- package/dist/types/actions/public/createEventFilter.d.ts +46 -0
- package/dist/types/actions/public/createEventFilter.d.ts.map +1 -0
- package/dist/types/actions/public/createPendingTransactionFilter.d.ts +26 -0
- package/dist/types/actions/public/createPendingTransactionFilter.d.ts.map +1 -0
- package/dist/types/actions/public/estimateContractGas.d.ts +35 -0
- package/dist/types/actions/public/estimateContractGas.d.ts.map +1 -0
- package/dist/types/actions/public/estimateGas.d.ts +45 -0
- package/dist/types/actions/public/estimateGas.d.ts.map +1 -0
- package/dist/types/actions/public/getBalance.d.ts +52 -0
- package/dist/types/actions/public/getBalance.d.ts.map +1 -0
- package/dist/types/actions/public/getBlock.d.ts +52 -0
- package/dist/types/actions/public/getBlock.d.ts.map +1 -0
- package/dist/types/actions/public/getBlockNumber.d.ts +54 -0
- package/dist/types/actions/public/getBlockNumber.d.ts.map +1 -0
- package/dist/types/actions/public/getBlockTransactionCount.d.ts +44 -0
- package/dist/types/actions/public/getBlockTransactionCount.d.ts.map +1 -0
- package/dist/types/actions/public/getBytecode.d.ts +37 -0
- package/dist/types/actions/public/getBytecode.d.ts.map +1 -0
- package/dist/types/actions/public/getChainId.d.ts +26 -0
- package/dist/types/actions/public/getChainId.d.ts.map +1 -0
- package/dist/types/actions/public/getFeeHistory.d.ts +50 -0
- package/dist/types/actions/public/getFeeHistory.d.ts.map +1 -0
- package/dist/types/actions/public/getFilterChanges.d.ts +91 -0
- package/dist/types/actions/public/getFilterChanges.d.ts.map +1 -0
- package/dist/types/actions/public/getFilterLogs.d.ts +36 -0
- package/dist/types/actions/public/getFilterLogs.d.ts.map +1 -0
- package/dist/types/actions/public/getGasPrice.d.ts +25 -0
- package/dist/types/actions/public/getGasPrice.d.ts.map +1 -0
- package/dist/types/actions/public/getLogs.d.ts +49 -0
- package/dist/types/actions/public/getLogs.d.ts.map +1 -0
- package/dist/types/actions/public/getStorageAt.d.ts +39 -0
- package/dist/types/actions/public/getStorageAt.d.ts.map +1 -0
- package/dist/types/actions/public/getTransaction.d.ts +62 -0
- package/dist/types/actions/public/getTransaction.d.ts.map +1 -0
- package/dist/types/actions/public/getTransactionConfirmations.d.ts +39 -0
- package/dist/types/actions/public/getTransactionConfirmations.d.ts.map +1 -0
- package/dist/types/actions/public/getTransactionCount.d.ts +40 -0
- package/dist/types/actions/public/getTransactionCount.d.ts.map +1 -0
- package/dist/types/actions/public/getTransactionReceipt.d.ts +34 -0
- package/dist/types/actions/public/getTransactionReceipt.d.ts.map +1 -0
- package/dist/types/actions/public/index.d.ts +67 -0
- package/dist/types/actions/public/index.d.ts.map +1 -0
- package/dist/types/actions/public/multicall.d.ts +52 -0
- package/dist/types/actions/public/multicall.d.ts.map +1 -0
- package/dist/types/actions/public/readContract.d.ts +39 -0
- package/dist/types/actions/public/readContract.d.ts.map +1 -0
- package/dist/types/actions/public/simulateContract.d.ts +47 -0
- package/dist/types/actions/public/simulateContract.d.ts.map +1 -0
- package/dist/types/actions/public/uninstallFilter.d.ts +32 -0
- package/dist/types/actions/public/uninstallFilter.d.ts.map +1 -0
- package/dist/types/actions/public/waitForTransactionReceipt.d.ts +69 -0
- package/dist/types/actions/public/waitForTransactionReceipt.d.ts.map +1 -0
- package/dist/types/actions/public/watchBlockNumber.d.ts +57 -0
- package/dist/types/actions/public/watchBlockNumber.d.ts.map +1 -0
- package/dist/types/actions/public/watchBlocks.d.ts +64 -0
- package/dist/types/actions/public/watchBlocks.d.ts.map +1 -0
- package/dist/types/actions/public/watchContractEvent.d.ts +55 -0
- package/dist/types/actions/public/watchContractEvent.d.ts.map +1 -0
- package/dist/types/actions/public/watchEvent.d.ts +61 -0
- package/dist/types/actions/public/watchEvent.d.ts.map +1 -0
- package/dist/types/actions/public/watchPendingTransactions.d.ts +71 -0
- package/dist/types/actions/public/watchPendingTransactions.d.ts.map +1 -0
- package/dist/types/actions/test/dropTransaction.d.ts +30 -0
- package/dist/types/actions/test/dropTransaction.d.ts.map +1 -0
- package/dist/types/actions/test/getAutomine.d.ts +25 -0
- package/dist/types/actions/test/getAutomine.d.ts.map +1 -0
- package/dist/types/actions/test/getTxpoolContent.d.ts +31 -0
- package/dist/types/actions/test/getTxpoolContent.d.ts.map +1 -0
- package/dist/types/actions/test/getTxpoolStatus.d.ts +28 -0
- package/dist/types/actions/test/getTxpoolStatus.d.ts.map +1 -0
- package/dist/types/actions/test/impersonateAccount.d.ts +30 -0
- package/dist/types/actions/test/impersonateAccount.d.ts.map +1 -0
- package/dist/types/actions/test/increaseTime.d.ts +30 -0
- package/dist/types/actions/test/increaseTime.d.ts.map +1 -0
- package/dist/types/actions/test/index.d.ts +52 -0
- package/dist/types/actions/test/index.d.ts.map +1 -0
- package/dist/types/actions/test/inspectTxpool.d.ts +28 -0
- package/dist/types/actions/test/inspectTxpool.d.ts.map +1 -0
- package/dist/types/actions/test/mine.d.ts +30 -0
- package/dist/types/actions/test/mine.d.ts.map +1 -0
- package/dist/types/actions/test/removeBlockTimestampInterval.d.ts +23 -0
- package/dist/types/actions/test/removeBlockTimestampInterval.d.ts.map +1 -0
- package/dist/types/actions/test/reset.d.ts +30 -0
- package/dist/types/actions/test/reset.d.ts.map +1 -0
- package/dist/types/actions/test/revert.d.ts +28 -0
- package/dist/types/actions/test/revert.d.ts.map +1 -0
- package/dist/types/actions/test/sendUnsignedTransaction.d.ts +31 -0
- package/dist/types/actions/test/sendUnsignedTransaction.d.ts.map +1 -0
- package/dist/types/actions/test/setAutomine.d.ts +23 -0
- package/dist/types/actions/test/setAutomine.d.ts.map +1 -0
- package/dist/types/actions/test/setBalance.d.ts +33 -0
- package/dist/types/actions/test/setBalance.d.ts.map +1 -0
- package/dist/types/actions/test/setBlockGasLimit.d.ts +28 -0
- package/dist/types/actions/test/setBlockGasLimit.d.ts.map +1 -0
- package/dist/types/actions/test/setBlockTimestampInterval.d.ts +28 -0
- package/dist/types/actions/test/setBlockTimestampInterval.d.ts.map +1 -0
- package/dist/types/actions/test/setCode.d.ts +33 -0
- package/dist/types/actions/test/setCode.d.ts.map +1 -0
- package/dist/types/actions/test/setCoinbase.d.ts +30 -0
- package/dist/types/actions/test/setCoinbase.d.ts.map +1 -0
- package/dist/types/actions/test/setIntervalMining.d.ts +28 -0
- package/dist/types/actions/test/setIntervalMining.d.ts.map +1 -0
- package/dist/types/actions/test/setLoggingEnabled.d.ts +23 -0
- package/dist/types/actions/test/setLoggingEnabled.d.ts.map +1 -0
- package/dist/types/actions/test/setMinGasPrice.d.ts +32 -0
- package/dist/types/actions/test/setMinGasPrice.d.ts.map +1 -0
- package/dist/types/actions/test/setNextBlockBaseFeePerGas.d.ts +30 -0
- package/dist/types/actions/test/setNextBlockBaseFeePerGas.d.ts.map +1 -0
- package/dist/types/actions/test/setNextBlockTimestamp.d.ts +28 -0
- package/dist/types/actions/test/setNextBlockTimestamp.d.ts.map +1 -0
- package/dist/types/actions/test/setNonce.d.ts +33 -0
- package/dist/types/actions/test/setNonce.d.ts.map +1 -0
- package/dist/types/actions/test/setRpcUrl.d.ts +24 -0
- package/dist/types/actions/test/setRpcUrl.d.ts.map +1 -0
- package/dist/types/actions/test/setStorageAt.d.ts +36 -0
- package/dist/types/actions/test/setStorageAt.d.ts.map +1 -0
- package/dist/types/actions/test/snapshot.d.ts +23 -0
- package/dist/types/actions/test/snapshot.d.ts.map +1 -0
- package/dist/types/actions/test/stopImpersonatingAccount.d.ts +30 -0
- package/dist/types/actions/test/stopImpersonatingAccount.d.ts.map +1 -0
- package/dist/types/actions/wallet/addChain.d.ts +27 -0
- package/dist/types/actions/wallet/addChain.d.ts.map +1 -0
- package/dist/types/actions/wallet/deployContract.d.ts +38 -0
- package/dist/types/actions/wallet/deployContract.d.ts.map +1 -0
- package/dist/types/actions/wallet/getAddresses.d.ts +26 -0
- package/dist/types/actions/wallet/getAddresses.d.ts.map +1 -0
- package/dist/types/actions/wallet/getPermissions.d.ts +26 -0
- package/dist/types/actions/wallet/getPermissions.d.ts.map +1 -0
- package/dist/types/actions/wallet/index.d.ts +27 -0
- package/dist/types/actions/wallet/index.d.ts.map +1 -0
- package/dist/types/actions/wallet/requestAddresses.d.ts +30 -0
- package/dist/types/actions/wallet/requestAddresses.d.ts.map +1 -0
- package/dist/types/actions/wallet/requestPermissions.d.ts +34 -0
- package/dist/types/actions/wallet/requestPermissions.d.ts.map +1 -0
- package/dist/types/actions/wallet/sendTransaction.d.ts +53 -0
- package/dist/types/actions/wallet/sendTransaction.d.ts.map +1 -0
- package/dist/types/actions/wallet/signMessage.d.ts +54 -0
- package/dist/types/actions/wallet/signMessage.d.ts.map +1 -0
- package/dist/types/actions/wallet/signTypedData.d.ts +109 -0
- package/dist/types/actions/wallet/signTypedData.d.ts.map +1 -0
- package/dist/types/actions/wallet/switchChain.d.ts +28 -0
- package/dist/types/actions/wallet/switchChain.d.ts.map +1 -0
- package/dist/types/actions/wallet/watchAsset.d.ts +35 -0
- package/dist/types/actions/wallet/watchAsset.d.ts.map +1 -0
- package/dist/types/actions/wallet/writeContract.d.ts +58 -0
- package/dist/types/actions/wallet/writeContract.d.ts.map +1 -0
- package/dist/types/adapters/ethers.d.ts +27 -0
- package/dist/types/adapters/ethers.d.ts.map +1 -0
- package/dist/types/chains.d.ts +2487 -0
- package/dist/types/chains.d.ts.map +1 -0
- package/dist/types/clients/createClient.d.ts +43 -0
- package/dist/types/clients/createClient.d.ts.map +1 -0
- package/dist/types/clients/createPublicClient.d.ts +40 -0
- package/dist/types/clients/createPublicClient.d.ts.map +1 -0
- package/dist/types/clients/createTestClient.d.ts +38 -0
- package/dist/types/clients/createTestClient.d.ts.map +1 -0
- package/dist/types/clients/createWalletClient.d.ts +51 -0
- package/dist/types/clients/createWalletClient.d.ts.map +1 -0
- package/dist/types/clients/decorators/index.d.ts +7 -0
- package/dist/types/clients/decorators/index.d.ts.map +1 -0
- package/dist/types/clients/decorators/public.d.ts +1043 -0
- package/dist/types/clients/decorators/public.d.ts.map +1 -0
- package/dist/types/clients/decorators/test.d.ts +572 -0
- package/dist/types/clients/decorators/test.d.ts.map +1 -0
- package/dist/types/clients/decorators/wallet.d.ts +436 -0
- package/dist/types/clients/decorators/wallet.d.ts.map +1 -0
- package/dist/types/clients/index.d.ts +11 -0
- package/dist/types/clients/index.d.ts.map +1 -0
- package/dist/types/clients/transports/createTransport.d.ts +37 -0
- package/dist/types/clients/transports/createTransport.d.ts.map +1 -0
- package/dist/types/clients/transports/custom.d.ts +21 -0
- package/dist/types/clients/transports/custom.d.ts.map +1 -0
- package/dist/types/clients/transports/fallback.d.ts +75 -0
- package/dist/types/clients/transports/fallback.d.ts.map +1 -0
- package/dist/types/clients/transports/http.d.ts +29 -0
- package/dist/types/clients/transports/http.d.ts.map +1 -0
- package/dist/types/clients/transports/index.d.ts +11 -0
- package/dist/types/clients/transports/index.d.ts.map +1 -0
- package/dist/types/clients/transports/webSocket.d.ts +46 -0
- package/dist/types/clients/transports/webSocket.d.ts.map +1 -0
- package/dist/types/constants/abis.d.ts +79 -0
- package/dist/types/constants/abis.d.ts.map +1 -0
- package/dist/types/constants/contract.d.ts +2 -0
- package/dist/types/constants/contract.d.ts.map +1 -0
- package/dist/types/constants/index.d.ts +5 -0
- package/dist/types/constants/index.d.ts.map +1 -0
- package/dist/types/constants/solidity.d.ts +15 -0
- package/dist/types/constants/solidity.d.ts.map +1 -0
- package/dist/types/constants/unit.d.ts +13 -0
- package/dist/types/constants/unit.d.ts.map +1 -0
- package/dist/types/contract.d.ts +7 -0
- package/dist/types/contract.d.ts.map +1 -0
- package/dist/types/ens.d.ts +5 -0
- package/dist/types/ens.d.ts.map +1 -0
- package/dist/types/errors/abi.d.ts +165 -0
- package/dist/types/errors/abi.d.ts.map +1 -0
- package/dist/types/errors/account.d.ts +8 -0
- package/dist/types/errors/account.d.ts.map +1 -0
- package/dist/types/errors/address.d.ts +8 -0
- package/dist/types/errors/address.d.ts.map +1 -0
- package/dist/types/errors/base.d.ts +22 -0
- package/dist/types/errors/base.d.ts.map +1 -0
- package/dist/types/errors/block.d.ts +10 -0
- package/dist/types/errors/block.d.ts.map +1 -0
- package/dist/types/errors/chain.d.ts +35 -0
- package/dist/types/errors/chain.d.ts.map +1 -0
- package/dist/types/errors/contract.d.ts +58 -0
- package/dist/types/errors/contract.d.ts.map +1 -0
- package/dist/types/errors/data.d.ts +10 -0
- package/dist/types/errors/data.d.ts.map +1 -0
- package/dist/types/errors/encoding.d.ts +53 -0
- package/dist/types/errors/encoding.d.ts.map +1 -0
- package/dist/types/errors/ens.d.ts +26 -0
- package/dist/types/errors/ens.d.ts.map +1 -0
- package/dist/types/errors/estimateGas.d.ts +13 -0
- package/dist/types/errors/estimateGas.d.ts.map +1 -0
- package/dist/types/errors/index.d.ts +18 -0
- package/dist/types/errors/index.d.ts.map +1 -0
- package/dist/types/errors/log.d.ts +6 -0
- package/dist/types/errors/log.d.ts.map +1 -0
- package/dist/types/errors/node.d.ts +105 -0
- package/dist/types/errors/node.d.ts.map +1 -0
- package/dist/types/errors/request.d.ts +53 -0
- package/dist/types/errors/request.d.ts.map +1 -0
- package/dist/types/errors/rpc.d.ts +199 -0
- package/dist/types/errors/rpc.d.ts.map +1 -0
- package/dist/types/errors/transaction.d.ts +75 -0
- package/dist/types/errors/transaction.d.ts.map +1 -0
- package/dist/types/errors/transport.d.ts +5 -0
- package/dist/types/errors/transport.d.ts.map +1 -0
- package/dist/types/errors/utils.d.ts +5 -0
- package/dist/types/errors/utils.d.ts.map +1 -0
- package/dist/types/errors/version.d.ts +2 -0
- package/dist/types/errors/version.d.ts.map +1 -0
- package/dist/types/ethers.d.ts +2 -0
- package/dist/types/ethers.d.ts.map +1 -0
- package/dist/types/index.d.ts +12 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/public.d.ts +3 -0
- package/dist/types/public.d.ts.map +1 -0
- package/dist/types/test.d.ts +3 -0
- package/dist/types/test.d.ts.map +1 -0
- package/dist/types/types/account.d.ts +11 -0
- package/dist/types/types/account.d.ts.map +1 -0
- package/dist/types/types/block.d.ts +62 -0
- package/dist/types/types/block.d.ts.map +1 -0
- package/dist/types/types/chain.d.ts +17 -0
- package/dist/types/types/chain.d.ts.map +1 -0
- package/dist/types/types/contract.d.ts +159 -0
- package/dist/types/types/contract.d.ts.map +1 -0
- package/dist/types/types/eip1193.d.ts +1002 -0
- package/dist/types/types/eip1193.d.ts.map +1 -0
- package/dist/types/types/ens.d.ts +5 -0
- package/dist/types/types/ens.d.ts.map +1 -0
- package/dist/types/types/fee.d.ts +28 -0
- package/dist/types/types/fee.d.ts.map +1 -0
- package/dist/types/types/filter.d.ts +27 -0
- package/dist/types/types/filter.d.ts.map +1 -0
- package/dist/types/types/formatter.d.ts +13 -0
- package/dist/types/types/formatter.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +19 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/types/log.d.ts +42 -0
- package/dist/types/types/log.d.ts.map +1 -0
- package/dist/types/types/misc.d.ts +10 -0
- package/dist/types/types/misc.d.ts.map +1 -0
- package/dist/types/types/multicall.d.ts +48 -0
- package/dist/types/types/multicall.d.ts.map +1 -0
- package/dist/types/types/rpc.d.ts +19 -0
- package/dist/types/types/rpc.d.ts.map +1 -0
- package/dist/types/types/transaction.d.ts +132 -0
- package/dist/types/types/transaction.d.ts.map +1 -0
- package/dist/types/types/transport.d.ts +3 -0
- package/dist/types/types/transport.d.ts.map +1 -0
- package/dist/types/types/typedData.d.ts +47 -0
- package/dist/types/types/typedData.d.ts.map +1 -0
- package/dist/types/types/utils.d.ts +156 -0
- package/dist/types/types/utils.d.ts.map +1 -0
- package/dist/types/types/window.d.ts +7 -0
- package/dist/types/types/window.d.ts.map +1 -0
- package/dist/types/utils/abi/decodeAbiParameters.d.ts +5 -0
- package/dist/types/utils/abi/decodeAbiParameters.d.ts.map +1 -0
- package/dist/types/utils/abi/decodeDeployData.d.ts +13 -0
- package/dist/types/utils/abi/decodeDeployData.d.ts.map +1 -0
- package/dist/types/utils/abi/decodeErrorResult.d.ts +13 -0
- package/dist/types/utils/abi/decodeErrorResult.d.ts.map +1 -0
- package/dist/types/utils/abi/decodeEventLog.d.ts +13 -0
- package/dist/types/utils/abi/decodeEventLog.d.ts.map +1 -0
- package/dist/types/utils/abi/decodeFunctionData.d.ts +14 -0
- package/dist/types/utils/abi/decodeFunctionData.d.ts.map +1 -0
- package/dist/types/utils/abi/decodeFunctionResult.d.ts +10 -0
- package/dist/types/utils/abi/decodeFunctionResult.d.ts.map +1 -0
- package/dist/types/utils/abi/encodeAbiParameters.d.ts +9 -0
- package/dist/types/utils/abi/encodeAbiParameters.d.ts.map +1 -0
- package/dist/types/utils/abi/encodeDeployData.d.ts +8 -0
- package/dist/types/utils/abi/encodeDeployData.d.ts.map +1 -0
- package/dist/types/utils/abi/encodeErrorResult.d.ts +8 -0
- package/dist/types/utils/abi/encodeErrorResult.d.ts.map +1 -0
- package/dist/types/utils/abi/encodeEventTopics.d.ts +9 -0
- package/dist/types/utils/abi/encodeEventTopics.d.ts.map +1 -0
- package/dist/types/utils/abi/encodeFunctionData.d.ts +8 -0
- package/dist/types/utils/abi/encodeFunctionData.d.ts.map +1 -0
- package/dist/types/utils/abi/encodeFunctionResult.d.ts +9 -0
- package/dist/types/utils/abi/encodeFunctionResult.d.ts.map +1 -0
- package/dist/types/utils/abi/encodePacked.d.ts +11 -0
- package/dist/types/utils/abi/encodePacked.d.ts.map +1 -0
- package/dist/types/utils/abi/formatAbiItem.d.ts +9 -0
- package/dist/types/utils/abi/formatAbiItem.d.ts.map +1 -0
- package/dist/types/utils/abi/formatAbiItemWithArgs.d.ts +8 -0
- package/dist/types/utils/abi/formatAbiItemWithArgs.d.ts.map +1 -0
- package/dist/types/utils/abi/getAbiItem.d.ts +12 -0
- package/dist/types/utils/abi/getAbiItem.d.ts.map +1 -0
- package/dist/types/utils/abi/index.d.ts +30 -0
- package/dist/types/utils/abi/index.d.ts.map +1 -0
- package/dist/types/utils/accounts.d.ts +3 -0
- package/dist/types/utils/accounts.d.ts.map +1 -0
- package/dist/types/utils/address/getAddress.d.ts +4 -0
- package/dist/types/utils/address/getAddress.d.ts.map +1 -0
- package/dist/types/utils/address/getContractAddress.d.ts +19 -0
- package/dist/types/utils/address/getContractAddress.d.ts.map +1 -0
- package/dist/types/utils/address/index.d.ts +6 -0
- package/dist/types/utils/address/index.d.ts.map +1 -0
- package/dist/types/utils/address/isAddress.d.ts +3 -0
- package/dist/types/utils/address/isAddress.d.ts.map +1 -0
- package/dist/types/utils/address/isAddressEqual.d.ts +3 -0
- package/dist/types/utils/address/isAddressEqual.d.ts.map +1 -0
- package/dist/types/utils/buildRequest.d.ts +6 -0
- package/dist/types/utils/buildRequest.d.ts.map +1 -0
- package/dist/types/utils/chain.d.ts +8 -0
- package/dist/types/utils/chain.d.ts.map +1 -0
- package/dist/types/utils/contract/extractFunctionParts.d.ts +13 -0
- package/dist/types/utils/contract/extractFunctionParts.d.ts.map +1 -0
- package/dist/types/utils/contract/index.d.ts +2 -0
- package/dist/types/utils/contract/index.d.ts.map +1 -0
- package/dist/types/utils/data/concat.d.ts +6 -0
- package/dist/types/utils/data/concat.d.ts.map +1 -0
- package/dist/types/utils/data/index.d.ts +8 -0
- package/dist/types/utils/data/index.d.ts.map +1 -0
- package/dist/types/utils/data/isBytes.d.ts +3 -0
- package/dist/types/utils/data/isBytes.d.ts.map +1 -0
- package/dist/types/utils/data/isHex.d.ts +3 -0
- package/dist/types/utils/data/isHex.d.ts.map +1 -0
- package/dist/types/utils/data/pad.d.ts +11 -0
- package/dist/types/utils/data/pad.d.ts.map +1 -0
- package/dist/types/utils/data/size.d.ts +9 -0
- package/dist/types/utils/data/size.d.ts.map +1 -0
- package/dist/types/utils/data/slice.d.ts +27 -0
- package/dist/types/utils/data/slice.d.ts.map +1 -0
- package/dist/types/utils/data/trim.d.ts +8 -0
- package/dist/types/utils/data/trim.d.ts.map +1 -0
- package/dist/types/utils/encoding/fromBytes.d.ts +110 -0
- package/dist/types/utils/encoding/fromBytes.d.ts.map +1 -0
- package/dist/types/utils/encoding/fromHex.d.ts +138 -0
- package/dist/types/utils/encoding/fromHex.d.ts.map +1 -0
- package/dist/types/utils/encoding/fromRlp.d.ts +6 -0
- package/dist/types/utils/encoding/fromRlp.d.ts.map +1 -0
- package/dist/types/utils/encoding/index.d.ts +8 -0
- package/dist/types/utils/encoding/index.d.ts.map +1 -0
- package/dist/types/utils/encoding/toBytes.d.ts +125 -0
- package/dist/types/utils/encoding/toBytes.d.ts.map +1 -0
- package/dist/types/utils/encoding/toHex.d.ts +139 -0
- package/dist/types/utils/encoding/toHex.d.ts.map +1 -0
- package/dist/types/utils/encoding/toRlp.d.ts +8 -0
- package/dist/types/utils/encoding/toRlp.d.ts.map +1 -0
- package/dist/types/utils/ens/avatar/index.d.ts +2 -0
- package/dist/types/utils/ens/avatar/index.d.ts.map +1 -0
- package/dist/types/utils/ens/avatar/parseAvatarRecord.d.ts +7 -0
- package/dist/types/utils/ens/avatar/parseAvatarRecord.d.ts.map +1 -0
- package/dist/types/utils/ens/avatar/utils.d.ts +34 -0
- package/dist/types/utils/ens/avatar/utils.d.ts.map +1 -0
- package/dist/types/utils/ens/index.d.ts +5 -0
- package/dist/types/utils/ens/index.d.ts.map +1 -0
- package/dist/types/utils/ens/labelhash.d.ts +11 -0
- package/dist/types/utils/ens/labelhash.d.ts.map +1 -0
- package/dist/types/utils/ens/namehash.d.ts +13 -0
- package/dist/types/utils/ens/namehash.d.ts.map +1 -0
- package/dist/types/utils/ens/normalize.d.ts +12 -0
- package/dist/types/utils/ens/normalize.d.ts.map +1 -0
- package/dist/types/utils/ens/packetToBytes.d.ts +3 -0
- package/dist/types/utils/ens/packetToBytes.d.ts.map +1 -0
- package/dist/types/utils/errors/getCallError.d.ts +9 -0
- package/dist/types/utils/errors/getCallError.d.ts.map +1 -0
- package/dist/types/utils/errors/getContractError.d.ts +13 -0
- package/dist/types/utils/errors/getContractError.d.ts.map +1 -0
- package/dist/types/utils/errors/getEstimateGasError.d.ts +10 -0
- package/dist/types/utils/errors/getEstimateGasError.d.ts.map +1 -0
- package/dist/types/utils/errors/getNodeError.d.ts +6 -0
- package/dist/types/utils/errors/getNodeError.d.ts.map +1 -0
- package/dist/types/utils/errors/getTransactionError.d.ts +10 -0
- package/dist/types/utils/errors/getTransactionError.d.ts.map +1 -0
- package/dist/types/utils/errors/index.d.ts +6 -0
- package/dist/types/utils/errors/index.d.ts.map +1 -0
- package/dist/types/utils/filters/createFilterRequestScope.d.ts +16 -0
- package/dist/types/utils/filters/createFilterRequestScope.d.ts.map +1 -0
- package/dist/types/utils/formatters/block.d.ts +14 -0
- package/dist/types/utils/formatters/block.d.ts.map +1 -0
- package/dist/types/utils/formatters/extract.d.ts +8 -0
- package/dist/types/utils/formatters/extract.d.ts.map +1 -0
- package/dist/types/utils/formatters/feeHistory.d.ts +3 -0
- package/dist/types/utils/formatters/feeHistory.d.ts.map +1 -0
- package/dist/types/utils/formatters/format.d.ts +36 -0
- package/dist/types/utils/formatters/format.d.ts.map +1 -0
- package/dist/types/utils/formatters/index.d.ts +13 -0
- package/dist/types/utils/formatters/index.d.ts.map +1 -0
- package/dist/types/utils/formatters/log.d.ts +16 -0
- package/dist/types/utils/formatters/log.d.ts.map +1 -0
- package/dist/types/utils/formatters/transaction.d.ts +19 -0
- package/dist/types/utils/formatters/transaction.d.ts.map +1 -0
- package/dist/types/utils/formatters/transactionReceipt.d.ts +14 -0
- package/dist/types/utils/formatters/transactionReceipt.d.ts.map +1 -0
- package/dist/types/utils/formatters/transactionRequest.d.ts +14 -0
- package/dist/types/utils/formatters/transactionRequest.d.ts.map +1 -0
- package/dist/types/utils/hash/getEventSelector.d.ts +3 -0
- package/dist/types/utils/hash/getEventSelector.d.ts.map +1 -0
- package/dist/types/utils/hash/getFunctionSelector.d.ts +2 -0
- package/dist/types/utils/hash/getFunctionSelector.d.ts.map +1 -0
- package/dist/types/utils/hash/hashFunction.d.ts +2 -0
- package/dist/types/utils/hash/hashFunction.d.ts.map +1 -0
- package/dist/types/utils/hash/index.d.ts +5 -0
- package/dist/types/utils/hash/index.d.ts.map +1 -0
- package/dist/types/utils/hash/isHash.d.ts +3 -0
- package/dist/types/utils/hash/isHash.d.ts.map +1 -0
- package/dist/types/utils/hash/keccak256.d.ts +6 -0
- package/dist/types/utils/hash/keccak256.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +26 -0
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/types/utils/observe.d.ts +17 -0
- package/dist/types/utils/observe.d.ts.map +1 -0
- package/dist/types/utils/poll.d.ts +13 -0
- package/dist/types/utils/poll.d.ts.map +1 -0
- package/dist/types/utils/promise/createBatchScheduler.d.ts +15 -0
- package/dist/types/utils/promise/createBatchScheduler.d.ts.map +1 -0
- package/dist/types/utils/promise/index.d.ts +5 -0
- package/dist/types/utils/promise/index.d.ts.map +1 -0
- package/dist/types/utils/promise/withCache.d.ts +36 -0
- package/dist/types/utils/promise/withCache.d.ts.map +1 -0
- package/dist/types/utils/promise/withRetry.d.ts +12 -0
- package/dist/types/utils/promise/withRetry.d.ts.map +1 -0
- package/dist/types/utils/promise/withTimeout.d.ts +8 -0
- package/dist/types/utils/promise/withTimeout.d.ts.map +1 -0
- package/dist/types/utils/regex.d.ts +4 -0
- package/dist/types/utils/regex.d.ts.map +1 -0
- package/dist/types/utils/rpc.d.ts +64 -0
- package/dist/types/utils/rpc.d.ts.map +1 -0
- package/dist/types/utils/signature/hashMessage.d.ts +6 -0
- package/dist/types/utils/signature/hashMessage.d.ts.map +1 -0
- package/dist/types/utils/signature/hashTypedData.d.ts +10 -0
- package/dist/types/utils/signature/hashTypedData.d.ts.map +1 -0
- package/dist/types/utils/signature/index.d.ts +16 -0
- package/dist/types/utils/signature/index.d.ts.map +1 -0
- package/dist/types/utils/signature/recoverAddress.d.ts +8 -0
- package/dist/types/utils/signature/recoverAddress.d.ts.map +1 -0
- package/dist/types/utils/signature/recoverMessageAddress.d.ts +8 -0
- package/dist/types/utils/signature/recoverMessageAddress.d.ts.map +1 -0
- package/dist/types/utils/signature/recoverPublicKey.d.ts +8 -0
- package/dist/types/utils/signature/recoverPublicKey.d.ts.map +1 -0
- package/dist/types/utils/signature/recoverTypedDataAddress.d.ts +12 -0
- package/dist/types/utils/signature/recoverTypedDataAddress.d.ts.map +1 -0
- package/dist/types/utils/signature/verifyMessage.d.ts +10 -0
- package/dist/types/utils/signature/verifyMessage.d.ts.map +1 -0
- package/dist/types/utils/signature/verifyTypedData.d.ts +13 -0
- package/dist/types/utils/signature/verifyTypedData.d.ts.map +1 -0
- package/dist/types/utils/stringify.d.ts +2 -0
- package/dist/types/utils/stringify.d.ts.map +1 -0
- package/dist/types/utils/transaction/assertRequest.d.ts +4 -0
- package/dist/types/utils/transaction/assertRequest.d.ts.map +1 -0
- package/dist/types/utils/transaction/assertTransaction.d.ts +5 -0
- package/dist/types/utils/transaction/assertTransaction.d.ts.map +1 -0
- package/dist/types/utils/transaction/getSerializedTransactionType.d.ts +4 -0
- package/dist/types/utils/transaction/getSerializedTransactionType.d.ts.map +1 -0
- package/dist/types/utils/transaction/getTransactionType.d.ts +4 -0
- package/dist/types/utils/transaction/getTransactionType.d.ts.map +1 -0
- package/dist/types/utils/transaction/index.d.ts +10 -0
- package/dist/types/utils/transaction/index.d.ts.map +1 -0
- package/dist/types/utils/transaction/parseTransaction.d.ts +5 -0
- package/dist/types/utils/transaction/parseTransaction.d.ts.map +1 -0
- package/dist/types/utils/transaction/prepareRequest.d.ts +21 -0
- package/dist/types/utils/transaction/prepareRequest.d.ts.map +1 -0
- package/dist/types/utils/transaction/serializeTransaction.d.ts +5 -0
- package/dist/types/utils/transaction/serializeTransaction.d.ts.map +1 -0
- package/dist/types/utils/typedData.d.ts +6 -0
- package/dist/types/utils/typedData.d.ts.map +1 -0
- package/dist/types/utils/uid.d.ts +2 -0
- package/dist/types/utils/uid.d.ts.map +1 -0
- package/dist/types/utils/unit/formatEther.d.ts +2 -0
- package/dist/types/utils/unit/formatEther.d.ts.map +1 -0
- package/dist/types/utils/unit/formatGwei.d.ts +2 -0
- package/dist/types/utils/unit/formatGwei.d.ts.map +1 -0
- package/dist/types/utils/unit/formatUnits.d.ts +2 -0
- package/dist/types/utils/unit/formatUnits.d.ts.map +1 -0
- package/dist/types/utils/unit/index.d.ts +7 -0
- package/dist/types/utils/unit/index.d.ts.map +1 -0
- package/dist/types/utils/unit/parseEther.d.ts +2 -0
- package/dist/types/utils/unit/parseEther.d.ts.map +1 -0
- package/dist/types/utils/unit/parseGwei.d.ts +2 -0
- package/dist/types/utils/unit/parseGwei.d.ts.map +1 -0
- package/dist/types/utils/unit/parseUnits.d.ts +2 -0
- package/dist/types/utils/unit/parseUnits.d.ts.map +1 -0
- package/dist/types/utils/wait.d.ts +2 -0
- package/dist/types/utils/wait.d.ts.map +1 -0
- package/dist/types/wallet.d.ts +3 -0
- package/dist/types/wallet.d.ts.map +1 -0
- package/dist/types/window.d.ts +2 -0
- package/dist/types/window.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/errors/version.ts +1 -1
@@ -0,0 +1,43 @@
|
|
1
|
+
import type { PublicClient, Transport } from '../../clients/index.js';
|
2
|
+
import type { Address, Chain, Prettify } from '../../types/index.js';
|
3
|
+
import type { ReadContractParameters } from '../public/index.js';
|
4
|
+
export type GetEnsTextParameters = Prettify<Pick<ReadContractParameters, 'blockNumber' | 'blockTag'> & {
|
5
|
+
/** ENS name to get Text for. */
|
6
|
+
name: string;
|
7
|
+
/** Text record to retrieve. */
|
8
|
+
key: string;
|
9
|
+
/** Address of ENS Universal Resolver Contract. */
|
10
|
+
universalResolverAddress?: Address;
|
11
|
+
}>;
|
12
|
+
export type GetEnsTextReturnType = string | null;
|
13
|
+
/**
|
14
|
+
* Gets a text record for specified ENS name.
|
15
|
+
*
|
16
|
+
* - Docs: https://viem.sh/docs/ens/actions/getEnsResolver.html
|
17
|
+
* - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/ens
|
18
|
+
*
|
19
|
+
* Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract.
|
20
|
+
*
|
21
|
+
* Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize.html) function for this.
|
22
|
+
*
|
23
|
+
* @param client - Client to use
|
24
|
+
* @param parameters - {@link GetEnsTextParameters}
|
25
|
+
* @returns Address for ENS resolver. {@link GetEnsTextReturnType}
|
26
|
+
*
|
27
|
+
* @example
|
28
|
+
* import { createPublicClient, http } from 'viem'
|
29
|
+
* import { mainnet } from 'viem/chains'
|
30
|
+
* import { getEnsText, normalize } from 'viem/ens'
|
31
|
+
*
|
32
|
+
* const client = createPublicClient({
|
33
|
+
* chain: mainnet,
|
34
|
+
* transport: http(),
|
35
|
+
* })
|
36
|
+
* const twitterRecord = await getEnsText(client, {
|
37
|
+
* name: normalize('wagmi-dev.eth'),
|
38
|
+
* key: 'com.twitter',
|
39
|
+
* })
|
40
|
+
* // 'wagmi_sh'
|
41
|
+
*/
|
42
|
+
export declare function getEnsText<TChain extends Chain | undefined>(client: PublicClient<Transport, TChain>, { blockNumber, blockTag, name, key, universalResolverAddress: universalResolverAddress_, }: GetEnsTextParameters): Promise<GetEnsTextReturnType>;
|
43
|
+
//# sourceMappingURL=getEnsText.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getEnsText.d.ts","sourceRoot":"","sources":["../../../../src/actions/ens/getEnsText.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAErE,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AASpE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAEhE,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CACzC,IAAI,CAAC,sBAAsB,EAAE,aAAa,GAAG,UAAU,CAAC,GAAG;IACzD,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,+BAA+B;IAC/B,GAAG,EAAE,MAAM,CAAA;IACX,kDAAkD;IAClD,wBAAwB,CAAC,EAAE,OAAO,CAAA;CACnC,CACF,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,IAAI,CAAA;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,UAAU,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EAC/D,MAAM,EAAE,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,EACvC,EACE,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,GAAG,EACH,wBAAwB,EAAE,yBAAyB,GACpD,EAAE,oBAAoB,GACtB,OAAO,CAAC,oBAAoB,CAAC,CAwC/B"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
export { getEnsAddress, type GetEnsAddressParameters, type GetEnsAddressReturnType, } from './getEnsAddress.js';
|
2
|
+
export { getEnsAvatar, type GetEnsAvatarParameters, type GetEnsAvatarReturnType, } from './getEnsAvatar.js';
|
3
|
+
export { getEnsName, type GetEnsNameParameters, type GetEnsNameReturnType, } from './getEnsName.js';
|
4
|
+
export { getEnsResolver, type GetEnsResolverParameters, type GetEnsResolverReturnType, } from './getEnsResolver.js';
|
5
|
+
export { getEnsText, type GetEnsTextParameters, type GetEnsTextReturnType, } from './getEnsText.js';
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/actions/ens/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,GAC7B,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EACL,YAAY,EACZ,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,GAC5B,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EACL,UAAU,EACV,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,GAC1B,MAAM,iBAAiB,CAAA;AAExB,OAAO,EACL,cAAc,EACd,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,GAC9B,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EACL,UAAU,EACV,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,GAC1B,MAAM,iBAAiB,CAAA"}
|
@@ -0,0 +1,261 @@
|
|
1
|
+
import type { Abi, AbiEvent, AbiFunction, AbiParametersToPrimitiveTypes, Address, ExtractAbiEvent, ExtractAbiEventNames, ExtractAbiFunction, ExtractAbiFunctionNames, Narrow } from 'abitype';
|
2
|
+
import type { PublicClient, Transport, WalletClient } from '../clients/index.js';
|
3
|
+
import type { AbiEventParametersToPrimitiveTypes, Account, Chain, IsNarrowable, IsNever, IsUndefined, MaybeExtractEventArgsFromAbi, Or, Prettify } from '../types/index.js';
|
4
|
+
import type { WatchContractEventParameters, WatchContractEventReturnType, ReadContractParameters, ReadContractReturnType, SimulateContractParameters, EstimateContractGasParameters, CreateContractEventFilterParameters, CreateContractEventFilterReturnType, EstimateContractGasReturnType, SimulateContractReturnType } from './public/index.js';
|
5
|
+
import type { WriteContractParameters, WriteContractReturnType } from './wallet/index.js';
|
6
|
+
export type GetContractParameters<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends Account | undefined = Account | undefined, TAbi extends Abi | readonly unknown[] = Abi, TPublicClient extends PublicClient<TTransport, TChain> | unknown = unknown, TWalletClient extends WalletClient<TTransport, TChain, TAccount> | unknown = unknown> = {
|
7
|
+
/** Contract ABI */
|
8
|
+
abi: Narrow<TAbi>;
|
9
|
+
/** Contract address */
|
10
|
+
address: Address;
|
11
|
+
/**
|
12
|
+
* Public client
|
13
|
+
*
|
14
|
+
* If you pass in a [`publicClient`](https://viem.sh/docs/clients/public.html), the following methods are available:
|
15
|
+
*
|
16
|
+
* - [`createEventFilter`](https://viem.sh/docs/contract/createContractEventFilter.html)
|
17
|
+
* - [`estimateGas`](https://viem.sh/docs/contract/estimateContractGas.html)
|
18
|
+
* - [`read`](https://viem.sh/docs/contract/readContract.html)
|
19
|
+
* - [`simulate`](https://viem.sh/docs/contract/simulateContract.html)
|
20
|
+
* - [`watchEvent`](https://viem.sh/docs/contract/watchContractEvent.html)
|
21
|
+
*/
|
22
|
+
publicClient?: TPublicClient;
|
23
|
+
/**
|
24
|
+
* Wallet client
|
25
|
+
*
|
26
|
+
* If you pass in a [`walletClient`](https://viem.sh/docs/clients/wallet.html), the following methods are available:
|
27
|
+
*
|
28
|
+
* - [`write`](https://viem.sh/docs/contract/writeContract.html)
|
29
|
+
*/
|
30
|
+
walletClient?: TWalletClient;
|
31
|
+
};
|
32
|
+
export type GetContractReturnType<TAbi extends Abi | readonly unknown[] = Abi, TPublicClient extends PublicClient | unknown = unknown, TWalletClient extends WalletClient | unknown = unknown, _EventNames extends string = TAbi extends Abi ? Abi extends TAbi ? string : ExtractAbiEventNames<TAbi> : string, _ReadFunctionNames extends string = TAbi extends Abi ? Abi extends TAbi ? string : ExtractAbiFunctionNames<TAbi, 'pure' | 'view'> : string, _WriteFunctionNames extends string = TAbi extends Abi ? Abi extends TAbi ? string : ExtractAbiFunctionNames<TAbi, 'nonpayable' | 'payable'> : string, _Narrowable extends boolean = IsNarrowable<TAbi, Abi>> = Prettify<(TPublicClient extends PublicClient ? (IsNever<_ReadFunctionNames> extends true ? unknown : {
|
33
|
+
/**
|
34
|
+
* Calls a read-only function on a contract, and returns the response.
|
35
|
+
*
|
36
|
+
* A "read-only" function (constant function) on a Solidity contract is denoted by a `view` or `pure` keyword. They can only read the state of the contract, and cannot make any changes to it. Since read-only methods do not change the state of the contract, they do not require any gas to be executed, and can be called by any user without the need to pay for gas.
|
37
|
+
*
|
38
|
+
* Internally, `read` uses a [Public Client](https://viem.sh/docs/clients/public.html) to call the [`call` action](https://viem.sh/docs/actions/public/call.html) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData.html).
|
39
|
+
*
|
40
|
+
* @example
|
41
|
+
* import { createPublicClient, getContract, http, parseAbi } from 'viem'
|
42
|
+
* import { mainnet } from 'viem/chains'
|
43
|
+
*
|
44
|
+
* const publicClient = createPublicClient({
|
45
|
+
* chain: mainnet,
|
46
|
+
* transport: http(),
|
47
|
+
* })
|
48
|
+
* const contract = getContract({
|
49
|
+
* address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
|
50
|
+
* abi: parseAbi([
|
51
|
+
* 'function balanceOf(address owner) view returns (uint256)',
|
52
|
+
* ]),
|
53
|
+
* publicClient,
|
54
|
+
* })
|
55
|
+
* const result = await contract.read.balanceOf(['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'])
|
56
|
+
* // 424122n
|
57
|
+
*/
|
58
|
+
read: {
|
59
|
+
[FunctionName in _ReadFunctionNames]: GetReadFunction<_Narrowable, TAbi, FunctionName>;
|
60
|
+
};
|
61
|
+
}) & (IsNever<_WriteFunctionNames> extends true ? unknown : {
|
62
|
+
/**
|
63
|
+
* Estimates the gas necessary to complete a transaction without submitting it to the network.
|
64
|
+
*
|
65
|
+
* @example
|
66
|
+
* import { createPublicClient, getContract, http, parseAbi } from 'viem'
|
67
|
+
* import { mainnet } from 'viem/chains'
|
68
|
+
*
|
69
|
+
* const client = createPublicClient({
|
70
|
+
* chain: mainnet,
|
71
|
+
* transport: http(),
|
72
|
+
* })
|
73
|
+
* const contract = getContract({
|
74
|
+
* address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
|
75
|
+
* abi: parseAbi(['function mint() public']),
|
76
|
+
* publicClient,
|
77
|
+
* })
|
78
|
+
* const gas = await contract.estimateGas.mint({
|
79
|
+
* account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
|
80
|
+
* })
|
81
|
+
*/
|
82
|
+
estimateGas: {
|
83
|
+
[FunctionName in _WriteFunctionNames]: GetEstimateFunction<_Narrowable, TPublicClient extends PublicClient ? TPublicClient['chain'] : undefined, TAbi, FunctionName>;
|
84
|
+
};
|
85
|
+
/**
|
86
|
+
* Simulates/validates a contract interaction. This is useful for retrieving return data and revert reasons of contract write functions.
|
87
|
+
*
|
88
|
+
* This function does not require gas to execute and does not change the state of the blockchain. It is almost identical to [`readContract`](https://viem.sh/docs/contract/readContract.html), but also supports contract write functions.
|
89
|
+
*
|
90
|
+
* Internally, `simulate` uses a [Public Client](https://viem.sh/docs/clients/public.html) to call the [`call` action](https://viem.sh/docs/actions/public/call.html) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData.html).
|
91
|
+
*
|
92
|
+
* @example
|
93
|
+
* import { createPublicClient, getContract, http, parseAbi } from 'viem'
|
94
|
+
* import { mainnet } from 'viem/chains'
|
95
|
+
*
|
96
|
+
* const client = createPublicClient({
|
97
|
+
* chain: mainnet,
|
98
|
+
* transport: http(),
|
99
|
+
* })
|
100
|
+
* const contract = getContract({
|
101
|
+
* address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
|
102
|
+
* abi: parseAbi(['function mint() public']),
|
103
|
+
* publicClient,
|
104
|
+
* })
|
105
|
+
* const result = await contract.simulate.mint({
|
106
|
+
* account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
|
107
|
+
* })
|
108
|
+
*/
|
109
|
+
simulate: {
|
110
|
+
[FunctionName in _WriteFunctionNames]: GetSimulateFunction<_Narrowable, TPublicClient extends PublicClient ? TPublicClient['chain'] : undefined, TAbi, FunctionName>;
|
111
|
+
};
|
112
|
+
}) & (IsNever<_EventNames> extends true ? unknown : {
|
113
|
+
/**
|
114
|
+
* 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).
|
115
|
+
*
|
116
|
+
* @example
|
117
|
+
* import { createPublicClient, getContract, http, parseAbi } from 'viem'
|
118
|
+
* import { mainnet } from 'viem/chains'
|
119
|
+
*
|
120
|
+
* const client = createPublicClient({
|
121
|
+
* chain: mainnet,
|
122
|
+
* transport: http(),
|
123
|
+
* })
|
124
|
+
* const contract = getContract({
|
125
|
+
* address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
|
126
|
+
* abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']),
|
127
|
+
* publicClient,
|
128
|
+
* })
|
129
|
+
* const filter = await contract.createEventFilter.Transfer()
|
130
|
+
*/
|
131
|
+
createEventFilter: {
|
132
|
+
[EventName in _EventNames]: GetEventFilter<_Narrowable, TAbi, EventName>;
|
133
|
+
};
|
134
|
+
/**
|
135
|
+
* Watches and returns emitted contract event logs.
|
136
|
+
*
|
137
|
+
* This Action will batch up all the event logs found within the [`pollingInterval`](https://viem.sh/docs/contract/watchContractEvent.html#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/contract/watchContractEvent.html#onLogs).
|
138
|
+
*
|
139
|
+
* `watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/contract/createContractEventFilter.html) and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. `eth_newFilter`), then `watchEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs.html) instead.
|
140
|
+
*
|
141
|
+
* @example
|
142
|
+
* import { createPublicClient, getContract, http, parseAbi } from 'viem'
|
143
|
+
* import { mainnet } from 'viem/chains'
|
144
|
+
*
|
145
|
+
* const client = createPublicClient({
|
146
|
+
* chain: mainnet,
|
147
|
+
* transport: http(),
|
148
|
+
* })
|
149
|
+
* const contract = getContract({
|
150
|
+
* address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
|
151
|
+
* abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']),
|
152
|
+
* publicClient,
|
153
|
+
* })
|
154
|
+
* const filter = await contract.createEventFilter.Transfer()
|
155
|
+
* const unwatch = contract.watchEvent.Transfer(
|
156
|
+
* { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' },
|
157
|
+
* { onLogs: (logs) => console.log(logs) },
|
158
|
+
* )
|
159
|
+
*/
|
160
|
+
watchEvent: {
|
161
|
+
[EventName in _EventNames]: GetWatchEvent<_Narrowable, TAbi, EventName>;
|
162
|
+
};
|
163
|
+
}) : unknown) & (TWalletClient extends WalletClient ? IsNever<_WriteFunctionNames> extends true ? unknown : {
|
164
|
+
/**
|
165
|
+
* Executes a write function on a contract.
|
166
|
+
*
|
167
|
+
* A "write" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a [Transaction](https://viem.sh/docs/glossary/terms.html) is needed to be broadcast in order to change the state.
|
168
|
+
*
|
169
|
+
* Internally, `write` uses a [Wallet Client](https://viem.sh/docs/clients/wallet.html) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction.html) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData.html).
|
170
|
+
*
|
171
|
+
* __Warning: The `write` internally sends a transaction – it does not validate if the contract write will succeed (the contract may throw an error). It is highly recommended to [simulate the contract write with `contract.simulate`](https://viem.sh/docs/contract/writeContract.html#usage) before you execute it.__
|
172
|
+
*
|
173
|
+
* @example
|
174
|
+
* import { createWalletClient, getContract, http, parseAbi } from 'viem'
|
175
|
+
* import { mainnet } from 'viem/chains'
|
176
|
+
*
|
177
|
+
* const client = createWalletClient({
|
178
|
+
* chain: mainnet,
|
179
|
+
* transport: http(),
|
180
|
+
* })
|
181
|
+
* const contract = getContract({
|
182
|
+
* address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
|
183
|
+
* abi: parseAbi(['function mint(uint32 tokenId) nonpayable']),
|
184
|
+
* publicClient,
|
185
|
+
* })
|
186
|
+
* const hash = await contract.write.min([69420], {
|
187
|
+
* address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
|
188
|
+
* })
|
189
|
+
*/
|
190
|
+
write: {
|
191
|
+
[FunctionName in _WriteFunctionNames]: GetWriteFunction<_Narrowable, TWalletClient extends WalletClient ? TWalletClient['chain'] : undefined, TWalletClient extends WalletClient ? TWalletClient['account'] : undefined, TAbi, FunctionName>;
|
192
|
+
};
|
193
|
+
} : unknown)>;
|
194
|
+
/**
|
195
|
+
* Gets type-safe interface for performing contract-related actions with a specific `abi` and `address`.
|
196
|
+
*
|
197
|
+
* - Docs https://viem.sh/docs/contract/getContract.html
|
198
|
+
*
|
199
|
+
* Using Contract Instances can make it easier to work with contracts if you don't want to pass the `abi` and `address` properites every time you perform contract actions, e.g. [`readContract`](https://viem.sh/docs/contract/readContract.html), [`writeContract`](https://viem.sh/docs/contract/writeContract.html), [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas.html), etc.
|
200
|
+
*
|
201
|
+
* @example
|
202
|
+
* import { createPublicClient, getContract, http, parseAbi } from 'viem'
|
203
|
+
* import { mainnet } from 'viem/chains'
|
204
|
+
*
|
205
|
+
* const publicClient = createPublicClient({
|
206
|
+
* chain: mainnet,
|
207
|
+
* transport: http(),
|
208
|
+
* })
|
209
|
+
* const contract = getContract({
|
210
|
+
* address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
|
211
|
+
* abi: parseAbi([
|
212
|
+
* 'function balanceOf(address owner) view returns (uint256)',
|
213
|
+
* 'function ownerOf(uint256 tokenId) view returns (address)',
|
214
|
+
* 'function totalSupply() view returns (uint256)',
|
215
|
+
* ]),
|
216
|
+
* publicClient,
|
217
|
+
* })
|
218
|
+
*/
|
219
|
+
export declare function getContract<TTransport extends Transport, TAbi extends Abi | readonly unknown[], TChain extends Chain | undefined = Chain | undefined, TAccount extends Account | undefined = Account | undefined, TPublicClient extends PublicClient<TTransport, TChain> | undefined = PublicClient<TTransport, TChain> | undefined, TWalletClient extends WalletClient<TTransport, TChain, TAccount> | undefined = WalletClient<TTransport, TChain, TAccount> | undefined>({ abi, address, publicClient, walletClient, }: GetContractParameters<TTransport, TChain, TAccount, TAbi, TPublicClient, TWalletClient>): GetContractReturnType<TAbi, TPublicClient, TWalletClient>;
|
220
|
+
/**
|
221
|
+
* @internal exporting for testing only
|
222
|
+
*/
|
223
|
+
export declare function getFunctionParameters(values: [args?: readonly unknown[], options?: object]): {
|
224
|
+
args: readonly unknown[];
|
225
|
+
options: object;
|
226
|
+
};
|
227
|
+
/**
|
228
|
+
* @internal exporting for testing only
|
229
|
+
*/
|
230
|
+
export declare function getEventParameters(values: [args?: object | unknown[], options?: object], abiEvent: AbiEvent): {
|
231
|
+
args: object | undefined;
|
232
|
+
options: object;
|
233
|
+
};
|
234
|
+
type GetReadFunction<Narrowable extends boolean, TAbi extends Abi | readonly unknown[], TFunctionName extends string, TAbiFunction extends AbiFunction = TAbi extends Abi ? ExtractAbiFunction<TAbi, TFunctionName> : AbiFunction, Args = AbiParametersToPrimitiveTypes<TAbiFunction['inputs']>, Options = Prettify<Omit<ReadContractParameters<TAbi, TFunctionName>, 'abi' | 'address' | 'args' | 'functionName'>>> = Narrowable extends true ? (...parameters: Args extends readonly [] ? [options?: Options] : [args: Args, options?: Options]) => Promise<ReadContractReturnType<TAbi, TFunctionName>> : (...parameters: [options?: Options] | [args: readonly unknown[], options?: Options]) => Promise<ReadContractReturnType>;
|
235
|
+
type GetEstimateFunction<Narrowable extends boolean, TChain extends Chain | undefined, TAbi extends Abi | readonly unknown[], TFunctionName extends string, TAbiFunction extends AbiFunction = TAbi extends Abi ? ExtractAbiFunction<TAbi, TFunctionName> : AbiFunction, Args = AbiParametersToPrimitiveTypes<TAbiFunction['inputs']>, Options = Prettify<Omit<EstimateContractGasParameters<TAbi, TFunctionName, TChain>, 'abi' | 'address' | 'args' | 'functionName'>>> = Narrowable extends true ? (...parameters: Args extends readonly [] ? [options?: Options] : [args: Args, options?: Options]) => Promise<EstimateContractGasReturnType> : (...parameters: [options?: Options] | [args: readonly unknown[], options?: Options]) => Promise<EstimateContractGasReturnType>;
|
236
|
+
type GetSimulateFunction<Narrowable extends boolean, TChain extends Chain | undefined, TAbi extends Abi | readonly unknown[], TFunctionName extends string, TAbiFunction extends AbiFunction = TAbi extends Abi ? ExtractAbiFunction<TAbi, TFunctionName> : AbiFunction, Args = AbiParametersToPrimitiveTypes<TAbiFunction['inputs']>> = Narrowable extends true ? <TChainOverride extends Chain | undefined, Options extends Prettify<Omit<SimulateContractParameters<TAbi, TFunctionName, TChain, TChainOverride>, 'abi' | 'address' | 'args' | 'functionName'>>>(...parameters: Args extends readonly [] ? [options?: Options] : [args: Args, options?: Options]) => Promise<SimulateContractReturnType<TAbi, TFunctionName, TChain, TChainOverride>> : <TChainOverride extends Chain | undefined, Options extends Prettify<Omit<SimulateContractParameters<TAbi, TFunctionName, TChain, TChainOverride>, 'abi' | 'address' | 'args' | 'functionName'>>>(...parameters: [options?: Options] | [args: readonly unknown[], options?: Options]) => Promise<SimulateContractReturnType>;
|
237
|
+
type GetWriteFunction<Narrowable extends boolean, TChain extends Chain | undefined, TAccount extends Account | undefined, TAbi extends Abi | readonly unknown[], TFunctionName extends string, TAbiFunction extends AbiFunction = TAbi extends Abi ? ExtractAbiFunction<TAbi, TFunctionName> : AbiFunction, Args = AbiParametersToPrimitiveTypes<TAbiFunction['inputs']>, IsOptionsRequired = Or<[IsUndefined<TAccount>, IsUndefined<TChain>]>> = Narrowable extends true ? <TChainOverride extends Chain | undefined, Options extends Prettify<Omit<WriteContractParameters<TAbi, TFunctionName, TChain, TAccount, TChainOverride>, 'abi' | 'address' | 'args' | 'functionName'>>, Rest extends IsOptionsRequired extends true ? [options: Options] : [options?: Options]>(...parameters: Args extends readonly [] ? Rest : [args: Args, ...parameters: Rest]) => Promise<WriteContractReturnType> : <TChainOverride extends Chain | undefined, Options extends Prettify<Omit<WriteContractParameters<TAbi, TFunctionName, TChain, TAccount, TChainOverride>, 'abi' | 'address' | 'args' | 'functionName'>>, Rest extends unknown[] = IsOptionsRequired extends true ? [options: Options] : [options?: Options]>(...parameters: Rest | [args: readonly unknown[], ...parameters: Rest]) => Promise<WriteContractReturnType>;
|
238
|
+
type GetEventFilter<Narrowable extends boolean, TAbi extends Abi | readonly unknown[], TEventName extends string, TAbiEvent extends AbiEvent = TAbi extends Abi ? ExtractAbiEvent<TAbi, TEventName> : AbiEvent, Args = AbiEventParametersToPrimitiveTypes<TAbiEvent['inputs']>, Options = Prettify<Omit<CreateContractEventFilterParameters<TAbi, TEventName>, 'abi' | 'address' | 'args' | 'eventName'>>, IndexedInputs = Extract<TAbiEvent['inputs'][number], {
|
239
|
+
indexed: true;
|
240
|
+
}>> = Narrowable extends true ? <TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined>(...parameters: IsNever<IndexedInputs> extends true ? [options?: Options] : [
|
241
|
+
args: Args | (Args extends Narrow<TArgs> ? Narrow<TArgs> : never),
|
242
|
+
options?: Options
|
243
|
+
]) => Promise<CreateContractEventFilterReturnType<TAbi, TEventName, TArgs>> : (...parameters: [options?: Options] | [
|
244
|
+
args: readonly unknown[] | CreateContractFilterOptions,
|
245
|
+
options?: Options
|
246
|
+
]) => Promise<CreateContractEventFilterReturnType>;
|
247
|
+
type GetWatchEvent<Narrowable extends boolean, TAbi extends Abi | readonly unknown[], TEventName extends string, TAbiEvent extends AbiEvent = TAbi extends Abi ? ExtractAbiEvent<TAbi, TEventName> : AbiEvent, Args = AbiEventParametersToPrimitiveTypes<TAbiEvent['inputs']>, Options = Prettify<Omit<WatchContractEventParameters<TAbi, TEventName>, 'abi' | 'address' | 'args' | 'eventName'>>, IndexedInputs = Extract<TAbiEvent['inputs'][number], {
|
248
|
+
indexed: true;
|
249
|
+
}>> = Narrowable extends true ? (...parameters: IsNever<IndexedInputs> extends true ? [options: Options] : [args: Args, options: Options]) => WatchContractEventReturnType : (...parameters: [options?: Options] | [
|
250
|
+
args: readonly unknown[] | WatchContractEventOptions,
|
251
|
+
options?: Options
|
252
|
+
]) => WatchContractEventReturnType;
|
253
|
+
type CreateContractFilterOptions = RemoveProperties<CreateContractEventFilterParameters>;
|
254
|
+
type WatchContractEventOptions = RemoveProperties<WatchContractEventParameters>;
|
255
|
+
type RemoveProperties<T extends object> = Prettify<{
|
256
|
+
[key: string]: unknown;
|
257
|
+
} & {
|
258
|
+
[_ in keyof T]?: never;
|
259
|
+
}>;
|
260
|
+
export {};
|
261
|
+
//# sourceMappingURL=getContract.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getContract.d.ts","sourceRoot":"","sources":["../../../src/actions/getContract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,GAAG,EACH,QAAQ,EACR,WAAW,EACX,6BAA6B,EAC7B,OAAO,EACP,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,uBAAuB,EACvB,MAAM,EACP,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAChF,OAAO,KAAK,EACV,kCAAkC,EAClC,OAAO,EACP,KAAK,EACL,YAAY,EACZ,OAAO,EACP,WAAW,EACX,4BAA4B,EAC5B,EAAE,EACF,QAAQ,EACT,MAAM,mBAAmB,CAAA;AAQ1B,OAAO,KAAK,EACV,4BAA4B,EAC5B,4BAA4B,EAC5B,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,EAC1B,6BAA6B,EAC7B,mCAAmC,EACnC,mCAAmC,EACnC,6BAA6B,EAC7B,0BAA0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,CAAC,EAC9D,OAAO,GAAG,QAAQ,CAChB,IAAI,CACF,4BAA4B,CAAC,IAAI,EAAE,UAAU,CAAC,EAC9C,KAAK,GAAG,SAAS,GAAG,MAAM,GAAG,WAAW,CACzC,CACF,EACD,aAAa,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE;IAAE,OAAO,EAAE,IAAI,CAAA;CAAE,CAAC,IACrE,UAAU,SAAS,IAAI,GACvB,CACE,GAAG,UAAU,EAAE,OAAO,CAAC,aAAa,CAAC,SAAS,IAAI,GAC9C,CAAC,OAAO,EAAE,OAAO,CAAC,GAClB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,KAC/B,4BAA4B,GACjC,CACE,GAAG,UAAU,EACT,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,GACnB;IACE,IAAI,EAAE,SAAS,OAAO,EAAE,GAAG,yBAAyB;IACpD,OAAO,CAAC,EAAE,OAAO;CAClB,KACF,4BAA4B,CAAA;AAErC,KAAK,2BAA2B,GAC9B,gBAAgB,CAAC,mCAAmC,CAAC,CAAA;AACvD,KAAK,yBAAyB,GAAG,gBAAgB,CAAC,4BAA4B,CAAC,CAAA;AAE/E,KAAK,gBAAgB,CAAC,CAAC,SAAS,MAAM,IAAI,QAAQ,CAChD;IACE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB,GAAG;KACD,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK;CACvB,CACF,CAAA"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
export { getEnsAddress, getEnsName, getEnsResolver } from './ens/index.js';
|
2
|
+
export type { GetEnsAddressParameters, GetEnsAddressReturnType, GetEnsNameParameters, GetEnsNameReturnType, GetEnsResolverParameters, GetEnsResolverReturnType, } from './ens/index.js';
|
3
|
+
export { call, createBlockFilter, createContractEventFilter, createEventFilter, createPendingTransactionFilter, estimateGas, getBalance, getBlock, getBlockNumber, getBlockNumberCache, getBlockTransactionCount, getBytecode, getChainId, getFeeHistory, getFilterChanges, getFilterLogs, getGasPrice, getLogs, getStorageAt, getTransaction, getTransactionConfirmations, getTransactionCount, getTransactionReceipt, multicall, readContract, simulateContract, uninstallFilter, waitForTransactionReceipt, watchBlockNumber, watchBlocks, watchContractEvent, watchEvent, watchPendingTransactions, } from './public/index.js';
|
4
|
+
export type { CallParameters, CallReturnType, CreateBlockFilterReturnType, CreateContractEventFilterParameters, CreateContractEventFilterReturnType, CreateEventFilterParameters, CreateEventFilterReturnType, CreatePendingTransactionFilterReturnType, EstimateGasParameters, EstimateGasReturnType, GetBalanceParameters, GetBalanceReturnType, GetBlockParameters, GetBlockNumberParameters, GetBlockNumberReturnType, GetBlockReturnType, GetBlockTransactionCountParameters, GetBlockTransactionCountReturnType, GetBytecodeParameters, GetBytecodeReturnType, GetFeeHistoryParameters, GetFeeHistoryReturnType, GetFilterChangesParameters, GetFilterChangesReturnType, GetFilterLogsParameters, GetFilterLogsReturnType, GetGasPriceReturnType, GetLogsParameters, GetLogsReturnType, GetStorageAtParameters, GetStorageAtReturnType, GetTransactionParameters, GetTransactionConfirmationsParameters, GetTransactionConfirmationsReturnType, GetTransactionCountParameters, GetTransactionCountReturnType, GetTransactionReceiptParameters, GetTransactionReceiptReturnType, GetTransactionReturnType, MulticallParameters, MulticallReturnType, OnBlock, OnBlockNumberFn, OnBlockNumberParameter, OnBlockParameter, OnLogsFn, OnLogsParameter, OnTransactionsFn, OnTransactionsParameter, ReadContractParameters, ReadContractReturnType, ReplacementReason, ReplacementReturnType, SimulateContractParameters, SimulateContractReturnType, UninstallFilterParameters, UninstallFilterReturnType, WaitForTransactionReceiptParameters, WaitForTransactionReceiptReturnType, WatchBlockNumberParameters, WatchBlockNumberReturnType, WatchBlocksParameters, WatchBlocksReturnType, WatchContractEventParameters, WatchContractEventReturnType, WatchEventParameters, WatchEventReturnType, WatchPendingTransactionsParameters, WatchPendingTransactionsReturnType, } from './public/index.js';
|
5
|
+
export { dropTransaction, getAutomine, getTxpoolContent, getTxpoolStatus, impersonateAccount, increaseTime, inspectTxpool, mine, removeBlockTimestampInterval, reset, revert, sendUnsignedTransaction, setAutomine, setBalance, setBlockGasLimit, setBlockTimestampInterval, setCode, setCoinbase, setIntervalMining, setLoggingEnabled, setMinGasPrice, setNextBlockBaseFeePerGas, setNextBlockTimestamp, setNonce, setStorageAt, snapshot, stopImpersonatingAccount, } from './test/index.js';
|
6
|
+
export type { DropTransactionParameters, ImpersonateAccountParameters, IncreaseTimeParameters, MineParameters, ResetParameters, RevertParameters, SendUnsignedTransactionParameters, SendUnsignedTransactionReturnType, SetBalanceParameters, SetBlockGasLimitParameters, SetBlockTimestampIntervalParameters, SetCodeParameters, SetCoinbaseParameters, SetIntervalMiningParameters, SetMinGasPriceParameters, SetNextBlockBaseFeePerGasParameters, SetNextBlockTimestampParameters, SetNonceParameters, SetStorageAtParameters, StopImpersonatingAccountParameters, } from './test/index.js';
|
7
|
+
export { addChain, deployContract, getAddresses, getPermissions, requestAddresses, requestPermissions, sendTransaction, signMessage, switchChain, watchAsset, writeContract, } from './wallet/index.js';
|
8
|
+
export type { AddChainParameters, DeployContractParameters, DeployContractReturnType, FormattedTransactionRequest, GetAddressesReturnType, GetChainIdReturnType, GetPermissionsReturnType, RequestAddressesReturnType, RequestPermissionsParameters, RequestPermissionsReturnType, SendTransactionParameters, SendTransactionReturnType, SignMessageParameters, SignMessageReturnType, SignTypedDataParameters, SignTypedDataReturnType, SwitchChainParameters, WatchAssetParameters, WatchAssetReturnType, WriteContractParameters, WriteContractReturnType, } from './wallet/index.js';
|
9
|
+
export { getContract } from './getContract.js';
|
10
|
+
export type { GetContractParameters, GetContractReturnType, } from './getContract.js';
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,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eAAe,EACf,WAAW,EACX,WAAW,EACX,UAAU,EACV,aAAa,GACd,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EACV,kBAAkB,EAClB,wBAAwB,EACxB,wBAAwB,EACxB,2BAA2B,EAC3B,sBAAsB,EACtB,oBAAoB,EACpB,wBAAwB,EACxB,0BAA0B,EAC1B,4BAA4B,EAC5B,4BAA4B,EAC5B,yBAAyB,EACzB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,YAAY,EACV,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,kBAAkB,CAAA"}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
import type { PublicClient, Transport } from '../../clients/index.js';
|
2
|
+
import type { Account, Address, BlockTag, Chain, Formatter, Hex, MergeIntersectionProperties, TransactionRequest } from '../../types/index.js';
|
3
|
+
import type { Formatted, TransactionRequestFormatter } from '../../utils/index.js';
|
4
|
+
export type FormattedCall<TFormatter extends Formatter | undefined = Formatter> = MergeIntersectionProperties<Omit<Formatted<TFormatter, TransactionRequest, true>, 'from'>, TransactionRequest>;
|
5
|
+
export type CallParameters<TChain extends Chain | undefined = Chain | undefined> = FormattedCall<TransactionRequestFormatter<TChain>> & {
|
6
|
+
account?: Account | Address;
|
7
|
+
batch?: boolean;
|
8
|
+
} & ({
|
9
|
+
/** The balance of the account at a block number. */
|
10
|
+
blockNumber?: bigint;
|
11
|
+
blockTag?: never;
|
12
|
+
} | {
|
13
|
+
blockNumber?: never;
|
14
|
+
/**
|
15
|
+
* The balance of the account at a block tag.
|
16
|
+
* @default 'latest'
|
17
|
+
*/
|
18
|
+
blockTag?: BlockTag;
|
19
|
+
});
|
20
|
+
export type CallReturnType = {
|
21
|
+
data: Hex | undefined;
|
22
|
+
};
|
23
|
+
/**
|
24
|
+
* Executes a new message call immediately without submitting a transaction to the network.
|
25
|
+
*
|
26
|
+
* - Docs: https://viem.sh/docs/actions/public/call.html
|
27
|
+
* - JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call)
|
28
|
+
*
|
29
|
+
* @param client - Client to use
|
30
|
+
* @param parameters - {@link CallParameters}
|
31
|
+
* @returns The call data. {@link CallReturnType}
|
32
|
+
*
|
33
|
+
* @example
|
34
|
+
* import { createPublicClient, http } from 'viem'
|
35
|
+
* import { mainnet } from 'viem/chains'
|
36
|
+
* import { call } from 'viem/public'
|
37
|
+
*
|
38
|
+
* const client = createPublicClient({
|
39
|
+
* chain: mainnet,
|
40
|
+
* transport: http(),
|
41
|
+
* })
|
42
|
+
* const data = await call(client, {
|
43
|
+
* account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
|
44
|
+
* data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
45
|
+
* to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
|
46
|
+
* })
|
47
|
+
*/
|
48
|
+
export declare function call<TChain extends Chain | undefined>(client: PublicClient<Transport, TChain>, args: CallParameters<TChain>): Promise<CallReturnType>;
|
49
|
+
//# sourceMappingURL=call.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"call.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/call.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAQrE,OAAO,KAAK,EACV,OAAO,EACP,OAAO,EACP,QAAQ,EACR,KAAK,EACL,SAAS,EACT,GAAG,EACH,2BAA2B,EAC3B,kBAAkB,EACnB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EACV,SAAS,EACT,2BAA2B,EAC5B,MAAM,sBAAsB,CAAA;AAe7B,MAAM,MAAM,aAAa,CACvB,UAAU,SAAS,SAAS,GAAG,SAAS,GAAG,SAAS,IAClD,2BAA2B,CAC7B,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,kBAAkB,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,EAC7D,kBAAkB,CACnB,CAAA;AAED,MAAM,MAAM,cAAc,CACxB,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,IAClD,aAAa,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAC,GAAG;IACvD,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,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,EACvC,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,GAC3B,OAAO,CAAC,cAAc,CAAC,CAyEzB"}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import type { PublicClient, Transport } from '../../clients/index.js';
|
2
|
+
import type { Chain, Filter } from '../../types/index.js';
|
3
|
+
export type CreateBlockFilterReturnType = Filter<'block'>;
|
4
|
+
/**
|
5
|
+
* 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).
|
6
|
+
*
|
7
|
+
* - Docs: https://viem.sh/docs/actions/public/createBlockFilter.html
|
8
|
+
* - JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter)
|
9
|
+
*
|
10
|
+
* @param client - Client to use
|
11
|
+
* @returns [`Filter`](https://viem.sh/docs/glossary/types.html#filter). {@link CreateBlockFilterReturnType}
|
12
|
+
*
|
13
|
+
* @example
|
14
|
+
* import { createPublicClient, http } from 'viem'
|
15
|
+
* import { mainnet } from 'viem/chains'
|
16
|
+
* import { createBlockFilter } from 'viem/public'
|
17
|
+
*
|
18
|
+
* const client = createPublicClient({
|
19
|
+
* chain: mainnet,
|
20
|
+
* transport: http(),
|
21
|
+
* })
|
22
|
+
* const filter = await createBlockFilter(client)
|
23
|
+
* // { id: "0x345a6572337856574a76364e457a4366", type: 'block' }
|
24
|
+
*/
|
25
|
+
export declare function createBlockFilter<TChain extends Chain | undefined>(client: PublicClient<Transport, TChain>): Promise<CreateBlockFilterReturnType>;
|
26
|
+
//# sourceMappingURL=createBlockFilter.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"createBlockFilter.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/createBlockFilter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AACrE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAGzD,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;AAEzD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,iBAAiB,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EACtE,MAAM,EAAE,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,GACtC,OAAO,CAAC,2BAA2B,CAAC,CAQtC"}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import type { Abi, Narrow } from 'abitype';
|
2
|
+
import type { PublicClient, Transport } from '../../clients/index.js';
|
3
|
+
import type { Address, BlockNumber, BlockTag, Chain, InferEventName, Filter, MaybeExtractEventArgsFromAbi } from '../../types/index.js';
|
4
|
+
export type CreateContractEventFilterParameters<TAbi extends Abi | readonly unknown[] = Abi, TEventName extends string | undefined = undefined, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined = undefined> = {
|
5
|
+
address?: Address | Address[];
|
6
|
+
abi: Narrow<TAbi>;
|
7
|
+
eventName?: InferEventName<TAbi, TEventName>;
|
8
|
+
fromBlock?: BlockNumber | BlockTag;
|
9
|
+
toBlock?: BlockNumber | BlockTag;
|
10
|
+
} & (undefined extends TEventName ? {
|
11
|
+
args?: never;
|
12
|
+
} : MaybeExtractEventArgsFromAbi<TAbi, TEventName> extends infer TEventFilterArgs ? {
|
13
|
+
args?: TEventFilterArgs | (TArgs extends TEventFilterArgs ? TArgs : never);
|
14
|
+
} : {
|
15
|
+
args?: never;
|
16
|
+
});
|
17
|
+
export type CreateContractEventFilterReturnType<TAbi extends Abi | readonly unknown[] = Abi, TEventName extends string | undefined = undefined, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined = undefined> = Filter<'event', TAbi, TEventName, TArgs>;
|
18
|
+
/**
|
19
|
+
* Creates a Filter to retrieve event logs that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges) or [`getFilterLogs`](https://viem.sh/docs/actions/public/getFilterLogs).
|
20
|
+
*
|
21
|
+
* - Docs: https://viem.sh/docs/contract/createContractEventFilter.html
|
22
|
+
*
|
23
|
+
* @param client - Client to use
|
24
|
+
* @param parameters - {@link CreateContractEventFilterParameters}
|
25
|
+
* @returns [`Filter`](https://viem.sh/docs/glossary/types.html#filter). {@link CreateContractEventFilterReturnType}
|
26
|
+
*
|
27
|
+
* @example
|
28
|
+
* import { createPublicClient, http, parseAbi } from 'viem'
|
29
|
+
* import { mainnet } from 'viem/chains'
|
30
|
+
* import { createContractEventFilter } from 'viem/contract'
|
31
|
+
*
|
32
|
+
* const client = createPublicClient({
|
33
|
+
* chain: mainnet,
|
34
|
+
* transport: http(),
|
35
|
+
* })
|
36
|
+
* const filter = await createContractEventFilter(client, {
|
37
|
+
* abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']),
|
38
|
+
* })
|
39
|
+
*/
|
40
|
+
export declare function createContractEventFilter<TChain extends Chain | undefined, TAbi extends Abi | readonly unknown[], TEventName extends string | undefined, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined>(client: PublicClient<Transport, TChain>, { address, abi, args, eventName, fromBlock, toBlock, }: CreateContractEventFilterParameters<TAbi, TEventName, TArgs>): Promise<CreateContractEventFilterReturnType<TAbi, TEventName, TArgs>>;
|
41
|
+
//# sourceMappingURL=createContractEventFilter.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"createContractEventFilter.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/createContractEventFilter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAErE,OAAO,KAAK,EACV,OAAO,EACP,WAAW,EACX,QAAQ,EACR,KAAK,EACL,cAAc,EACd,MAAM,EACN,4BAA4B,EAC7B,MAAM,sBAAsB,CAAA;AAK7B,MAAM,MAAM,mCAAmC,CAC7C,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,GAAG,EAC3C,UAAU,SAAS,MAAM,GAAG,SAAS,GAAG,SAAS,EACjD,KAAK,SACD,4BAA4B,CAAC,IAAI,EAAE,UAAU,CAAC,GAC9C,SAAS,GAAG,SAAS,IACvB;IACF,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,EAAE,CAAA;IAC7B,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA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CAAmC,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC,CAgCvE"}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import type { Abi, AbiEvent, Narrow } from 'abitype';
|
2
|
+
import type { PublicClient, Transport } from '../../clients/index.js';
|
3
|
+
import type { Address, BlockNumber, BlockTag, Chain, Filter, MaybeAbiEventName, MaybeExtractEventArgsFromAbi, Prettify } from '../../types/index.js';
|
4
|
+
export type CreateEventFilterParameters<TAbiEvent extends AbiEvent | undefined = undefined, TAbi extends Abi | readonly unknown[] = [TAbiEvent], TEventName extends string | undefined = MaybeAbiEventName<TAbiEvent>, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined = undefined> = {
|
5
|
+
address?: Address | Address[];
|
6
|
+
fromBlock?: BlockNumber | BlockTag;
|
7
|
+
toBlock?: BlockNumber | BlockTag;
|
8
|
+
} & (MaybeExtractEventArgsFromAbi<TAbi, TEventName> extends infer TEventFilterArgs ? {
|
9
|
+
args: TEventFilterArgs | (TArgs extends TEventFilterArgs ? TArgs : never);
|
10
|
+
event: Narrow<TAbiEvent>;
|
11
|
+
} | {
|
12
|
+
args?: never;
|
13
|
+
event?: Narrow<TAbiEvent>;
|
14
|
+
} | {
|
15
|
+
args?: never;
|
16
|
+
event?: never;
|
17
|
+
} : {
|
18
|
+
args?: never;
|
19
|
+
event?: never;
|
20
|
+
});
|
21
|
+
export type CreateEventFilterReturnType<TAbiEvent extends AbiEvent | undefined = undefined, TAbi extends Abi | readonly unknown[] = [TAbiEvent], TEventName extends string | undefined = MaybeAbiEventName<TAbiEvent>, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined = undefined> = Prettify<Filter<'event', TAbi, TEventName, TArgs>>;
|
22
|
+
/**
|
23
|
+
* 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).
|
24
|
+
*
|
25
|
+
* - Docs: https://viem.sh/docs/actions/public/createEventFilter.html
|
26
|
+
* - JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter)
|
27
|
+
*
|
28
|
+
* @param client - Client to use
|
29
|
+
* @param parameters - {@link CreateEventFilterParameters}
|
30
|
+
* @returns [`Filter`](https://viem.sh/docs/glossary/types.html#filter). {@link CreateEventFilterReturnType}
|
31
|
+
*
|
32
|
+
* @example
|
33
|
+
* import { createPublicClient, http } from 'viem'
|
34
|
+
* import { mainnet } from 'viem/chains'
|
35
|
+
* import { createEventFilter } from 'viem/public'
|
36
|
+
*
|
37
|
+
* const client = createPublicClient({
|
38
|
+
* chain: mainnet,
|
39
|
+
* transport: http(),
|
40
|
+
* })
|
41
|
+
* const filter = await createEventFilter(client, {
|
42
|
+
* address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2',
|
43
|
+
* })
|
44
|
+
*/
|
45
|
+
export declare function createEventFilter<TChain extends Chain | undefined, TAbiEvent extends AbiEvent | undefined, _Abi extends Abi | readonly unknown[] = [TAbiEvent], _EventName extends string | undefined = MaybeAbiEventName<TAbiEvent>, _Args extends MaybeExtractEventArgsFromAbi<_Abi, _EventName> | undefined = undefined>(client: PublicClient<Transport, TChain>, { address, args, event, fromBlock, toBlock, }?: CreateEventFilterParameters<TAbiEvent, _Abi, _EventName, _Args>): Promise<CreateEventFilterReturnType<TAbiEvent, _Abi, _EventName, _Args>>;
|
46
|
+
//# sourceMappingURL=createEventFilter.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"createEventFilter.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/createEventFilter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAErE,OAAO,KAAK,EACV,OAAO,EACP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AAS,MAAM,GAAG,SAAS,GAAG,iBAAiB,CAAC,SAAS,CAAC,EACpE,KAAK,SACD,4BAA4B,CAAC,IAAI,EAAE,UAAU,CAAC,GAC9C,SAAS,GAAG,SAAS,IACvB,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC,CAAA;AAEtD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,SAAS,KAAK,GAAG,SAAS,EAChC,SAAS,SAAS,QAAQ,GAAG,SAAS,EACtC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,CAAC,SAAS,CAAC,EACnD,UAAU,SAAS,MAAM,GAAG,SAAS,GAAG,iBAAiB,CAAC,SAAS,CAAC,EACpE,KAAK,SACD,4BAA4B,CAAC,IAAI,EAAE,UAAU,CAAC,GAC9C,SAAS,GAAG,SAAS,EAEzB,MAAM,EAAE,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,EACvC,EACE,OAAO,EACP,IAAI,EACJ,KAAK,EACL,SAAS,EACT,OAAO,GACR,GAAE,2BAA2B,CAC5B,SAAS,EACT,IAAI,EACJ,UAAU,EACV,KAAK,CACM,GACZ,OAAO,CAAC,2BAA2B,CAAC,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC,CAuC1E"}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import type { PublicClient, Transport } from '../../clients/index.js';
|
2
|
+
import type { Chain, Filter } from '../../types/index.js';
|
3
|
+
export type CreatePendingTransactionFilterReturnType = Filter<'transaction'>;
|
4
|
+
/**
|
5
|
+
* Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges).
|
6
|
+
*
|
7
|
+
* - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter.html
|
8
|
+
* - JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter)
|
9
|
+
*
|
10
|
+
* @param client - Client to use
|
11
|
+
* @returns [`Filter`](https://viem.sh/docs/glossary/types.html#filter). {@link CreateBlockFilterReturnType}
|
12
|
+
*
|
13
|
+
* @example
|
14
|
+
* import { createPublicClient, http } from 'viem'
|
15
|
+
* import { mainnet } from 'viem/chains'
|
16
|
+
* import { createPendingTransactionFilter } from 'viem/public'
|
17
|
+
*
|
18
|
+
* const client = createPublicClient({
|
19
|
+
* chain: mainnet,
|
20
|
+
* transport: http(),
|
21
|
+
* })
|
22
|
+
* const filter = await createPendingTransactionFilter(client)
|
23
|
+
* // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' }
|
24
|
+
*/
|
25
|
+
export declare function createPendingTransactionFilter<TTransport extends Transport, TChain extends Chain | undefined>(client: PublicClient<TTransport, TChain>): Promise<CreatePendingTransactionFilterReturnType>;
|
26
|
+
//# sourceMappingURL=createPendingTransactionFilter.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"createPendingTransactionFilter.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/createPendingTransactionFilter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AACrE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAGzD,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,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,GACvC,OAAO,CAAC,wCAAwC,CAAC,CAQnD"}
|