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,139 @@
|
|
1
|
+
import type { ByteArray, Hex } from '../../types/index.js';
|
2
|
+
export type ToHexParameters = {
|
3
|
+
/** The size (in bytes) of the output hex value. */
|
4
|
+
size?: number;
|
5
|
+
};
|
6
|
+
/**
|
7
|
+
* Encodes a string, number, bigint, or ByteArray into a hex string
|
8
|
+
*
|
9
|
+
* - Docs: https://viem.sh/docs/utilities/toHex.html
|
10
|
+
* - Example: https://viem.sh/docs/utilities/toHex.html#usage
|
11
|
+
*
|
12
|
+
* @param value Value to encode.
|
13
|
+
* @param opts Options.
|
14
|
+
* @returns Hex value.
|
15
|
+
*
|
16
|
+
* @example
|
17
|
+
* import { toHex } from 'viem'
|
18
|
+
* const data = toHex('Hello world')
|
19
|
+
* // '0x48656c6c6f20776f726c6421'
|
20
|
+
*
|
21
|
+
* @example
|
22
|
+
* import { toHex } from 'viem'
|
23
|
+
* const data = toHex(420)
|
24
|
+
* // '0x1a4'
|
25
|
+
*
|
26
|
+
* @example
|
27
|
+
* import { toHex } from 'viem'
|
28
|
+
* const data = toHex('Hello world', { size: 32 })
|
29
|
+
* // '0x48656c6c6f20776f726c64210000000000000000000000000000000000000000'
|
30
|
+
*/
|
31
|
+
export declare function toHex(value: string | number | bigint | boolean | ByteArray, opts?: ToHexParameters): Hex;
|
32
|
+
export type BoolToHexOpts = {
|
33
|
+
/** The size (in bytes) of the output hex value. */
|
34
|
+
size?: number;
|
35
|
+
};
|
36
|
+
/**
|
37
|
+
* Encodes a boolean into a hex string
|
38
|
+
*
|
39
|
+
* - Docs: https://viem.sh/docs/utilities/toHex.html#booltohex
|
40
|
+
*
|
41
|
+
* @param value Value to encode.
|
42
|
+
* @param opts Options.
|
43
|
+
* @returns Hex value.
|
44
|
+
*
|
45
|
+
* @example
|
46
|
+
* import { boolToHex } from 'viem'
|
47
|
+
* const data = boolToHex(true)
|
48
|
+
* // '0x1'
|
49
|
+
*
|
50
|
+
* @example
|
51
|
+
* import { boolToHex } from 'viem'
|
52
|
+
* const data = boolToHex(false)
|
53
|
+
* // '0x0'
|
54
|
+
*
|
55
|
+
* @example
|
56
|
+
* import { boolToHex } from 'viem'
|
57
|
+
* const data = boolToHex(true, { size: 32 })
|
58
|
+
* // '0x0000000000000000000000000000000000000000000000000000000000000001'
|
59
|
+
*/
|
60
|
+
export declare function boolToHex(value: boolean, opts?: BoolToHexOpts): Hex;
|
61
|
+
export type BytesToHexOpts = {
|
62
|
+
/** The size (in bytes) of the output hex value. */
|
63
|
+
size?: number;
|
64
|
+
};
|
65
|
+
/**
|
66
|
+
* Encodes a bytes array into a hex string
|
67
|
+
*
|
68
|
+
* - Docs: https://viem.sh/docs/utilities/toHex.html#bytestohex
|
69
|
+
*
|
70
|
+
* @param value Value to encode.
|
71
|
+
* @param opts Options.
|
72
|
+
* @returns Hex value.
|
73
|
+
*
|
74
|
+
* @example
|
75
|
+
* import { bytesToHex } from 'viem'
|
76
|
+
* const data = bytesToHex(Uint8Array.from([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33])
|
77
|
+
* // '0x48656c6c6f20576f726c6421'
|
78
|
+
*
|
79
|
+
* @example
|
80
|
+
* import { bytesToHex } from 'viem'
|
81
|
+
* const data = bytesToHex(Uint8Array.from([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33]), { size: 32 })
|
82
|
+
* // '0x48656c6c6f20576f726c64210000000000000000000000000000000000000000'
|
83
|
+
*/
|
84
|
+
export declare function bytesToHex(value: ByteArray, opts?: BytesToHexOpts): Hex;
|
85
|
+
export type NumberToHexOpts = {
|
86
|
+
/** Whether or not the number of a signed representation. */
|
87
|
+
signed?: boolean;
|
88
|
+
/** The size (in bytes) of the output hex value. */
|
89
|
+
size: number;
|
90
|
+
} | {
|
91
|
+
signed?: never;
|
92
|
+
/** The size (in bytes) of the output hex value. */
|
93
|
+
size?: number;
|
94
|
+
};
|
95
|
+
/**
|
96
|
+
* Encodes a number or bigint into a hex string
|
97
|
+
*
|
98
|
+
* - Docs: https://viem.sh/docs/utilities/toHex.html#numbertohex
|
99
|
+
*
|
100
|
+
* @param value Value to encode.
|
101
|
+
* @param opts Options.
|
102
|
+
* @returns Hex value.
|
103
|
+
*
|
104
|
+
* @example
|
105
|
+
* import { numberToHex } from 'viem'
|
106
|
+
* const data = numberToHex(420)
|
107
|
+
* // '0x1a4'
|
108
|
+
*
|
109
|
+
* @example
|
110
|
+
* import { numberToHex } from 'viem'
|
111
|
+
* const data = numberToHex(420, { size: 32 })
|
112
|
+
* // '0x00000000000000000000000000000000000000000000000000000000000001a4'
|
113
|
+
*/
|
114
|
+
export declare function numberToHex(value_: number | bigint, opts?: NumberToHexOpts): Hex;
|
115
|
+
export type StringToHexOpts = {
|
116
|
+
/** The size (in bytes) of the output hex value. */
|
117
|
+
size?: number;
|
118
|
+
};
|
119
|
+
/**
|
120
|
+
* Encodes a UTF-8 string into a hex string
|
121
|
+
*
|
122
|
+
* - Docs: https://viem.sh/docs/utilities/toHex.html#stringtohex
|
123
|
+
*
|
124
|
+
* @param value Value to encode.
|
125
|
+
* @param opts Options.
|
126
|
+
* @returns Hex value.
|
127
|
+
*
|
128
|
+
* @example
|
129
|
+
* import { stringToHex } from 'viem'
|
130
|
+
* const data = stringToHex('Hello World!')
|
131
|
+
* // '0x48656c6c6f20576f726c6421'
|
132
|
+
*
|
133
|
+
* @example
|
134
|
+
* import { stringToHex } from 'viem'
|
135
|
+
* const data = stringToHex('Hello World!', { size: 32 })
|
136
|
+
* // '0x48656c6c6f20576f726c64210000000000000000000000000000000000000000'
|
137
|
+
*/
|
138
|
+
export declare function stringToHex(value_: string, opts?: StringToHexOpts): Hex;
|
139
|
+
//# sourceMappingURL=toHex.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"toHex.d.ts","sourceRoot":"","sources":["../../../../src/utils/encoding/toHex.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAQ1D,MAAM,MAAM,eAAe,GAAG;IAC5B,mDAAmD;IACnD,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,KAAK,CACnB,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,EACrD,IAAI,GAAE,eAAoB,GACzB,GAAG,CAQL;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,mDAAmD;IACnD,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,GAAE,aAAkB,GAAG,GAAG,CAOvE;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,mDAAmD;IACnD,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,GAAE,cAAmB,GAAG,GAAG,CAY3E;AAED,MAAM,MAAM,eAAe,GACvB;IACE,4DAA4D;IAC5D,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAA;CACb,GACD;IACE,MAAM,CAAC,EAAE,KAAK,CAAA;IACd,mDAAmD;IACnD,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAEL;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,IAAI,GAAE,eAAoB,GACzB,GAAG,CAgCL;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,mDAAmD;IACnD,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAID;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,GAAE,eAAoB,GAAG,GAAG,CAG3E"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import type { ByteArray, Hex } from '../../types/index.js';
|
2
|
+
export type RecursiveArray<T> = T | RecursiveArray<T>[];
|
3
|
+
type To = 'hex' | 'bytes';
|
4
|
+
export type ToRlpReturnType<TTo extends To> = TTo extends 'bytes' ? ByteArray : TTo extends 'hex' ? Hex : never;
|
5
|
+
export declare function toRlp<TTo extends To = 'hex'>(hexOrBytes: RecursiveArray<Hex> | RecursiveArray<ByteArray>, to_?: TTo): ToRlpReturnType<TTo>;
|
6
|
+
export declare function bytesToRlp(bytes: RecursiveArray<ByteArray>): ByteArray;
|
7
|
+
export {};
|
8
|
+
//# sourceMappingURL=toRlp.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"toRlp.d.ts","sourceRoot":"","sources":["../../../../src/utils/encoding/toRlp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAK1D,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,EAAE,CAAA;AAEvD,KAAK,EAAE,GAAG,KAAK,GAAG,OAAO,CAAA;AAEzB,MAAM,MAAM,eAAe,CAAC,GAAG,SAAS,EAAE,IAAI,GAAG,SAAS,OAAO,GAC7D,SAAS,GACT,GAAG,SAAS,KAAK,GACjB,GAAG,GACH,KAAK,CAAA;AAET,wBAAgB,KAAK,CAAC,GAAG,SAAS,EAAE,GAAG,KAAK,EAC1C,UAAU,EAAE,cAAc,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,SAAS,CAAC,EAC3D,GAAG,CAAC,EAAE,GAAG,wBAIV;AAaD,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,CAAC,SAAS,CAAC,GAAG,SAAS,CAQtE"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/utils/ens/avatar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import type { PublicClient, Transport } from '../../../clients/index.js';
|
2
|
+
import type { AssetGatewayUrls, Chain } from '../../../types/index.js';
|
3
|
+
export declare function parseAvatarRecord<TChain extends Chain | undefined>(client: PublicClient<Transport, TChain>, { gatewayUrls, record, }: {
|
4
|
+
gatewayUrls?: AssetGatewayUrls;
|
5
|
+
record: string;
|
6
|
+
}): Promise<string>;
|
7
|
+
//# sourceMappingURL=parseAvatarRecord.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"parseAvatarRecord.d.ts","sourceRoot":"","sources":["../../../../../src/utils/ens/avatar/parseAvatarRecord.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAUtE,wBAAsB,iBAAiB,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EACtE,MAAM,EAAE,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,EACvC,EACE,WAAW,EACX,MAAM,GACP,EAAE;IACD,WAAW,CAAC,EAAE,gBAAgB,CAAA;IAC9B,MAAM,EAAE,MAAM,CAAA;CACf,GACA,OAAO,CAAC,MAAM,CAAC,CAIjB"}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import type { PublicClient, Transport } from '../../../clients/index.js';
|
2
|
+
import type { Address, AssetGatewayUrls, Chain } from '../../../types/index.js';
|
3
|
+
type UriItem = {
|
4
|
+
uri: string;
|
5
|
+
isOnChain: boolean;
|
6
|
+
isEncoded: boolean;
|
7
|
+
};
|
8
|
+
export declare function isImageUri(uri: string): Promise<unknown>;
|
9
|
+
export declare function getGateway(custom: string | undefined, defaultGateway: string): string;
|
10
|
+
export declare function resolveAvatarUri({ uri, gatewayUrls, }: {
|
11
|
+
uri: string;
|
12
|
+
gatewayUrls?: AssetGatewayUrls | undefined;
|
13
|
+
}): UriItem;
|
14
|
+
export declare function getJsonImage(data: any): any;
|
15
|
+
export declare function getMetadataAvatarUri({ gatewayUrls, uri, }: {
|
16
|
+
gatewayUrls?: AssetGatewayUrls | undefined;
|
17
|
+
uri: string;
|
18
|
+
}): Promise<string>;
|
19
|
+
export declare function parseAvatarUri({ gatewayUrls, uri, }: {
|
20
|
+
gatewayUrls?: AssetGatewayUrls | undefined;
|
21
|
+
uri: string;
|
22
|
+
}): Promise<string>;
|
23
|
+
type ParsedNft = {
|
24
|
+
chainID: number;
|
25
|
+
namespace: string;
|
26
|
+
contractAddress: Address;
|
27
|
+
tokenID: string;
|
28
|
+
};
|
29
|
+
export declare function parseNftUri(uri: string): ParsedNft;
|
30
|
+
export declare function getNftTokenUri<TChain extends Chain | undefined>(client: PublicClient<Transport, TChain>, { nft }: {
|
31
|
+
nft: ParsedNft;
|
32
|
+
}): Promise<string>;
|
33
|
+
export {};
|
34
|
+
//# sourceMappingURL=utils.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/utils/ens/avatar/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAOxE,OAAO,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAE/E,KAAK,OAAO,GAAG;IACb,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,EAAE,OAAO,CAAA;IAClB,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AASD,wBAAsB,UAAU,CAAC,GAAG,EAAE,MAAM,oBA4B3C;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,cAAc,EAAE,MAAM,UAI5E;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,GAAG,EACH,WAAW,GACZ,EAAE;IACD,GAAG,EAAE,MAAM,CAAA;IACX,WAAW,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAA;CAC3C,GAAG,OAAO,CAuDV;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,GAAG,OAUrC;AAED,wBAAsB,oBAAoB,CAAC,EACzC,WAAW,EACX,GAAG,GACJ,EAAE;IACD,WAAW,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAA;IAC1C,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,OAAO,CAAC,MAAM,CAAC,CAWlB;AAED,wBAAsB,cAAc,CAAC,EACnC,WAAW,EACX,GAAG,GACJ,EAAE;IACD,WAAW,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAA;IAC1C,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,OAAO,CAAC,MAAM,CAAC,CASlB;AAED,KAAK,SAAS,GAAG;IACf,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,eAAe,EAAE,OAAO,CAAA;IACxB,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CA+BlD;AAED,wBAAsB,cAAc,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EACnE,MAAM,EAAE,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,EACvC,EAAE,GAAG,EAAE,EAAE;IAAE,GAAG,EAAE,SAAS,CAAA;CAAE,mBAmC5B"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/ens/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* @description Hashes ENS label
|
3
|
+
*
|
4
|
+
* - Since ENS labels prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS labels](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `labelhash`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize.html) function for this.
|
5
|
+
*
|
6
|
+
* @example
|
7
|
+
* labelhash('eth')
|
8
|
+
* '0x4f5b812789fc606be1b3b16908db13fc7a9adf7ca72641f84d75b47069d3d7f0'
|
9
|
+
*/
|
10
|
+
export declare function labelhash(label: string): `0x${string}`;
|
11
|
+
//# sourceMappingURL=labelhash.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"labelhash.d.ts","sourceRoot":"","sources":["../../../../src/utils/ens/labelhash.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,iBAItC"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/**
|
2
|
+
* @description Hashes ENS name
|
3
|
+
*
|
4
|
+
* - 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 `namehash`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize.html) function for this.
|
5
|
+
*
|
6
|
+
* @example
|
7
|
+
* namehash('wagmi-dev.eth')
|
8
|
+
* '0xf246651c1b9a6b141d19c2604e9a58f567973833990f830d882534a747801359'
|
9
|
+
*
|
10
|
+
* @link https://eips.ethereum.org/EIPS/eip-137
|
11
|
+
*/
|
12
|
+
export declare function namehash(name: string): `0x${string}`;
|
13
|
+
//# sourceMappingURL=namehash.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"namehash.d.ts","sourceRoot":"","sources":["../../../../src/utils/ens/namehash.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,iBAYpC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/**
|
2
|
+
* @description Normalizes ENS name according to ENSIP-15.
|
3
|
+
*
|
4
|
+
* @example
|
5
|
+
* normalize('wagmi-dev.eth')
|
6
|
+
* 'wagmi-dev.eth'
|
7
|
+
*
|
8
|
+
* @see https://docs.ens.domains/contract-api-reference/name-processing#normalising-names
|
9
|
+
* @see https://github.com/ensdomains/docs/blob/9edf9443de4333a0ea7ec658a870672d5d180d53/ens-improvement-proposals/ensip-15-normalization-standard.md
|
10
|
+
*/
|
11
|
+
export declare function normalize(name: string): string;
|
12
|
+
//# sourceMappingURL=normalize.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../../../src/utils/ens/normalize.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,UAErC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"packetToBytes.d.ts","sourceRoot":"","sources":["../../../../src/utils/ens/packetToBytes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAMrD,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAqBvD"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { CallParameters } from '../../actions/index.js';
|
2
|
+
import type { BaseError } from '../../errors/index.js';
|
3
|
+
import { CallExecutionError } from '../../errors/index.js';
|
4
|
+
import type { Chain } from '../../types/index.js';
|
5
|
+
export declare function getCallError(err: BaseError, { docsPath, ...args }: CallParameters & {
|
6
|
+
chain?: Chain;
|
7
|
+
docsPath?: string;
|
8
|
+
}): CallExecutionError;
|
9
|
+
//# sourceMappingURL=getCallError.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getCallError.d.ts","sourceRoot":"","sources":["../../../../src/utils/errors/getCallError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAC1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAGjD,wBAAgB,YAAY,CAC1B,GAAG,EAAE,SAAS,EACd,EACE,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,cAAc,GAAG;IAClB,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,sBAQF"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import type { Abi } from 'abitype';
|
2
|
+
import type { BaseError } from '../../errors/index.js';
|
3
|
+
import { ContractFunctionExecutionError } from '../../errors/index.js';
|
4
|
+
import type { Address } from '../../types/index.js';
|
5
|
+
export declare function getContractError(err: BaseError, { abi, address, args, docsPath, functionName, sender, }: {
|
6
|
+
abi: Abi;
|
7
|
+
args: any;
|
8
|
+
address?: Address;
|
9
|
+
docsPath?: string;
|
10
|
+
functionName: string;
|
11
|
+
sender?: Address;
|
12
|
+
}): ContractFunctionExecutionError;
|
13
|
+
//# sourceMappingURL=getContractError.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getContractError.d.ts","sourceRoot":"","sources":["../../../../src/utils/errors/getContractError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAClC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAEL,8BAA8B,EAG/B,MAAM,uBAAuB,CAAA;AAM9B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAInD,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,SAAS,EACd,EACE,GAAG,EACH,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,MAAM,GACP,EAAE;IACD,GAAG,EAAE,GAAG,CAAA;IACR,IAAI,EAAE,GAAG,CAAA;IACT,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,kCAmCF"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import type { EstimateGasParameters } from '../../actions/index.js';
|
2
|
+
import type { BaseError } from '../../errors/index.js';
|
3
|
+
import { EstimateGasExecutionError } from '../../errors/index.js';
|
4
|
+
import type { Account, Chain } from '../../types/index.js';
|
5
|
+
export declare function getEstimateGasError(err: BaseError, { docsPath, ...args }: Omit<EstimateGasParameters, 'account'> & {
|
6
|
+
account?: Account;
|
7
|
+
chain?: Chain;
|
8
|
+
docsPath?: string;
|
9
|
+
}): EstimateGasExecutionError;
|
10
|
+
//# sourceMappingURL=getEstimateGasError.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getEstimateGasError.d.ts","sourceRoot":"","sources":["../../../../src/utils/errors/getEstimateGasError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAG1D,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,SAAS,EACd,EACE,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,IAAI,CAAC,qBAAqB,EAAE,SAAS,CAAC,GAAG;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,6BAQF"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import type { SendTransactionParameters } from '../../actions/index.js';
|
2
|
+
import { type BaseError } from '../../errors/index.js';
|
3
|
+
import { ExecutionRevertedError, FeeCapTooHighError, FeeCapTooLowError, InsufficientFundsError, IntrinsicGasTooHighError, IntrinsicGasTooLowError, NonceMaxValueError, NonceTooHighError, NonceTooLowError, TipAboveFeeCapError, TransactionTypeNotSupportedError, UnknownNodeError } from '../../errors/index.js';
|
4
|
+
export declare function containsNodeError(err: BaseError): boolean;
|
5
|
+
export declare function getNodeError(err: BaseError, args: Partial<SendTransactionParameters<any>>): ExecutionRevertedError | FeeCapTooHighError | FeeCapTooLowError | NonceTooHighError | NonceTooLowError | NonceMaxValueError | InsufficientFundsError | IntrinsicGasTooHighError | IntrinsicGasTooLowError | TransactionTypeNotSupportedError | TipAboveFeeCapError | UnknownNodeError;
|
6
|
+
//# sourceMappingURL=getNodeError.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getNodeError.d.ts","sourceRoot":"","sources":["../../../../src/utils/errors/getNodeError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAA;AACvE,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACvE,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EAEvB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EAEnB,gCAAgC,EAChC,gBAAgB,EACjB,MAAM,uBAAuB,CAAA;AAE9B,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,SAAS,WAM/C;AAED,wBAAgB,YAAY,CAC1B,GAAG,EAAE,SAAS,EACd,IAAI,EAAE,OAAO,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC,yRA6C9C"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import type { BaseError } from '../../errors/index.js';
|
2
|
+
import { TransactionExecutionError } from '../../errors/index.js';
|
3
|
+
import type { Account, Chain } from '../../types/index.js';
|
4
|
+
import type { SendTransactionParameters } from '../../wallet.js';
|
5
|
+
export declare function getTransactionError(err: BaseError, { docsPath, ...args }: Omit<SendTransactionParameters, 'account' | 'chain'> & {
|
6
|
+
account: Account;
|
7
|
+
chain?: Chain;
|
8
|
+
docsPath?: string;
|
9
|
+
}): TransactionExecutionError;
|
10
|
+
//# sourceMappingURL=getTransactionError.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getTransactionError.d.ts","sourceRoot":"","sources":["../../../../src/utils/errors/getTransactionError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAA;AAGhE,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,SAAS,EACd,EACE,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,IAAI,CAAC,yBAAyB,EAAE,SAAS,GAAG,OAAO,CAAC,GAAG;IACxD,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,6BAQF"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
export { getCallError } from './getCallError.js';
|
2
|
+
export { getContractError } from './getContractError.js';
|
3
|
+
export { getEstimateGasError } from './getEstimateGasError.js';
|
4
|
+
export { containsNodeError, getNodeError } from './getNodeError.js';
|
5
|
+
export { getTransactionError } from './getTransactionError.js';
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAE9D,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import type { Chain } from '../../chains.js';
|
2
|
+
import type { PublicClient, Transport } from '../../clients/index.js';
|
3
|
+
import type { Requests } from '../../types/eip1193.js';
|
4
|
+
import type { Hex } from '../../types/index.js';
|
5
|
+
type CreateFilterRequestScopeParameters = {
|
6
|
+
method: 'eth_newFilter' | 'eth_newPendingTransactionFilter' | 'eth_newBlockFilter';
|
7
|
+
};
|
8
|
+
type CreateFilterRequestScopeReturnType = (id: Hex) => Requests['request'];
|
9
|
+
/**
|
10
|
+
* Scopes `request` to the filter ID. If the client is a fallback, it will
|
11
|
+
* listen for responses and scope the child transport `request` function
|
12
|
+
* to the successful filter ID.
|
13
|
+
*/
|
14
|
+
export declare function createFilterRequestScope<TChain extends Chain | undefined>(client: PublicClient<Transport, TChain>, { method }: CreateFilterRequestScopeParameters): CreateFilterRequestScopeReturnType;
|
15
|
+
export {};
|
16
|
+
//# sourceMappingURL=createFilterRequestScope.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"createFilterRequestScope.d.ts","sourceRoot":"","sources":["../../../../src/utils/filters/createFilterRequestScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAErE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACtD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAE/C,KAAK,kCAAkC,GAAG;IACxC,MAAM,EACF,eAAe,GACf,iCAAiC,GACjC,oBAAoB,CAAA;CACzB,CAAA;AAED,KAAK,kCAAkC,GAAG,CAAC,EAAE,EAAE,GAAG,KAAK,QAAQ,CAAC,SAAS,CAAC,CAAA;AAE1E;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EACvE,MAAM,EAAE,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,EACvC,EAAE,MAAM,EAAE,EAAE,kCAAkC,GAC7C,kCAAkC,CAkBpC"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import type { Chain, Block, Formatter, Formatters, RpcBlock } from '../../types/index.js';
|
2
|
+
import type { ExtractFormatter, Formatted } from './format.js';
|
3
|
+
export type BlockFormatter<TChain extends Chain | undefined = Chain> = TChain extends Chain ? ExtractFormatter<TChain, 'block', NonNullable<Formatters['block']>> : Formatters['block'];
|
4
|
+
export type FormattedBlock<TFormatter extends Formatter | undefined = Formatter> = Formatted<TFormatter, Block>;
|
5
|
+
export declare function formatBlock(block: Partial<RpcBlock>): Block;
|
6
|
+
export declare const defineBlock: <TFormat extends Formatter<Partial<RpcBlock>, Partial<Block> & {
|
7
|
+
[key: string]: unknown;
|
8
|
+
}>, TExclude extends (keyof RpcBlock)[] = []>({ exclude, format: formatOverride, }: {
|
9
|
+
exclude?: TExclude | undefined;
|
10
|
+
format?: TFormat | undefined;
|
11
|
+
}) => (data: Partial<RpcBlock> & {
|
12
|
+
[key: string]: unknown;
|
13
|
+
}) => Block & ReturnType<TFormat> & { [K in TExclude[number]]: never; };
|
14
|
+
//# sourceMappingURL=block.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../../../src/utils/formatters/block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,KAAK,EACL,SAAS,EACT,UAAU,EACV,QAAQ,EACT,MAAM,sBAAsB,CAAA;AAE7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAG9D,MAAM,MAAM,cAAc,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,IACjE,MAAM,SAAS,KAAK,GAChB,gBAAgB,CAAC,MAAM,EAAE,OAAO,EAAE,WAAW,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,GACnE,UAAU,CAAC,OAAO,CAAC,CAAA;AAEzB,MAAM,MAAM,cAAc,CACxB,UAAU,SAAS,SAAS,GAAG,SAAS,GAAG,SAAS,IAClD,SAAS,CAAC,UAAU,EAAE,KAAK,CAAC,CAAA;AAEhC,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,QAAQ,CAAC,SAuBnD;AAED,eAAO,MAAM,WAAW;;;;;;;uEAA2C,CAAA"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import type { Formatter } from '../../types/index.js';
|
2
|
+
/**
|
3
|
+
* @description Picks out the keys from `value` that exist in the formatter.
|
4
|
+
*/
|
5
|
+
export declare function extract(value: Record<string, unknown>, { formatter }: {
|
6
|
+
formatter?: Formatter;
|
7
|
+
}): {};
|
8
|
+
//# sourceMappingURL=extract.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../../../../src/utils/formatters/extract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAErD;;GAEG;AACH,wBAAgB,OAAO,CACrB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,SAAS,CAAA;CAAE,MAUzC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"feeHistory.d.ts","sourceRoot":"","sources":["../../../../src/utils/formatters/feeHistory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAErE,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,aAAa,GAAG,UAAU,CAStE"}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import type { Chain, Formatter, OptionalNullable } from '../../types/index.js';
|
2
|
+
export type ExtractFormatter<TChain extends Chain, TKey extends keyof NonNullable<TChain['formatters']>, TFallbackFormatter extends Formatter = Formatter> = NonNullable<TChain['formatters']>[TKey] extends NonNullable<unknown> ? NonNullable<TChain['formatters']>[TKey] : TFallbackFormatter;
|
3
|
+
export type FormatOptions<TSource, TTarget> = {
|
4
|
+
formatter: Formatter<TSource, TTarget>;
|
5
|
+
};
|
6
|
+
/**
|
7
|
+
* Creates a type that is the result of applying `TFormatter` to `TSource`.
|
8
|
+
*
|
9
|
+
* @example
|
10
|
+
* Formatted<() => { a: undefined, b: bigint }, { a: bigint }>
|
11
|
+
* => { a: undefined, b: bigint }
|
12
|
+
*
|
13
|
+
* @example
|
14
|
+
* Formatted<() => {}, { a: bigint }>
|
15
|
+
* => { a: bigint }
|
16
|
+
*
|
17
|
+
* @example
|
18
|
+
* Formatted<() => { a: bigint | undefined, b: bigint }, { a: bigint, b: bigint }, true>
|
19
|
+
* => { a?: bigint | undefined, b: bigint }
|
20
|
+
*/
|
21
|
+
export type Formatted<TFormatter, TFallback, TAllowOptional = false, TUseParameters = false> = TFormatter extends Formatter ? ReturnType<TFormatter> extends Record<string, never> ? TFallback : TAllowOptional extends true ? OptionalNullable<TUseParameters extends true ? Parameters<TFormatter>[0] : ReturnType<TFormatter>> : TUseParameters extends true ? Parameters<TFormatter>[0] : ReturnType<TFormatter> : never;
|
22
|
+
/**
|
23
|
+
* @description Formats a data object using the given replacer and an optional formatter.
|
24
|
+
*/
|
25
|
+
export declare function format<TFormatter, TSource extends Record<string, any>, TTarget>(data: TSource, { formatter }: FormatOptions<TSource, TTarget>): Formatted<TFormatter, TTarget, false, false>;
|
26
|
+
export declare function defineFormatter<TSource extends Record<string, unknown>, TFormatted>({ format, }: {
|
27
|
+
format: (data: TSource) => TFormatted;
|
28
|
+
}): <TFormat extends Formatter<TSource, Partial<TFormatted> & {
|
29
|
+
[key: string]: unknown;
|
30
|
+
}>, TExclude extends (keyof TSource)[] = []>({ exclude, format: formatOverride, }: {
|
31
|
+
exclude?: TExclude | undefined;
|
32
|
+
format?: TFormat | undefined;
|
33
|
+
}) => (data: TSource & {
|
34
|
+
[key: string]: unknown;
|
35
|
+
}) => TFormatted & ReturnType<TFormat> & { [K in TExclude[number]]: never; };
|
36
|
+
//# sourceMappingURL=format.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../src/utils/formatters/format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAE9E,MAAM,MAAM,gBAAgB,CAC1B,MAAM,SAAS,KAAK,EACpB,IAAI,SAAS,MAAM,WAAW,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,EACpD,kBAAkB,SAAS,SAAS,GAAG,SAAS,IAC9C,WAAW,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,WAAW,CAAC,OAAO,CAAC,GACpE,WAAW,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,GACvC,kBAAkB,CAAA;AAEtB,MAAM,MAAM,aAAa,CAAC,OAAO,EAAE,OAAO,IAAI;IAC5C,SAAS,EAAE,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;CACvC,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,SAAS,CACnB,UAAU,EACV,SAAS,EACT,cAAc,GAAG,KAAK,EACtB,cAAc,GAAG,KAAK,IACpB,UAAU,SAAS,SAAS,GAE5B,UAAU,CAAC,UAAU,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GAClD,SAAS,GACT,cAAc,SAAS,IAAI,GAC3B,gBAAgB,CACd,cAAc,SAAS,IAAI,GACvB,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GACzB,UAAU,CAAC,UAAU,CAAC,CAC3B,GACD,cAAc,SAAS,IAAI,GAC3B,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GACzB,UAAU,CAAC,UAAU,CAAC,GACxB,KAAK,CAAA;AAET;;GAEG;AACH,wBAAgB,MAAM,CACpB,UAAU,EACV,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACnC,OAAO,EACP,IAAI,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,EAAE,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,gDAE9D;AAED,wBAAgB,eAAe,CAC7B,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvC,UAAU,EACV,EACA,MAAM,GACP,EAAE;IACD,MAAM,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,UAAU,CAAA;CACtC;;;;;;;6EA6BA"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
export type { BlockFormatter, FormattedBlock } from './block.js';
|
2
|
+
export { defineBlock, formatBlock } from './block.js';
|
3
|
+
export { extract } from './extract.js';
|
4
|
+
export { formatFeeHistory } from './feeHistory.js';
|
5
|
+
export type { ExtractFormatter, FormatOptions, Formatted } from './format.js';
|
6
|
+
export { defineFormatter, format } from './format.js';
|
7
|
+
export type { FormattedTransaction, TransactionFormatter, } from './transaction.js';
|
8
|
+
export { defineTransaction, formatTransaction, transactionType, } from './transaction.js';
|
9
|
+
export type { FormattedTransactionReceipt, TransactionReceiptFormatter, } from './transactionReceipt.js';
|
10
|
+
export { defineTransactionReceipt, formatTransactionReceipt, } from './transactionReceipt.js';
|
11
|
+
export type { FormattedTransactionRequest, TransactionRequestFormatter, } from './transactionRequest.js';
|
12
|
+
export { defineTransactionRequest, formatTransactionRequest, } from './transactionRequest.js';
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/formatters/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAChE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAErD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAElD,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAErD,YAAY,EACV,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,GAChB,MAAM,kBAAkB,CAAA;AAEzB,YAAY,EACV,2BAA2B,EAC3B,2BAA2B,GAC5B,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,yBAAyB,CAAA;AAEhC,YAAY,EACV,2BAA2B,EAC3B,2BAA2B,GAC5B,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,yBAAyB,CAAA"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import type { RpcLog } from '../../types/index.js';
|
2
|
+
export declare function formatLog(log: Partial<RpcLog>, { args, eventName }?: {
|
3
|
+
args?: unknown;
|
4
|
+
eventName?: string;
|
5
|
+
}): {
|
6
|
+
address: `0x${string}`;
|
7
|
+
blockHash: `0x${string}` | null;
|
8
|
+
blockNumber: bigint | null;
|
9
|
+
data: `0x${string}`;
|
10
|
+
logIndex: number | null;
|
11
|
+
transactionHash: `0x${string}` | null;
|
12
|
+
transactionIndex: number | null;
|
13
|
+
topics: [] | [`0x${string}`, ...`0x${string}`[]];
|
14
|
+
removed: boolean;
|
15
|
+
};
|
16
|
+
//# sourceMappingURL=log.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../../src/utils/formatters/log.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAO,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAEvD,wBAAgB,SAAS,CACvB,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,EACpB,EAAE,IAAI,EAAE,SAAS,EAAE,GAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAO;;;;;;;;;;EAajE"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import type { Chain, Formatter, Formatters, RpcTransaction, Transaction } from '../../types/index.js';
|
2
|
+
import type { ExtractFormatter, Formatted } from './format.js';
|
3
|
+
export type TransactionFormatter<TChain extends Chain | undefined = Chain> = TChain extends Chain ? ExtractFormatter<TChain, 'transaction', NonNullable<Formatters['transaction']>> : Formatters['transaction'];
|
4
|
+
export type FormattedTransaction<TFormatter extends Formatter | undefined = Formatter> = Formatted<TFormatter, Transaction>;
|
5
|
+
export declare const transactionType: {
|
6
|
+
readonly '0x0': "legacy";
|
7
|
+
readonly '0x1': "eip2930";
|
8
|
+
readonly '0x2': "eip1559";
|
9
|
+
};
|
10
|
+
export declare function formatTransaction(transaction: Partial<RpcTransaction>): Transaction;
|
11
|
+
export declare const defineTransaction: <TFormat extends Formatter<Partial<RpcTransaction>, Partial<Transaction> & {
|
12
|
+
[key: string]: unknown;
|
13
|
+
}>, TExclude extends ("from" | "gas" | "nonce" | "to" | "value" | "type" | "blockNumber" | "blockHash" | "chainId" | "hash" | "input" | "r" | "s" | "transactionIndex" | "v" | "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" | "accessList")[] = []>({ exclude, format: formatOverride, }: {
|
14
|
+
exclude?: TExclude | undefined;
|
15
|
+
format?: TFormat | undefined;
|
16
|
+
}) => (data: Partial<RpcTransaction> & {
|
17
|
+
[key: string]: unknown;
|
18
|
+
}) => Transaction & ReturnType<TFormat> & { [K in TExclude[number]]: never; };
|
19
|
+
//# sourceMappingURL=transaction.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../../../src/utils/formatters/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,SAAS,EACT,UAAU,EACV,cAAc,EACd,WAAW,EACZ,MAAM,sBAAsB,CAAA;AAG7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAE9D,MAAM,MAAM,oBAAoB,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,IACvE,MAAM,SAAS,KAAK,GAChB,gBAAgB,CACd,MAAM,EACN,aAAa,EACb,WAAW,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CACvC,GACD,UAAU,CAAC,aAAa,CAAC,CAAA;AAE/B,MAAM,MAAM,oBAAoB,CAC9B,UAAU,SAAS,SAAS,GAAG,SAAS,GAAG,SAAS,IAClD,SAAS,CAAC,UAAU,EAAE,WAAW,CAAC,CAAA;AAEtC,eAAO,MAAM,eAAe;;;;CAIlB,CAAA;AAEV,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,OAAO,CAAC,cAAc,CAAC,eAoCrE;AAED,eAAO,MAAM,iBAAiB;;;;;;;6EAAiD,CAAA"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import type { Chain, Formatter, Formatters, RpcTransactionReceipt, TransactionReceipt } from '../../types/index.js';
|
2
|
+
import type { ExtractFormatter, Formatted } from './format.js';
|
3
|
+
export type TransactionReceiptFormatter<TChain extends Chain | undefined = Chain> = TChain extends Chain ? ExtractFormatter<TChain, 'transactionReceipt', NonNullable<Formatters['transactionReceipt']>> : Formatters['transactionReceipt'];
|
4
|
+
export type FormattedTransactionReceipt<TFormatter extends Formatter | undefined = Formatter> = Formatted<TFormatter, TransactionReceipt>;
|
5
|
+
export declare function formatTransactionReceipt(transactionReceipt: Partial<RpcTransactionReceipt>): TransactionReceipt;
|
6
|
+
export declare const defineTransactionReceipt: <TFormat extends Formatter<Partial<RpcTransactionReceipt>, Partial<TransactionReceipt> & {
|
7
|
+
[key: string]: unknown;
|
8
|
+
}>, TExclude extends (keyof RpcTransactionReceipt)[] = []>({ exclude, format: formatOverride, }: {
|
9
|
+
exclude?: TExclude | undefined;
|
10
|
+
format?: TFormat | undefined;
|
11
|
+
}) => (data: Partial<RpcTransactionReceipt> & {
|
12
|
+
[key: string]: unknown;
|
13
|
+
}) => TransactionReceipt & ReturnType<TFormat> & { [K in TExclude[number]]: never; };
|
14
|
+
//# sourceMappingURL=transactionReceipt.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"transactionReceipt.d.ts","sourceRoot":"","sources":["../../../../src/utils/formatters/transactionReceipt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,SAAS,EACT,UAAU,EACV,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,sBAAsB,CAAA;AAG7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAI9D,MAAM,MAAM,2BAA2B,CACrC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,IACtC,MAAM,SAAS,KAAK,GACpB,gBAAgB,CACd,MAAM,EACN,oBAAoB,EACpB,WAAW,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC,CAC9C,GACD,UAAU,CAAC,oBAAoB,CAAC,CAAA;AAEpC,MAAM,MAAM,2BAA2B,CACrC,UAAU,SAAS,SAAS,GAAG,SAAS,GAAG,SAAS,IAClD,SAAS,CAAC,UAAU,EAAE,kBAAkB,CAAC,CAAA;AAO7C,wBAAgB,wBAAwB,CACtC,kBAAkB,EAAE,OAAO,CAAC,qBAAqB,CAAC,sBAiCnD;AAED,eAAO,MAAM,wBAAwB;;;;;;;oFAEnC,CAAA"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import type { Chain, Formatter, Formatters, RpcTransactionRequest, TransactionRequest } from '../../types/index.js';
|
2
|
+
import type { ExtractFormatter, Formatted } from './format.js';
|
3
|
+
export type TransactionRequestFormatter<TChain extends Chain | undefined = Chain> = TChain extends Chain ? ExtractFormatter<TChain, 'transactionRequest', NonNullable<Formatters['transactionRequest']>> : Formatters['transactionRequest'];
|
4
|
+
export type FormattedTransactionRequest<TFormatter extends Formatter | undefined = Formatter> = Formatted<TFormatter, RpcTransactionRequest>;
|
5
|
+
export declare function formatTransactionRequest(transactionRequest: Partial<TransactionRequest>): RpcTransactionRequest;
|
6
|
+
export declare const defineTransactionRequest: <TFormat extends Formatter<Partial<TransactionRequest>, Partial<RpcTransactionRequest> & {
|
7
|
+
[key: string]: unknown;
|
8
|
+
}>, TExclude extends ("from" | "data" | "gas" | "nonce" | "to" | "value" | "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" | "accessList")[] = []>({ exclude, format: formatOverride, }: {
|
9
|
+
exclude?: TExclude | undefined;
|
10
|
+
format?: TFormat | undefined;
|
11
|
+
}) => (data: Partial<TransactionRequest> & {
|
12
|
+
[key: string]: unknown;
|
13
|
+
}) => RpcTransactionRequest & ReturnType<TFormat> & { [K in TExclude[number]]: never; };
|
14
|
+
//# sourceMappingURL=transactionRequest.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"transactionRequest.d.ts","sourceRoot":"","sources":["../../../../src/utils/formatters/transactionRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,SAAS,EACT,UAAU,EACV,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAG9D,MAAM,MAAM,2BAA2B,CACrC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,IACtC,MAAM,SAAS,KAAK,GACpB,gBAAgB,CACd,MAAM,EACN,oBAAoB,EACpB,WAAW,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC,CAC9C,GACD,UAAU,CAAC,oBAAoB,CAAC,CAAA;AAEpC,MAAM,MAAM,2BAA2B,CACrC,UAAU,SAAS,SAAS,GAAG,SAAS,GAAG,SAAS,IAClD,SAAS,CAAC,UAAU,EAAE,qBAAqB,CAAC,CAAA;AAEhD,wBAAgB,wBAAwB,CACtC,kBAAkB,EAAE,OAAO,CAAC,kBAAkB,CAAC,yBA6BhD;AAED,eAAO,MAAM,wBAAwB;;;;;;;uFAEnC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getEventSelector.d.ts","sourceRoot":"","sources":["../../../../src/utils/hash/getEventSelector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAG3D,eAAO,MAAM,gBAAgB,UAAW,eAAe,kBAAwB,CAAA"}
|