viem 0.3.5 → 0.3.7
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/README.md +6 -0
- package/dist/cjs/actions/public/createContractEventFilter.js.map +1 -1
- package/dist/cjs/errors/version.js +1 -1
- package/dist/cjs/utils/rpc.js +3 -1
- package/dist/cjs/utils/rpc.js.map +1 -1
- package/dist/esm/actions/public/createContractEventFilter.js.map +1 -1
- package/dist/esm/errors/version.js +1 -1
- package/dist/esm/utils/rpc.js +3 -1
- package/dist/esm/utils/rpc.js.map +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/actions/public/createContractEventFilter.ts +1 -0
- package/src/errors/version.ts +1 -1
- package/src/types/contract.ts +3 -3
- package/src/utils/rpc.ts +7 -1
package/README.md
CHANGED
@@ -156,6 +156,12 @@ Check out the following places for more viem-related content:
|
|
156
156
|
<img alt="Privy logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/privy-light.svg" width="auto" height="50">
|
157
157
|
</picture>
|
158
158
|
</a>
|
159
|
+
<a href="https://spruceid.com">
|
160
|
+
<picture>
|
161
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/spruce-dark.svg">
|
162
|
+
<img alt="Spruce logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/spruce-light.svg" width="auto" height="50">
|
163
|
+
</picture>
|
164
|
+
</a>
|
159
165
|
|
160
166
|
## Contributing
|
161
167
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"createContractEventFilter.js","sourceRoot":"","sources":["../../../../src/actions/public/createContractEventFilter.ts"],"names":[],"mappings":";;;AAYA,mDAAqE;AAErE,iGAA0F;AA2DnF,KAAK,UAAU,yBAAyB,CAM7C,MAAuC,EACvC,EACE,OAAO,EACP,GAAG,EACH,IAAI,EACJ,SAAS,EACT,SAAS,EACT,OAAO,GACsD;IAE/D,MAAM,UAAU,GAAG,IAAA,sDAAwB,EAAC,MAAM,EAAE;QAClD,MAAM,EAAE,eAAe;KACxB,CAAC,CAAA;IAEF,MAAM,MAAM,GAAG,SAAS;QACtB,CAAC,CAAC,IAAA,4BAAiB,EAAC;YAChB,GAAG;YACH,IAAI;YACJ,SAAS;SACgC,CAAC;QAC9C,CAAC,CAAC,SAAS,CAAA;IACb,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QAC9B,MAAM,EAAE,eAAe;QACvB,MAAM,EAAE;YACN;gBACE,OAAO;gBACP,SAAS,EACP,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAA,sBAAW,EAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS;gBACpE,OAAO,EAAE,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAA,sBAAW,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO;gBACrE,MAAM;aACP;SACF;KACF,CAAC,CAAA;
|
1
|
+
{"version":3,"file":"createContractEventFilter.js","sourceRoot":"","sources":["../../../../src/actions/public/createContractEventFilter.ts"],"names":[],"mappings":";;;AAYA,mDAAqE;AAErE,iGAA0F;AA2DnF,KAAK,UAAU,yBAAyB,CAM7C,MAAuC,EACvC,EACE,OAAO,EACP,GAAG,EACH,IAAI,EACJ,SAAS,EACT,SAAS,EACT,OAAO,GACsD;IAE/D,MAAM,UAAU,GAAG,IAAA,sDAAwB,EAAC,MAAM,EAAE;QAClD,MAAM,EAAE,eAAe;KACxB,CAAC,CAAA;IAEF,MAAM,MAAM,GAAG,SAAS;QACtB,CAAC,CAAC,IAAA,4BAAiB,EAAC;YAChB,GAAG;YACH,IAAI;YACJ,SAAS;SACgC,CAAC;QAC9C,CAAC,CAAC,SAAS,CAAA;IACb,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QAC9B,MAAM,EAAE,eAAe;QACvB,MAAM,EAAE;YACN;gBACE,OAAO;gBACP,SAAS,EACP,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAA,sBAAW,EAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS;gBACpE,OAAO,EAAE,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAA,sBAAW,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO;gBACrE,MAAM;aACP;SACF;KACF,CAAC,CAAA;IAEF,OAAO;QACL,GAAG;QACH,IAAI;QACJ,SAAS;QACT,EAAE;QACF,OAAO,EAAE,UAAU,CAAC,EAAE,CAAC;QACvB,IAAI,EAAE,OAAO;KAC6D,CAAA;AAC9E,CAAC;AAhDD,8DAgDC"}
|
package/dist/cjs/utils/rpc.js
CHANGED
@@ -67,7 +67,9 @@ async function getSocket(url_) {
|
|
67
67
|
let socket = sockets.get(urlKey);
|
68
68
|
if (socket)
|
69
69
|
return socket;
|
70
|
-
|
70
|
+
let { WebSocket } = await import('isomorphic-ws');
|
71
|
+
if (!WebSocket.constructor)
|
72
|
+
WebSocket = WebSocket.default;
|
71
73
|
const webSocket = new WebSocket(url);
|
72
74
|
const requests = new Map();
|
73
75
|
const subscriptions = new Map();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"rpc.js","sourceRoot":"","sources":["../../../src/utils/rpc.ts"],"names":[],"mappings":";;;AACA,iDAK2B;AAC3B,6DAAsD;AACtD,iDAA0C;AAE1C,IAAI,EAAE,GAAG,CAAC,CAAA;AAqDV,KAAK,UAAU,IAAI,CACjB,GAAW,EACX,EAAE,IAAI,EAAE,YAAY,GAAG,EAAE,EAAE,OAAO,GAAG,KAAM,EAAe;IAE1D,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,YAAY,CAAA;IACzD,IAAI;QACF,MAAM,QAAQ,GAAG,MAAM,IAAA,4BAAW,EAChC,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YACnB,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;gBAChC,GAAG,YAAY;gBACf,IAAI,EAAE,IAAA,wBAAS,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,CAAC;gBACtD,OAAO,EAAE;oBACP,GAAG,OAAO;oBACV,cAAc,EAAE,kBAAkB;iBACnC;gBACD,MAAM,EAAE,MAAM,IAAI,MAAM;gBACxB,MAAM,EAAE,OAAO,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;aACtD,CAAC,CAAA;YACF,OAAO,QAAQ,CAAA;QACjB,CAAC,EACD;YACE,aAAa,E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,EAAE,IAAI,uBAAY,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,CAAC;QAC1D,OAAO;KACR,CACF,CAAA;AACH,CAAC;AAIY,QAAA,GAAG,GAAG;IACjB,IAAI;IACJ,SAAS;IACT,cAAc;CACf,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"createContractEventFilter.js","sourceRoot":"","sources":["../../../../src/actions/public/createContractEventFilter.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAErE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAA;AA2D1F,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAM7C,MAAuC,EACvC,EACE,OAAO,EACP,GAAG,EACH,IAAI,EACJ,SAAS,EACT,SAAS,EACT,OAAO,GACsD;IAE/D,MAAM,UAAU,GAAG,wBAAwB,CAAC,MAAM,EAAE;QAClD,MAAM,EAAE,eAAe;KACxB,CAAC,CAAA;IAEF,MAAM,MAAM,GAAG,SAAS;QACtB,CAAC,CAAC,iBAAiB,CAAC;YAChB,GAAG;YACH,IAAI;YACJ,SAAS;SACgC,CAAC;QAC9C,CAAC,CAAC,SAAS,CAAA;IACb,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QAC9B,MAAM,EAAE,eAAe;QACvB,MAAM,EAAE;YACN;gBACE,OAAO;gBACP,SAAS,EACP,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS;gBACpE,OAAO,EAAE,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO;gBACrE,MAAM;aACP;SACF;KACF,CAAC,CAAA;
|
1
|
+
{"version":3,"file":"createContractEventFilter.js","sourceRoot":"","sources":["../../../../src/actions/public/createContractEventFilter.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAErE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAA;AA2D1F,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAM7C,MAAuC,EACvC,EACE,OAAO,EACP,GAAG,EACH,IAAI,EACJ,SAAS,EACT,SAAS,EACT,OAAO,GACsD;IAE/D,MAAM,UAAU,GAAG,wBAAwB,CAAC,MAAM,EAAE;QAClD,MAAM,EAAE,eAAe;KACxB,CAAC,CAAA;IAEF,MAAM,MAAM,GAAG,SAAS;QACtB,CAAC,CAAC,iBAAiB,CAAC;YAChB,GAAG;YACH,IAAI;YACJ,SAAS;SACgC,CAAC;QAC9C,CAAC,CAAC,SAAS,CAAA;IACb,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QAC9B,MAAM,EAAE,eAAe;QACvB,MAAM,EAAE;YACN;gBACE,OAAO;gBACP,SAAS,EACP,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS;gBACpE,OAAO,EAAE,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO;gBACrE,MAAM;aACP;SACF;KACF,CAAC,CAAA;IAEF,OAAO;QACL,GAAG;QACH,IAAI;QACJ,SAAS;QACT,EAAE;QACF,OAAO,EAAE,UAAU,CAAC,EAAE,CAAC;QACvB,IAAI,EAAE,OAAO;KAC6D,CAAA;AAC9E,CAAC"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export const version = '0.3.
|
1
|
+
export const version = '0.3.7';
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/dist/esm/utils/rpc.js
CHANGED
@@ -64,7 +64,9 @@ export async function getSocket(url_) {
|
|
64
64
|
let socket = sockets.get(urlKey);
|
65
65
|
if (socket)
|
66
66
|
return socket;
|
67
|
-
|
67
|
+
let { WebSocket } = await import('isomorphic-ws');
|
68
|
+
if (!WebSocket.constructor)
|
69
|
+
WebSocket = WebSocket.default;
|
68
70
|
const webSocket = new WebSocket(url);
|
69
71
|
const requests = new Map();
|
70
72
|
const subscriptions = new Map();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"rpc.js","sourceRoot":"","sources":["../../../src/utils/rpc.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,qBAAqB,GACtB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C,IAAI,EAAE,GAAG,CAAC,CAAA;AAqDV,KAAK,UAAU,IAAI,CACjB,GAAW,EACX,EAAE,IAAI,EAAE,YAAY,GAAG,EAAE,EAAE,OAAO,GAAG,KAAM,EAAe;IAE1D,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,YAAY,CAAA;IACzD,IAAI;QACF,MAAM,QAAQ,GAAG,MAAM,WAAW,CAChC,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YACnB,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;gBAChC,GAAG,YAAY;gBACf,IAAI,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,CAAC;gBACtD,OAAO,EAAE;oBACP,GAAG,OAAO;oBACV,cAAc,EAAE,kBAAkB;iBACnC;gBACD,MAAM,EAAE,MAAM,IAAI,MAAM;gBACxB,MAAM,EAAE,OAAO,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;aACtD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,EAAE,CACH,IAAI,OAAO,CAAc,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,CAC3C,GAAG,CAAC,SAAS,CAAC,MAAM,EAAE;QACpB,IAAI;QACJ,MAAM;QACN,OAAO;KACR,CAAC,CACH,EACH;QACE,aAAa,EAAE,IAAI,YAAY,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,CAAC;QAC1D,OAAO;KACR,CACF,CAAA;AACH,CAAC;AAID,MAAM,CAAC,MAAM,GAAG,GAAG;IACjB,IAAI;IACJ,SAAS;IACT,cAAc;CACf,CAAA"}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
export type { DecodeAbiParametersReturnType, EncodeAbiParametersReturnType, GetAbiItemParameters, ParseAbi, ParseAbiItem, ParseAbiParameter, ParseAbiParameters, } from './utils/abi/index.js';
|
2
|
+
export { decodeAbiParameters, encodeAbiParameters, encodePacked, getAbiItem, parseAbi, parseAbiItem, parseAbiParameter, parseAbiParameters, } from './utils/abi/index.js';
|
3
|
+
//# sourceMappingURL=abi.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"abi.d.ts","sourceRoot":"","sources":["../../src/abi.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,6BAA6B,EAC7B,6BAA6B,EAC7B,oBAAoB,EACpB,QAAQ,EACR,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,sBAAsB,CAAA"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/**
|
2
|
+
* @description Generates a random mnemonic phrase with a given wordlist.
|
3
|
+
*
|
4
|
+
* @param wordlist The wordlist to use for generating the mnemonic phrase.
|
5
|
+
*
|
6
|
+
* @returns A randomly generated mnemonic phrase.
|
7
|
+
*/
|
8
|
+
export declare function generateMnemonic(wordlist: string[]): string;
|
9
|
+
//# sourceMappingURL=generateMnemonic.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"generateMnemonic.d.ts","sourceRoot":"","sources":["../../../src/accounts/generateMnemonic.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAE3D"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"generatePrivateKey.d.ts","sourceRoot":"","sources":["../../../src/accounts/generatePrivateKey.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAG5C;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,GAAG,CAExC"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { HDKey } from '@scure/bip32';
|
2
|
+
import type { HDAccount, HDOptions } from './types.js';
|
3
|
+
/**
|
4
|
+
* @description Creates an Account from a HD Key.
|
5
|
+
*
|
6
|
+
* @returns A HD Account.
|
7
|
+
*/
|
8
|
+
export declare function hdKeyToAccount(hdKey_: HDKey, { accountIndex, addressIndex, changeIndex, path }?: HDOptions): HDAccount;
|
9
|
+
//# sourceMappingURL=hdKeyToAccount.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"hdKeyToAccount.d.ts","sourceRoot":"","sources":["../../../src/accounts/hdKeyToAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAIzC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAEtD;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,KAAK,EACb,EAAE,YAAgB,EAAE,YAAgB,EAAE,WAAe,EAAE,IAAI,EAAE,GAAE,SAAc,GAC5E,SAAS,CAUX"}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { HDKey } from '@scure/bip32';
|
2
|
+
export { HDKey };
|
3
|
+
export { generateMnemonic } from './generateMnemonic.js';
|
4
|
+
export { generatePrivateKey } from './generatePrivateKey.js';
|
5
|
+
export { hdKeyToAccount } from './hdKeyToAccount.js';
|
6
|
+
export { mnemonicToAccount } from './mnemonicToAccount.js';
|
7
|
+
export { privateKeyToAccount } from './privateKeyToAccount.js';
|
8
|
+
export { toAccount } from './toAccount.js';
|
9
|
+
export type { Account, AccountSource, CustomSource, HDOptions, JsonRpcAccount, LocalAccount, HDAccount, PrivateKeyAccount, } from './types.js';
|
10
|
+
export type { SignMessageParameters, SignMessageReturnType, SignTypedDataParameters, SignTypedDataReturnType, } from './utils/index.js';
|
11
|
+
export { parseAccount, publicKeyToAddress, signMessage, signTypedData, } from './utils/index.js';
|
12
|
+
export { czech } from './wordlists/czech.js';
|
13
|
+
export { english } from './wordlists/english.js';
|
14
|
+
export { french } from './wordlists/french.js';
|
15
|
+
export { italian } from './wordlists/italian.js';
|
16
|
+
export { japanese } from './wordlists/japanese.js';
|
17
|
+
export { korean } from './wordlists/korean.js';
|
18
|
+
export { simplifiedChinese } from './wordlists/simplifiedChinese.js';
|
19
|
+
export { spanish } from './wordlists/spanish.js';
|
20
|
+
export { traditionalChinese } from './wordlists/traditionalChinese.js';
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/accounts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AACpC,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAE5D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAEpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAE9D,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C,YAAY,EACV,OAAO,EACP,aAAa,EACb,YAAY,EACZ,SAAS,EACT,cAAc,EACd,YAAY,EACZ,SAAS,EACT,iBAAiB,GAClB,MAAM,YAAY,CAAA;AAEnB,YAAY,EACV,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,aAAa,GACd,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAA"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import type { HDAccount, HDOptions } from './types.js';
|
2
|
+
/**
|
3
|
+
* @description Creates an Account from a mnemonic phrase.
|
4
|
+
*
|
5
|
+
* @returns A HD Account.
|
6
|
+
*/
|
7
|
+
export declare function mnemonicToAccount(mnemonic: string, opts?: HDOptions): HDAccount;
|
8
|
+
//# sourceMappingURL=mnemonicToAccount.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mnemonicToAccount.d.ts","sourceRoot":"","sources":["../../../src/accounts/mnemonicToAccount.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAEtD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,IAAI,GAAE,SAAc,GACnB,SAAS,CAGX"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { Hex } from '../types/index.js';
|
2
|
+
import type { PrivateKeyAccount } from './types.js';
|
3
|
+
/**
|
4
|
+
* @description Creates an Account from a private key.
|
5
|
+
*
|
6
|
+
* @returns A Private Key Account.
|
7
|
+
*/
|
8
|
+
export declare function privateKeyToAccount(privateKey: Hex): PrivateKeyAccount;
|
9
|
+
//# sourceMappingURL=privateKeyToAccount.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"privateKeyToAccount.d.ts","sourceRoot":"","sources":["../../../src/accounts/privateKeyToAccount.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAS5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAEnD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,GAAG,GAAG,iBAAiB,CAsBtE"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { Address } from '../types/index.js';
|
2
|
+
import type { AccountSource, CustomSource, JsonRpcAccount, LocalAccount } from './types.js';
|
3
|
+
type GetAccountReturnType<TAccountSource extends AccountSource> = (TAccountSource extends Address ? JsonRpcAccount : never) | (TAccountSource extends CustomSource ? LocalAccount : never);
|
4
|
+
/**
|
5
|
+
* @description Creates an Account from a custom signing implementation.
|
6
|
+
*
|
7
|
+
* @returns A Local Account.
|
8
|
+
*/
|
9
|
+
export declare function toAccount<TAccountSource extends AccountSource>(source: TAccountSource): GetAccountReturnType<TAccountSource>;
|
10
|
+
export {};
|
11
|
+
//# sourceMappingURL=toAccount.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"toAccount.d.ts","sourceRoot":"","sources":["../../../src/accounts/toAccount.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAEhD,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EACZ,cAAc,EACd,YAAY,EACb,MAAM,YAAY,CAAA;AAEnB,KAAK,oBAAoB,CAAC,cAAc,SAAS,aAAa,IAC1D,CAAC,cAAc,SAAS,OAAO,GAAG,cAAc,GAAG,KAAK,CAAC,GACzD,CAAC,cAAc,SAAS,YAAY,GAAG,YAAY,GAAG,KAAK,CAAC,CAAA;AAEhE;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,cAAc,SAAS,aAAa,EAC5D,MAAM,EAAE,cAAc,GACrB,oBAAoB,CAAC,cAAc,CAAC,CAmBtC"}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import type { HDKey } from '@scure/bip32';
|
2
|
+
import type { Address, TypedData } from 'abitype';
|
3
|
+
import type { Hash, Hex, TransactionSerializable, TypedDataDefinition } from '../types/index.js';
|
4
|
+
export type Account<TAddress extends Address = Address> = JsonRpcAccount<TAddress> | LocalAccount<string, TAddress>;
|
5
|
+
export type AccountSource = Address | CustomSource;
|
6
|
+
export type CustomSource = {
|
7
|
+
address: Address;
|
8
|
+
signMessage: ({ message }: {
|
9
|
+
message: string;
|
10
|
+
}) => Promise<Hash>;
|
11
|
+
signTransaction: (transaction: TransactionSerializable) => Promise<Hash>;
|
12
|
+
signTypedData: <TTypedData extends TypedData | {
|
13
|
+
[key: string]: unknown;
|
14
|
+
}, TPrimaryType extends string = string>(typedData: TypedDataDefinition<TTypedData, TPrimaryType>) => Promise<Hash>;
|
15
|
+
};
|
16
|
+
export type JsonRpcAccount<TAddress extends Address = Address> = {
|
17
|
+
address: TAddress;
|
18
|
+
type: 'json-rpc';
|
19
|
+
};
|
20
|
+
export type LocalAccount<TSource extends string = 'custom', TAddress extends Address = Address> = CustomSource & {
|
21
|
+
address: TAddress;
|
22
|
+
publicKey: Hex;
|
23
|
+
source: TSource;
|
24
|
+
type: 'local';
|
25
|
+
};
|
26
|
+
export type HDAccount = LocalAccount<'hd'> & {
|
27
|
+
getHdKey(): HDKey;
|
28
|
+
};
|
29
|
+
export type HDOptions = {
|
30
|
+
/** The account index to use in the path (`"m/44'/60'/${accountIndex}'/0/0"`). */
|
31
|
+
accountIndex?: number;
|
32
|
+
/** The address index to use in the path (`"m/44'/60'/0'/0/${addressIndex}"`). */
|
33
|
+
addressIndex?: number;
|
34
|
+
/** The change index to use in the path (`"m/44'/60'/0'/${changeIndex}/0"`). */
|
35
|
+
changeIndex?: number;
|
36
|
+
path?: never;
|
37
|
+
} | {
|
38
|
+
accountIndex?: never;
|
39
|
+
addressIndex?: never;
|
40
|
+
changeIndex?: never;
|
41
|
+
/** The HD path. */
|
42
|
+
path: `m/44'/60'/${string}`;
|
43
|
+
};
|
44
|
+
export type PrivateKeyAccount = LocalAccount<'privateKey'>;
|
45
|
+
//# sourceMappingURL=types.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/accounts/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACjD,OAAO,KAAK,EACV,IAAI,EACJ,GAAG,EACH,uBAAuB,EACvB,mBAAmB,EACpB,MAAM,mBAAmB,CAAA;AAE1B,MAAM,MAAM,OAAO,CAAC,QAAQ,SAAS,OAAO,GAAG,OAAO,IAClD,cAAc,CAAC,QAAQ,CAAC,GACxB,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;AAElC,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,YAAY,CAAA;AAClD,MAAM,MA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K,CAAA;IACpB,YAAY,CAAC,EAAE,KAAK,CAAA;IACpB,WAAW,CAAC,EAAE,KAAK,CAAA;IACnB,mBAAmB;IACnB,IAAI,EAAE,aAAa,MAAM,EAAE,CAAA;CAC5B,CAAA;AAEL,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC,YAAY,CAAC,CAAA"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export { parseAccount } from './parseAccount.js';
|
2
|
+
export { publicKeyToAddress } from './publicKeyToAddress.js';
|
3
|
+
export type { SignMessageParameters, SignMessageReturnType, } from './signMessage.js';
|
4
|
+
export { signMessage } from './signMessage.js';
|
5
|
+
export { signatureToHex } from './signatureToHex.js';
|
6
|
+
export type { SignTransactionArgs, SignTransactionReturnType, } from './signTransaction.js';
|
7
|
+
export { signTransaction } from './signTransaction.js';
|
8
|
+
export type { SignTypedDataParameters, SignTypedDataReturnType, } from './signTypedData.js';
|
9
|
+
export { signTypedData } from './signTypedData.js';
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/accounts/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAE5D,YAAY,EACV,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAEpD,YAAY,EACV,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAEtD,YAAY,EACV,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"parseAccount.d.ts","sourceRoot":"","sources":["../../../../src/accounts/utils/parseAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE1C,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,CAGhE"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import type { Address, Hex } from '../../types/index.js';
|
2
|
+
/**
|
3
|
+
* @description Converts an ECDSA public key to an address.
|
4
|
+
*
|
5
|
+
* @param publicKey The public key to convert.
|
6
|
+
*
|
7
|
+
* @returns The address.
|
8
|
+
*/
|
9
|
+
export declare function publicKeyToAddress(publicKey: Hex): Address;
|
10
|
+
//# sourceMappingURL=publicKeyToAddress.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"publicKeyToAddress.d.ts","sourceRoot":"","sources":["../../../../src/accounts/utils/publicKeyToAddress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAIxD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,GAAG,GAAG,OAAO,CAG1D"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import type { Hex, Signature } from '../../types/index.js';
|
2
|
+
export type SignParameters = {
|
3
|
+
hash: Hex;
|
4
|
+
privateKey: Hex;
|
5
|
+
};
|
6
|
+
export type SignReturnType = Signature;
|
7
|
+
/**
|
8
|
+
* @description Signs a hash with a given private key.
|
9
|
+
*
|
10
|
+
* @param hash The hash to sign.
|
11
|
+
* @param privateKey The private key to sign with.
|
12
|
+
*
|
13
|
+
* @returns The signature.
|
14
|
+
*/
|
15
|
+
export declare function sign({ hash, privateKey, }: SignParameters): Promise<SignReturnType>;
|
16
|
+
//# sourceMappingURL=sign.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"sign.d.ts","sourceRoot":"","sources":["../../../../src/accounts/utils/sign.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAG1D,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,GAAG,CAAA;IACT,UAAU,EAAE,GAAG,CAAA;CAChB,CAAA;AACD,MAAM,MAAM,cAAc,GAAG,SAAS,CAAA;AAEtC;;;;;;;GAOG;AACH,wBAAsB,IAAI,CAAC,EACzB,IAAI,EACJ,UAAU,GACX,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAO1C"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import type { Hex } from '../../types/index.js';
|
2
|
+
export type SignMessageParameters = {
|
3
|
+
/** The message to sign. */
|
4
|
+
message: string;
|
5
|
+
/** The private key to sign with. */
|
6
|
+
privateKey: Hex;
|
7
|
+
};
|
8
|
+
export type SignMessageReturnType = Hex;
|
9
|
+
/**
|
10
|
+
* @description Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191):
|
11
|
+
* `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`.
|
12
|
+
*
|
13
|
+
* @returns The signature.
|
14
|
+
*/
|
15
|
+
export declare function signMessage({ message, privateKey, }: SignMessageParameters): Promise<SignMessageReturnType>;
|
16
|
+
//# sourceMappingURL=signMessage.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"signMessage.d.ts","sourceRoot":"","sources":["../../../../src/accounts/utils/signMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAK/C,MAAM,MAAM,qBAAqB,GAAG;IAClC,2BAA2B;IAC3B,OAAO,EAAE,MAAM,CAAA;IACf,oCAAoC;IACpC,UAAU,EAAE,GAAG,CAAA;CAChB,CAAA;AACD,MAAM,MAAM,qBAAqB,GAAG,GAAG,CAAA;AAEvC;;;;;GAKG;AACH,wBAAsB,WAAW,CAAC,EAChC,OAAO,EACP,UAAU,GACX,EAAE,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAGxD"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { Hex, TransactionSerializable, TransactionSerialized, TransactionType } from '../../types/index.js';
|
2
|
+
import type { GetTransactionType } from '../../utils/index.js';
|
3
|
+
export type SignTransactionArgs<TTransactionSerializable extends TransactionSerializable = TransactionSerializable> = {
|
4
|
+
privateKey: Hex;
|
5
|
+
transaction: TTransactionSerializable;
|
6
|
+
};
|
7
|
+
export type SignTransactionReturnType<TTransactionSerializable extends TransactionSerializable = TransactionSerializable, TTransactionType extends TransactionType = GetTransactionType<TTransactionSerializable>> = TransactionSerialized<TTransactionType>;
|
8
|
+
export declare function signTransaction<TTransactionSerializable extends TransactionSerializable>({ privateKey, transaction, }: SignTransactionArgs<TTransactionSerializable>): Promise<SignTransactionReturnType<TTransactionSerializable>>;
|
9
|
+
//# sourceMappingURL=signTransaction.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"signTransaction.d.ts","sourceRoot":"","sources":["../../../../src/accounts/utils/signTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,GAAG,EACH,uBAAuB,EACvB,qBAAqB,EACrB,eAAe,EAChB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAG9D,MAAM,MAAM,mBAAmB,CAC7B,wBAAwB,SAAS,uBAAuB,GAAG,uBAAuB,IAChF;IACF,UAAU,EAAE,GAAG,CAAA;IACf,WAAW,EAAE,wBAAwB,CAAA;CACtC,CAAA;AACD,MAAM,MAAM,yBAAyB,CACnC,wBAAwB,SAAS,uBAAuB,GAAG,uBAAuB,EAClF,gBAAgB,SAAS,eAAe,GAAG,kBAAkB,CAAC,wBAAwB,CAAC,IACrF,qBAAqB,CAAC,gBAAgB,CAAC,CAAA;AAE3C,wBAAsB,eAAe,CACnC,wBAAwB,SAAS,uBAAuB,EACxD,EACA,UAAU,EACV,WAAW,GACZ,EAAE,mBAAmB,CAAC,wBAAwB,CAAC,GAAG,OAAO,CACxD,yBAAyB,CAAC,wBAAwB,CAAC,CACpD,CAMA"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import type { TypedData } from 'abitype';
|
2
|
+
import type { Hex, TypedDataDefinition } from '../../types/index.js';
|
3
|
+
export type SignTypedDataParameters<TTypedData extends TypedData | {
|
4
|
+
[key: string]: unknown;
|
5
|
+
} = TypedData, TPrimaryType extends string = string> = TypedDataDefinition<TTypedData, TPrimaryType> & {
|
6
|
+
/** The private key to sign with. */
|
7
|
+
privateKey: Hex;
|
8
|
+
};
|
9
|
+
export type SignTypedDataReturnType = Hex;
|
10
|
+
/**
|
11
|
+
* @description Signs typed data and calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191):
|
12
|
+
* `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`.
|
13
|
+
*
|
14
|
+
* @returns The signature.
|
15
|
+
*/
|
16
|
+
export declare function signTypedData<TTypedData extends TypedData | {
|
17
|
+
[key: string]: unknown;
|
18
|
+
}, TPrimaryType extends string = string>({ privateKey, ...typedData }: SignTypedDataParameters<TTypedData, TPrimaryType>): Promise<SignTypedDataReturnType>;
|
19
|
+
//# sourceMappingURL=signTypedData.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"signTypedData.d.ts","sourceRoot":"","sources":["../../../../src/accounts/utils/signTypedData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExC,OAAO,KAAK,EAAE,GAAG,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAMpE,MAAM,MAAM,uBAAuB,CACjC,UAAU,SAAS,SAAS,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,GAAG,SAAS,EACrE,YAAY,SAAS,MAAM,GAAG,MAAM,IAClC,mBAAmB,CAAC,UAAU,EAAE,YAAY,CAAC,GAAG;IAClD,oCAAoC;IACpC,UAAU,EAAE,GAAG,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,GAAG,CAAA;AAEzC;;;;;GAKG;AACH,wBAAsB,aAAa,CACjC,UAAU,SAAS,SAAS,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,EACzD,YAAY,SAAS,MAAM,GAAG,MAAM,EACpC,EACA,UAAU,EACV,GAAG,SAAS,EACb,EAAE,uBAAuB,CACxB,UAAU,EACV,YAAY,CACb,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAMnC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"signatureToHex.d.ts","sourceRoot":"","sources":["../../../../src/accounts/utils/signatureToHex.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAG1D,wBAAgB,cAAc,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,SAAS,GAAG,GAAG,CAK1D"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"czech.d.ts","sourceRoot":"","sources":["../../../../src/accounts/wordlists/czech.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,KAAK,EAAE,MAAM,iCAAiC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"english.d.ts","sourceRoot":"","sources":["../../../../src/accounts/wordlists/english.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,OAAO,EAAE,MAAM,mCAAmC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"french.d.ts","sourceRoot":"","sources":["../../../../src/accounts/wordlists/french.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,MAAM,EAAE,MAAM,kCAAkC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"italian.d.ts","sourceRoot":"","sources":["../../../../src/accounts/wordlists/italian.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,OAAO,EAAE,MAAM,mCAAmC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"japanese.d.ts","sourceRoot":"","sources":["../../../../src/accounts/wordlists/japanese.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,QAAQ,EAAE,MAAM,oCAAoC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"korean.d.ts","sourceRoot":"","sources":["../../../../src/accounts/wordlists/korean.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,MAAM,EAAE,MAAM,kCAAkC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"simplifiedChinese.d.ts","sourceRoot":"","sources":["../../../../src/accounts/wordlists/simplifiedChinese.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"spanish.d.ts","sourceRoot":"","sources":["../../../../src/accounts/wordlists/spanish.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,OAAO,EAAE,MAAM,mCAAmC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"traditionalChinese.d.ts","sourceRoot":"","sources":["../../../../src/accounts/wordlists/traditionalChinese.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,kBAAkB,EAAE,MAAM,+CAA+C,CAAA"}
|
@@ -0,0 +1,40 @@
|
|
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 GetEnsAddressParameters = Prettify<Pick<ReadContractParameters, 'blockNumber' | 'blockTag'> & {
|
5
|
+
/** Name to get the address for. */
|
6
|
+
name: string;
|
7
|
+
/** Address of ENS Universal Resolver Contract. */
|
8
|
+
universalResolverAddress?: Address;
|
9
|
+
}>;
|
10
|
+
export type GetEnsAddressReturnType = Address | null;
|
11
|
+
/**
|
12
|
+
* Gets address for ENS name.
|
13
|
+
*
|
14
|
+
* - Docs: https://viem.sh/docs/ens/actions/getEnsAddress.html
|
15
|
+
* - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/ens
|
16
|
+
*
|
17
|
+
* Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract.
|
18
|
+
*
|
19
|
+
* 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.
|
20
|
+
*
|
21
|
+
* @param client - Client to use
|
22
|
+
* @param parameters - {@link GetEnsAddressParameters}
|
23
|
+
* @returns Address for ENS name or `null` if not found. {@link GetEnsAddressReturnType}
|
24
|
+
*
|
25
|
+
* @example
|
26
|
+
* import { createPublicClient, http } from 'viem'
|
27
|
+
* import { mainnet } from 'viem/chains'
|
28
|
+
* import { getEnsAddress, normalize } from 'viem/ens'
|
29
|
+
*
|
30
|
+
* const client = createPublicClient({
|
31
|
+
* chain: mainnet,
|
32
|
+
* transport: http(),
|
33
|
+
* })
|
34
|
+
* const ensAddress = await getEnsAddress(client, {
|
35
|
+
* name: normalize('wagmi-dev.eth'),
|
36
|
+
* })
|
37
|
+
* // '0xd2135CfB216b74109775236E36d4b433F1DF507B'
|
38
|
+
*/
|
39
|
+
export declare function getEnsAddress<TChain extends Chain | undefined>(client: PublicClient<Transport, TChain>, { blockNumber, blockTag, name, universalResolverAddress: universalResolverAddress_, }: GetEnsAddressParameters): Promise<GetEnsAddressReturnType>;
|
40
|
+
//# sourceMappingURL=getEnsAddress.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getEnsAddress.d.ts","sourceRoot":"","sources":["../../../../src/actions/ens/getEnsAddress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAKrE,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAUpE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAEhE,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAC5C,IAAI,CAAC,sBAAsB,EAAE,aAAa,GAAG,UAAU,CAAC,GAAG;IACzD,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAA;IACZ,kDAAkD;IAClD,wBAAwB,CAAC,EAAE,OAAO,CAAA;CACnC,CACF,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,OAAO,GAAG,IAAI,CAAA;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,aAAa,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EAClE,MAAM,EAAE,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,EACvC,EACE,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,wBAAwB,EAAE,yBAAyB,GACpD,EAAE,uBAAuB,GACzB,OAAO,CAAC,uBAAuB,CAAC,CAwClC"}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import type { PublicClient, Transport } from '../../clients/index.js';
|
2
|
+
import type { AssetGatewayUrls, Chain, Prettify } from '../../types/index.js';
|
3
|
+
import type { GetEnsTextParameters } from './getEnsText.js';
|
4
|
+
export type GetEnsAvatarParameters = Prettify<Omit<GetEnsTextParameters, 'key'> & {
|
5
|
+
/** Gateway urls to resolve IPFS and/or Arweave assets. */
|
6
|
+
gatewayUrls?: AssetGatewayUrls;
|
7
|
+
}>;
|
8
|
+
export type GetEnsAvatarReturnType = string | null;
|
9
|
+
/**
|
10
|
+
* Gets the avatar of an ENS name.
|
11
|
+
*
|
12
|
+
* - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar.html
|
13
|
+
* - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/ens
|
14
|
+
*
|
15
|
+
* Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText.html) with `key` set to `'avatar'`.
|
16
|
+
*
|
17
|
+
* 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.
|
18
|
+
*
|
19
|
+
* @param client - Client to use
|
20
|
+
* @param parameters - {@link GetEnsAvatarParameters}
|
21
|
+
* @returns Avatar URI or `null` if not found. {@link GetEnsAvatarReturnType}
|
22
|
+
*
|
23
|
+
* @example
|
24
|
+
* import { createPublicClient, http } from 'viem'
|
25
|
+
* import { mainnet } from 'viem/chains'
|
26
|
+
* import { getEnsAvatar, normalize } from 'viem/ens'
|
27
|
+
*
|
28
|
+
* const client = createPublicClient({
|
29
|
+
* chain: mainnet,
|
30
|
+
* transport: http(),
|
31
|
+
* })
|
32
|
+
* const ensAvatar = await getEnsAvatar(client, {
|
33
|
+
* name: normalize('wagmi-dev.eth'),
|
34
|
+
* })
|
35
|
+
* // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio'
|
36
|
+
*/
|
37
|
+
export declare function getEnsAvatar<TChain extends Chain | undefined>(client: PublicClient<Transport, TChain>, { blockNumber, blockTag, gatewayUrls, name, universalResolverAddress, }: GetEnsAvatarParameters): Promise<GetEnsAvatarReturnType>;
|
38
|
+
//# sourceMappingURL=getEnsAvatar.d.ts.map
|