viem 1.6.4 → 1.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chains/dist/cjs/celo/formatters.js.map +1 -0
- package/chains/dist/cjs/celo/parsers.js.map +1 -0
- package/chains/dist/cjs/celo/serializers.js.map +1 -0
- package/chains/dist/cjs/celo/types.js.map +1 -0
- package/chains/dist/cjs/index.js.map +1 -0
- package/chains/dist/cjs/optimism/fees.js.map +1 -0
- package/chains/dist/cjs/optimism/formatters.js.map +1 -0
- package/chains/dist/cjs/optimism/types.js.map +1 -0
- package/chains/dist/cjs/types.js.map +1 -0
- package/chains/dist/cjs/utils.js.map +1 -0
- package/chains/dist/tsconfig.build.tsbuildinfo +1 -0
- package/chains/node_modules/.bin/tsc +17 -0
- package/chains/node_modules/.bin/tsserver +17 -0
- package/chains/tsconfig.tsbuildinfo +1 -0
- package/dist/cjs/chains/celo/parsers.js +76 -0
- package/dist/cjs/chains/celo/parsers.js.map +1 -0
- package/dist/cjs/chains/celo/serializers.js +2 -1
- package/dist/cjs/chains/celo/serializers.js.map +1 -1
- package/dist/cjs/chains/utils.js +3 -1
- package/dist/cjs/chains/utils.js.map +1 -1
- package/dist/cjs/errors/version.js +1 -1
- package/dist/cjs/utils/rpc.js +5 -7
- package/dist/cjs/utils/rpc.js.map +1 -1
- package/dist/cjs/utils/transaction/parseTransaction.js +8 -3
- package/dist/cjs/utils/transaction/parseTransaction.js.map +1 -1
- package/dist/esm/chains/celo/parsers.js +72 -0
- package/dist/esm/chains/celo/parsers.js.map +1 -0
- package/dist/esm/chains/celo/serializers.js +1 -3
- package/dist/esm/chains/celo/serializers.js.map +1 -1
- package/dist/esm/chains/utils.js +1 -0
- package/dist/esm/chains/utils.js.map +1 -1
- package/dist/esm/errors/version.js +1 -1
- package/dist/esm/utils/rpc.js +5 -7
- package/dist/esm/utils/rpc.js.map +1 -1
- package/dist/esm/utils/transaction/parseTransaction.js +6 -3
- package/dist/esm/utils/transaction/parseTransaction.js.map +1 -1
- package/package.json +1 -1
- package/src/chains/celo/parsers.ts +123 -0
- package/src/chains/celo/serializers.ts +13 -34
- package/src/chains/celo/types.ts +32 -0
- package/src/chains/utils.ts +6 -2
- package/src/errors/version.ts +1 -1
- package/src/utils/rpc.ts +5 -8
- package/src/utils/transaction/parseTransaction.ts +7 -9
- package/dist/types/abi.d.ts +0 -6
- package/dist/types/abi.d.ts.map +0 -1
- package/dist/types/accounts/generateMnemonic.d.ts +0 -9
- package/dist/types/accounts/generateMnemonic.d.ts.map +0 -1
- package/dist/types/accounts/generatePrivateKey.d.ts +0 -8
- package/dist/types/accounts/generatePrivateKey.d.ts.map +0 -1
- package/dist/types/accounts/hdKeyToAccount.d.ts +0 -9
- package/dist/types/accounts/hdKeyToAccount.d.ts.map +0 -1
- package/dist/types/accounts/index.d.ts +0 -27
- package/dist/types/accounts/index.d.ts.map +0 -1
- package/dist/types/accounts/mnemonicToAccount.d.ts +0 -8
- package/dist/types/accounts/mnemonicToAccount.d.ts.map +0 -1
- package/dist/types/accounts/privateKeyToAccount.d.ts +0 -9
- package/dist/types/accounts/privateKeyToAccount.d.ts.map +0 -1
- package/dist/types/accounts/toAccount.d.ts +0 -11
- package/dist/types/accounts/toAccount.d.ts.map +0 -1
- package/dist/types/accounts/types.d.ts +0 -52
- package/dist/types/accounts/types.d.ts.map +0 -1
- package/dist/types/accounts/utils/parseAccount.d.ts +0 -4
- package/dist/types/accounts/utils/parseAccount.d.ts.map +0 -1
- package/dist/types/accounts/utils/privateKeyToAddress.d.ts +0 -11
- package/dist/types/accounts/utils/privateKeyToAddress.d.ts.map +0 -1
- package/dist/types/accounts/utils/publicKeyToAddress.d.ts +0 -11
- package/dist/types/accounts/utils/publicKeyToAddress.d.ts.map +0 -1
- package/dist/types/accounts/utils/sign.d.ts +0 -16
- package/dist/types/accounts/utils/sign.d.ts.map +0 -1
- package/dist/types/accounts/utils/signMessage.d.ts +0 -16
- package/dist/types/accounts/utils/signMessage.d.ts.map +0 -1
- package/dist/types/accounts/utils/signTransaction.d.ts +0 -12
- package/dist/types/accounts/utils/signTransaction.d.ts.map +0 -1
- package/dist/types/accounts/utils/signTypedData.d.ts +0 -20
- package/dist/types/accounts/utils/signTypedData.d.ts.map +0 -1
- package/dist/types/accounts/wordlists/czech.d.ts +0 -2
- package/dist/types/accounts/wordlists/czech.d.ts.map +0 -1
- package/dist/types/accounts/wordlists/english.d.ts +0 -2
- package/dist/types/accounts/wordlists/english.d.ts.map +0 -1
- package/dist/types/accounts/wordlists/french.d.ts +0 -2
- package/dist/types/accounts/wordlists/french.d.ts.map +0 -1
- package/dist/types/accounts/wordlists/italian.d.ts +0 -2
- package/dist/types/accounts/wordlists/italian.d.ts.map +0 -1
- package/dist/types/accounts/wordlists/japanese.d.ts +0 -2
- package/dist/types/accounts/wordlists/japanese.d.ts.map +0 -1
- package/dist/types/accounts/wordlists/korean.d.ts +0 -2
- package/dist/types/accounts/wordlists/korean.d.ts.map +0 -1
- package/dist/types/accounts/wordlists/simplifiedChinese.d.ts +0 -2
- package/dist/types/accounts/wordlists/simplifiedChinese.d.ts.map +0 -1
- package/dist/types/accounts/wordlists/spanish.d.ts +0 -2
- package/dist/types/accounts/wordlists/spanish.d.ts.map +0 -1
- package/dist/types/accounts/wordlists/traditionalChinese.d.ts +0 -2
- package/dist/types/accounts/wordlists/traditionalChinese.d.ts.map +0 -1
- package/dist/types/actions/ens/getEnsAddress.d.ts +0 -45
- package/dist/types/actions/ens/getEnsAddress.d.ts.map +0 -1
- package/dist/types/actions/ens/getEnsAvatar.d.ts +0 -41
- package/dist/types/actions/ens/getEnsAvatar.d.ts.map +0 -1
- package/dist/types/actions/ens/getEnsName.d.ts +0 -41
- package/dist/types/actions/ens/getEnsName.d.ts.map +0 -1
- package/dist/types/actions/ens/getEnsResolver.d.ts +0 -43
- package/dist/types/actions/ens/getEnsResolver.d.ts.map +0 -1
- package/dist/types/actions/ens/getEnsText.d.ts +0 -46
- package/dist/types/actions/ens/getEnsText.d.ts.map +0 -1
- package/dist/types/actions/getContract.d.ts +0 -314
- package/dist/types/actions/getContract.d.ts.map +0 -1
- package/dist/types/actions/index.d.ts +0 -80
- package/dist/types/actions/index.d.ts.map +0 -1
- package/dist/types/actions/public/call.d.ts +0 -56
- package/dist/types/actions/public/call.d.ts.map +0 -1
- package/dist/types/actions/public/createBlockFilter.d.ts +0 -28
- package/dist/types/actions/public/createBlockFilter.d.ts.map +0 -1
- package/dist/types/actions/public/createContractEventFilter.d.ts +0 -50
- package/dist/types/actions/public/createContractEventFilter.d.ts.map +0 -1
- package/dist/types/actions/public/createEventFilter.d.ts +0 -76
- package/dist/types/actions/public/createEventFilter.d.ts.map +0 -1
- package/dist/types/actions/public/createPendingTransactionFilter.d.ts +0 -28
- package/dist/types/actions/public/createPendingTransactionFilter.d.ts.map +0 -1
- package/dist/types/actions/public/estimateContractGas.d.ts +0 -39
- package/dist/types/actions/public/estimateContractGas.d.ts.map +0 -1
- package/dist/types/actions/public/estimateGas.d.ts +0 -49
- package/dist/types/actions/public/estimateGas.d.ts.map +0 -1
- package/dist/types/actions/public/getBalance.d.ts +0 -55
- package/dist/types/actions/public/getBalance.d.ts.map +0 -1
- package/dist/types/actions/public/getBlock.d.ts +0 -56
- package/dist/types/actions/public/getBlock.d.ts.map +0 -1
- package/dist/types/actions/public/getBlockNumber.d.ts +0 -57
- package/dist/types/actions/public/getBlockNumber.d.ts.map +0 -1
- package/dist/types/actions/public/getBlockTransactionCount.d.ts +0 -47
- package/dist/types/actions/public/getBlockTransactionCount.d.ts.map +0 -1
- package/dist/types/actions/public/getBytecode.d.ts +0 -41
- package/dist/types/actions/public/getBytecode.d.ts.map +0 -1
- package/dist/types/actions/public/getChainId.d.ts +0 -28
- package/dist/types/actions/public/getChainId.d.ts.map +0 -1
- package/dist/types/actions/public/getFeeHistory.d.ts +0 -53
- package/dist/types/actions/public/getFeeHistory.d.ts.map +0 -1
- package/dist/types/actions/public/getFilterChanges.d.ts +0 -96
- package/dist/types/actions/public/getFilterChanges.d.ts.map +0 -1
- package/dist/types/actions/public/getFilterLogs.d.ts +0 -40
- package/dist/types/actions/public/getFilterLogs.d.ts.map +0 -1
- package/dist/types/actions/public/getGasPrice.d.ts +0 -27
- package/dist/types/actions/public/getGasPrice.d.ts.map +0 -1
- package/dist/types/actions/public/getLogs.d.ts +0 -71
- package/dist/types/actions/public/getLogs.d.ts.map +0 -1
- package/dist/types/actions/public/getStorageAt.d.ts +0 -43
- package/dist/types/actions/public/getStorageAt.d.ts.map +0 -1
- package/dist/types/actions/public/getTransaction.d.ts +0 -65
- package/dist/types/actions/public/getTransaction.d.ts.map +0 -1
- package/dist/types/actions/public/getTransactionConfirmations.d.ts +0 -41
- package/dist/types/actions/public/getTransactionConfirmations.d.ts.map +0 -1
- package/dist/types/actions/public/getTransactionCount.d.ts +0 -44
- package/dist/types/actions/public/getTransactionCount.d.ts.map +0 -1
- package/dist/types/actions/public/getTransactionReceipt.d.ts +0 -36
- package/dist/types/actions/public/getTransactionReceipt.d.ts.map +0 -1
- package/dist/types/actions/public/multicall.d.ts +0 -56
- package/dist/types/actions/public/multicall.d.ts.map +0 -1
- package/dist/types/actions/public/readContract.d.ts +0 -41
- package/dist/types/actions/public/readContract.d.ts.map +0 -1
- package/dist/types/actions/public/simulateContract.d.ts +0 -54
- package/dist/types/actions/public/simulateContract.d.ts.map +0 -1
- package/dist/types/actions/public/uninstallFilter.d.ts +0 -34
- package/dist/types/actions/public/uninstallFilter.d.ts.map +0 -1
- package/dist/types/actions/public/verifyHash.d.ts +0 -24
- package/dist/types/actions/public/verifyHash.d.ts.map +0 -1
- package/dist/types/actions/public/verifyMessage.d.ts +0 -28
- package/dist/types/actions/public/verifyMessage.d.ts.map +0 -1
- package/dist/types/actions/public/verifyTypedData.d.ts +0 -27
- package/dist/types/actions/public/verifyTypedData.d.ts.map +0 -1
- package/dist/types/actions/public/waitForTransactionReceipt.d.ts +0 -72
- package/dist/types/actions/public/waitForTransactionReceipt.d.ts.map +0 -1
- package/dist/types/actions/public/watchBlockNumber.d.ts +0 -59
- package/dist/types/actions/public/watchBlockNumber.d.ts.map +0 -1
- package/dist/types/actions/public/watchBlocks.d.ts +0 -67
- package/dist/types/actions/public/watchBlocks.d.ts.map +0 -1
- package/dist/types/actions/public/watchContractEvent.d.ts +0 -89
- package/dist/types/actions/public/watchContractEvent.d.ts.map +0 -1
- package/dist/types/actions/public/watchEvent.d.ts +0 -104
- package/dist/types/actions/public/watchEvent.d.ts.map +0 -1
- package/dist/types/actions/public/watchPendingTransactions.d.ts +0 -74
- package/dist/types/actions/public/watchPendingTransactions.d.ts.map +0 -1
- package/dist/types/actions/test/dropTransaction.d.ts +0 -33
- package/dist/types/actions/test/dropTransaction.d.ts.map +0 -1
- package/dist/types/actions/test/getAutomine.d.ts +0 -27
- package/dist/types/actions/test/getAutomine.d.ts.map +0 -1
- package/dist/types/actions/test/getTxpoolContent.d.ts +0 -34
- package/dist/types/actions/test/getTxpoolContent.d.ts.map +0 -1
- package/dist/types/actions/test/getTxpoolStatus.d.ts +0 -30
- package/dist/types/actions/test/getTxpoolStatus.d.ts.map +0 -1
- package/dist/types/actions/test/impersonateAccount.d.ts +0 -33
- package/dist/types/actions/test/impersonateAccount.d.ts.map +0 -1
- package/dist/types/actions/test/increaseTime.d.ts +0 -32
- package/dist/types/actions/test/increaseTime.d.ts.map +0 -1
- package/dist/types/actions/test/inspectTxpool.d.ts +0 -31
- package/dist/types/actions/test/inspectTxpool.d.ts.map +0 -1
- package/dist/types/actions/test/mine.d.ts +0 -32
- package/dist/types/actions/test/mine.d.ts.map +0 -1
- package/dist/types/actions/test/removeBlockTimestampInterval.d.ts +0 -25
- package/dist/types/actions/test/removeBlockTimestampInterval.d.ts.map +0 -1
- package/dist/types/actions/test/reset.d.ts +0 -32
- package/dist/types/actions/test/reset.d.ts.map +0 -1
- package/dist/types/actions/test/revert.d.ts +0 -31
- package/dist/types/actions/test/revert.d.ts.map +0 -1
- package/dist/types/actions/test/sendUnsignedTransaction.d.ts +0 -35
- package/dist/types/actions/test/sendUnsignedTransaction.d.ts.map +0 -1
- package/dist/types/actions/test/setAutomine.d.ts +0 -25
- package/dist/types/actions/test/setAutomine.d.ts.map +0 -1
- package/dist/types/actions/test/setBalance.d.ts +0 -36
- package/dist/types/actions/test/setBalance.d.ts.map +0 -1
- package/dist/types/actions/test/setBlockGasLimit.d.ts +0 -30
- package/dist/types/actions/test/setBlockGasLimit.d.ts.map +0 -1
- package/dist/types/actions/test/setBlockTimestampInterval.d.ts +0 -30
- package/dist/types/actions/test/setBlockTimestampInterval.d.ts.map +0 -1
- package/dist/types/actions/test/setCode.d.ts +0 -37
- package/dist/types/actions/test/setCode.d.ts.map +0 -1
- package/dist/types/actions/test/setCoinbase.d.ts +0 -33
- package/dist/types/actions/test/setCoinbase.d.ts.map +0 -1
- package/dist/types/actions/test/setIntervalMining.d.ts +0 -30
- package/dist/types/actions/test/setIntervalMining.d.ts.map +0 -1
- package/dist/types/actions/test/setLoggingEnabled.d.ts +0 -25
- package/dist/types/actions/test/setLoggingEnabled.d.ts.map +0 -1
- package/dist/types/actions/test/setMinGasPrice.d.ts +0 -34
- package/dist/types/actions/test/setMinGasPrice.d.ts.map +0 -1
- package/dist/types/actions/test/setNextBlockBaseFeePerGas.d.ts +0 -32
- package/dist/types/actions/test/setNextBlockBaseFeePerGas.d.ts.map +0 -1
- package/dist/types/actions/test/setNextBlockTimestamp.d.ts +0 -30
- package/dist/types/actions/test/setNextBlockTimestamp.d.ts.map +0 -1
- package/dist/types/actions/test/setNonce.d.ts +0 -36
- package/dist/types/actions/test/setNonce.d.ts.map +0 -1
- package/dist/types/actions/test/setRpcUrl.d.ts +0 -26
- package/dist/types/actions/test/setRpcUrl.d.ts.map +0 -1
- package/dist/types/actions/test/setStorageAt.d.ts +0 -40
- package/dist/types/actions/test/setStorageAt.d.ts.map +0 -1
- package/dist/types/actions/test/snapshot.d.ts +0 -25
- package/dist/types/actions/test/snapshot.d.ts.map +0 -1
- package/dist/types/actions/test/stopImpersonatingAccount.d.ts +0 -33
- package/dist/types/actions/test/stopImpersonatingAccount.d.ts.map +0 -1
- package/dist/types/actions/wallet/addChain.d.ts +0 -29
- package/dist/types/actions/wallet/addChain.d.ts.map +0 -1
- package/dist/types/actions/wallet/deployContract.d.ts +0 -43
- package/dist/types/actions/wallet/deployContract.d.ts.map +0 -1
- package/dist/types/actions/wallet/getAddresses.d.ts +0 -28
- package/dist/types/actions/wallet/getAddresses.d.ts.map +0 -1
- package/dist/types/actions/wallet/getPermissions.d.ts +0 -28
- package/dist/types/actions/wallet/getPermissions.d.ts.map +0 -1
- package/dist/types/actions/wallet/requestAddresses.d.ts +0 -32
- package/dist/types/actions/wallet/requestAddresses.d.ts.map +0 -1
- package/dist/types/actions/wallet/requestPermissions.d.ts +0 -37
- package/dist/types/actions/wallet/requestPermissions.d.ts.map +0 -1
- package/dist/types/actions/wallet/sendTransaction.d.ts +0 -57
- package/dist/types/actions/wallet/sendTransaction.d.ts.map +0 -1
- package/dist/types/actions/wallet/signMessage.d.ts +0 -58
- package/dist/types/actions/wallet/signMessage.d.ts.map +0 -1
- package/dist/types/actions/wallet/signTypedData.d.ts +0 -114
- package/dist/types/actions/wallet/signTypedData.d.ts.map +0 -1
- package/dist/types/actions/wallet/switchChain.d.ts +0 -30
- package/dist/types/actions/wallet/switchChain.d.ts.map +0 -1
- package/dist/types/actions/wallet/watchAsset.d.ts +0 -37
- package/dist/types/actions/wallet/watchAsset.d.ts.map +0 -1
- package/dist/types/actions/wallet/writeContract.d.ts +0 -68
- package/dist/types/actions/wallet/writeContract.d.ts.map +0 -1
- package/dist/types/chains/celo/formatters.d.ts +0 -195
- package/dist/types/chains/celo/formatters.d.ts.map +0 -1
- package/dist/types/chains/celo/serializers.d.ts +0 -20
- package/dist/types/chains/celo/serializers.d.ts.map +0 -1
- package/dist/types/chains/celo/types.d.ts +0 -60
- package/dist/types/chains/celo/types.d.ts.map +0 -1
- package/dist/types/chains/index.d.ts +0 -5329
- package/dist/types/chains/index.d.ts.map +0 -1
- package/dist/types/chains/optimism/fees.d.ts +0 -4
- package/dist/types/chains/optimism/fees.d.ts.map +0 -1
- package/dist/types/chains/optimism/formatters.d.ts +0 -299
- package/dist/types/chains/optimism/formatters.d.ts.map +0 -1
- package/dist/types/chains/optimism/types.d.ts +0 -53
- package/dist/types/chains/optimism/types.d.ts.map +0 -1
- package/dist/types/chains/utils.d.ts +0 -6
- package/dist/types/chains/utils.d.ts.map +0 -1
- package/dist/types/clients/createClient.d.ts +0 -79
- package/dist/types/clients/createClient.d.ts.map +0 -1
- package/dist/types/clients/createPublicClient.d.ts +0 -29
- package/dist/types/clients/createPublicClient.d.ts.map +0 -1
- package/dist/types/clients/createTestClient.d.ts +0 -43
- package/dist/types/clients/createTestClient.d.ts.map +0 -1
- package/dist/types/clients/createWalletClient.d.ts +0 -49
- package/dist/types/clients/createWalletClient.d.ts.map +0 -1
- package/dist/types/clients/decorators/public.d.ts +0 -1087
- package/dist/types/clients/decorators/public.d.ts.map +0 -1
- package/dist/types/clients/decorators/test.d.ts +0 -599
- package/dist/types/clients/decorators/test.d.ts.map +0 -1
- package/dist/types/clients/decorators/wallet.d.ts +0 -449
- package/dist/types/clients/decorators/wallet.d.ts.map +0 -1
- package/dist/types/clients/transports/createTransport.d.ts +0 -34
- package/dist/types/clients/transports/createTransport.d.ts.map +0 -1
- package/dist/types/clients/transports/custom.d.ts +0 -21
- package/dist/types/clients/transports/custom.d.ts.map +0 -1
- package/dist/types/clients/transports/fallback.d.ts +0 -75
- package/dist/types/clients/transports/fallback.d.ts.map +0 -1
- package/dist/types/clients/transports/http.d.ts +0 -40
- package/dist/types/clients/transports/http.d.ts.map +0 -1
- package/dist/types/clients/transports/webSocket.d.ts +0 -46
- package/dist/types/clients/transports/webSocket.d.ts.map +0 -1
- package/dist/types/constants/abis.d.ts +0 -165
- package/dist/types/constants/abis.d.ts.map +0 -1
- package/dist/types/constants/address.d.ts +0 -2
- package/dist/types/constants/address.d.ts.map +0 -1
- package/dist/types/constants/contract.d.ts +0 -2
- package/dist/types/constants/contract.d.ts.map +0 -1
- package/dist/types/constants/contracts.d.ts +0 -2
- package/dist/types/constants/contracts.d.ts.map +0 -1
- package/dist/types/constants/number.d.ts +0 -97
- package/dist/types/constants/number.d.ts.map +0 -1
- package/dist/types/constants/solidity.d.ts +0 -15
- package/dist/types/constants/solidity.d.ts.map +0 -1
- package/dist/types/constants/unit.d.ts +0 -13
- package/dist/types/constants/unit.d.ts.map +0 -1
- package/dist/types/contract.d.ts +0 -30
- package/dist/types/contract.d.ts.map +0 -1
- package/dist/types/ens.d.ts +0 -9
- package/dist/types/ens.d.ts.map +0 -1
- package/dist/types/errors/abi.d.ts +0 -169
- package/dist/types/errors/abi.d.ts.map +0 -1
- package/dist/types/errors/account.d.ts +0 -8
- package/dist/types/errors/account.d.ts.map +0 -1
- package/dist/types/errors/address.d.ts +0 -8
- package/dist/types/errors/address.d.ts.map +0 -1
- package/dist/types/errors/base.d.ts +0 -24
- package/dist/types/errors/base.d.ts.map +0 -1
- package/dist/types/errors/block.d.ts +0 -10
- package/dist/types/errors/block.d.ts.map +0 -1
- package/dist/types/errors/ccip.d.ts +0 -29
- package/dist/types/errors/ccip.d.ts.map +0 -1
- package/dist/types/errors/chain.d.ts +0 -35
- package/dist/types/errors/chain.d.ts.map +0 -1
- package/dist/types/errors/contract.d.ts +0 -64
- package/dist/types/errors/contract.d.ts.map +0 -1
- package/dist/types/errors/data.d.ts +0 -18
- package/dist/types/errors/data.d.ts.map +0 -1
- package/dist/types/errors/encoding.d.ts +0 -53
- package/dist/types/errors/encoding.d.ts.map +0 -1
- package/dist/types/errors/ens.d.ts +0 -26
- package/dist/types/errors/ens.d.ts.map +0 -1
- package/dist/types/errors/estimateGas.d.ts +0 -14
- package/dist/types/errors/estimateGas.d.ts.map +0 -1
- package/dist/types/errors/log.d.ts +0 -6
- package/dist/types/errors/log.d.ts.map +0 -1
- package/dist/types/errors/node.d.ts +0 -105
- package/dist/types/errors/node.d.ts.map +0 -1
- package/dist/types/errors/request.d.ts +0 -61
- package/dist/types/errors/request.d.ts.map +0 -1
- package/dist/types/errors/rpc.d.ts +0 -221
- package/dist/types/errors/rpc.d.ts.map +0 -1
- package/dist/types/errors/transaction.d.ts +0 -79
- package/dist/types/errors/transaction.d.ts.map +0 -1
- package/dist/types/errors/transport.d.ts +0 -5
- package/dist/types/errors/transport.d.ts.map +0 -1
- package/dist/types/errors/utils.d.ts +0 -5
- package/dist/types/errors/utils.d.ts.map +0 -1
- package/dist/types/errors/version.d.ts +0 -2
- package/dist/types/errors/version.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -211
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/public.d.ts +0 -31
- package/dist/types/public.d.ts.map +0 -1
- package/dist/types/test.d.ts +0 -29
- package/dist/types/test.d.ts.map +0 -1
- package/dist/types/types/account.d.ts +0 -12
- package/dist/types/types/account.d.ts.map +0 -1
- package/dist/types/types/block.d.ts +0 -62
- package/dist/types/types/block.d.ts.map +0 -1
- package/dist/types/types/chain.d.ts +0 -62
- package/dist/types/types/chain.d.ts.map +0 -1
- package/dist/types/types/contract.d.ts +0 -138
- package/dist/types/types/contract.d.ts.map +0 -1
- package/dist/types/types/eip1193.d.ts +0 -1216
- package/dist/types/types/eip1193.d.ts.map +0 -1
- package/dist/types/types/ens.d.ts +0 -5
- package/dist/types/types/ens.d.ts.map +0 -1
- package/dist/types/types/fee.d.ts +0 -29
- package/dist/types/types/fee.d.ts.map +0 -1
- package/dist/types/types/filter.d.ts +0 -40
- package/dist/types/types/filter.d.ts.map +0 -1
- package/dist/types/types/log.d.ts +0 -55
- package/dist/types/types/log.d.ts.map +0 -1
- package/dist/types/types/misc.d.ts +0 -14
- package/dist/types/types/misc.d.ts.map +0 -1
- package/dist/types/types/multicall.d.ts +0 -48
- package/dist/types/types/multicall.d.ts.map +0 -1
- package/dist/types/types/rpc.d.ts +0 -20
- package/dist/types/types/rpc.d.ts.map +0 -1
- package/dist/types/types/transaction.d.ts +0 -147
- package/dist/types/types/transaction.d.ts.map +0 -1
- package/dist/types/types/transport.d.ts +0 -3
- package/dist/types/types/transport.d.ts.map +0 -1
- package/dist/types/types/typedData.d.ts +0 -47
- package/dist/types/types/typedData.d.ts.map +0 -1
- package/dist/types/types/utils.d.ts +0 -188
- package/dist/types/types/utils.d.ts.map +0 -1
- package/dist/types/types/window.d.ts +0 -7
- package/dist/types/types/window.d.ts.map +0 -1
- package/dist/types/utils/abi/decodeAbiParameters.d.ts +0 -5
- package/dist/types/utils/abi/decodeAbiParameters.d.ts.map +0 -1
- package/dist/types/utils/abi/decodeDeployData.d.ts +0 -13
- package/dist/types/utils/abi/decodeDeployData.d.ts.map +0 -1
- package/dist/types/utils/abi/decodeErrorResult.d.ts +0 -16
- package/dist/types/utils/abi/decodeErrorResult.d.ts.map +0 -1
- package/dist/types/utils/abi/decodeEventLog.d.ts +0 -20
- package/dist/types/utils/abi/decodeEventLog.d.ts.map +0 -1
- package/dist/types/utils/abi/decodeFunctionData.d.ts +0 -15
- package/dist/types/utils/abi/decodeFunctionData.d.ts.map +0 -1
- package/dist/types/utils/abi/decodeFunctionResult.d.ts +0 -14
- package/dist/types/utils/abi/decodeFunctionResult.d.ts.map +0 -1
- package/dist/types/utils/abi/encodeAbiParameters.d.ts +0 -9
- package/dist/types/utils/abi/encodeAbiParameters.d.ts.map +0 -1
- package/dist/types/utils/abi/encodeDeployData.d.ts +0 -9
- package/dist/types/utils/abi/encodeDeployData.d.ts.map +0 -1
- package/dist/types/utils/abi/encodeErrorResult.d.ts +0 -11
- package/dist/types/utils/abi/encodeErrorResult.d.ts.map +0 -1
- package/dist/types/utils/abi/encodeEventTopics.d.ts +0 -13
- package/dist/types/utils/abi/encodeEventTopics.d.ts.map +0 -1
- package/dist/types/utils/abi/encodeFunctionData.d.ts +0 -11
- package/dist/types/utils/abi/encodeFunctionData.d.ts.map +0 -1
- package/dist/types/utils/abi/encodeFunctionResult.d.ts +0 -13
- package/dist/types/utils/abi/encodeFunctionResult.d.ts.map +0 -1
- package/dist/types/utils/abi/encodePacked.d.ts +0 -11
- package/dist/types/utils/abi/encodePacked.d.ts.map +0 -1
- package/dist/types/utils/abi/formatAbiItem.d.ts +0 -9
- package/dist/types/utils/abi/formatAbiItem.d.ts.map +0 -1
- package/dist/types/utils/abi/formatAbiItemWithArgs.d.ts +0 -8
- package/dist/types/utils/abi/formatAbiItemWithArgs.d.ts.map +0 -1
- package/dist/types/utils/abi/getAbiItem.d.ts +0 -12
- package/dist/types/utils/abi/getAbiItem.d.ts.map +0 -1
- package/dist/types/utils/accounts.d.ts +0 -3
- package/dist/types/utils/accounts.d.ts.map +0 -1
- package/dist/types/utils/address/getAddress.d.ts +0 -4
- package/dist/types/utils/address/getAddress.d.ts.map +0 -1
- package/dist/types/utils/address/getContractAddress.d.ts +0 -20
- package/dist/types/utils/address/getContractAddress.d.ts.map +0 -1
- package/dist/types/utils/address/isAddress.d.ts +0 -3
- package/dist/types/utils/address/isAddress.d.ts.map +0 -1
- package/dist/types/utils/address/isAddressEqual.d.ts +0 -3
- package/dist/types/utils/address/isAddressEqual.d.ts.map +0 -1
- package/dist/types/utils/buildRequest.d.ts +0 -6
- package/dist/types/utils/buildRequest.d.ts.map +0 -1
- package/dist/types/utils/ccip.d.ts +0 -37
- package/dist/types/utils/ccip.d.ts.map +0 -1
- package/dist/types/utils/chain.d.ts +0 -14
- package/dist/types/utils/chain.d.ts.map +0 -1
- package/dist/types/utils/contract/extractFunctionParts.d.ts +0 -13
- package/dist/types/utils/contract/extractFunctionParts.d.ts.map +0 -1
- package/dist/types/utils/data/concat.d.ts +0 -6
- package/dist/types/utils/data/concat.d.ts.map +0 -1
- package/dist/types/utils/data/isBytes.d.ts +0 -3
- package/dist/types/utils/data/isBytes.d.ts.map +0 -1
- package/dist/types/utils/data/isBytesEqual.d.ts +0 -3
- package/dist/types/utils/data/isBytesEqual.d.ts.map +0 -1
- package/dist/types/utils/data/isHex.d.ts +0 -5
- package/dist/types/utils/data/isHex.d.ts.map +0 -1
- package/dist/types/utils/data/pad.d.ts +0 -11
- package/dist/types/utils/data/pad.d.ts.map +0 -1
- package/dist/types/utils/data/size.d.ts +0 -9
- package/dist/types/utils/data/size.d.ts.map +0 -1
- package/dist/types/utils/data/slice.d.ts +0 -33
- package/dist/types/utils/data/slice.d.ts.map +0 -1
- package/dist/types/utils/data/trim.d.ts +0 -8
- package/dist/types/utils/data/trim.d.ts.map +0 -1
- package/dist/types/utils/encoding/fromBytes.d.ts +0 -109
- package/dist/types/utils/encoding/fromBytes.d.ts.map +0 -1
- package/dist/types/utils/encoding/fromHex.d.ts +0 -138
- package/dist/types/utils/encoding/fromHex.d.ts.map +0 -1
- package/dist/types/utils/encoding/fromRlp.d.ts +0 -6
- package/dist/types/utils/encoding/fromRlp.d.ts.map +0 -1
- package/dist/types/utils/encoding/toBytes.d.ts +0 -125
- package/dist/types/utils/encoding/toBytes.d.ts.map +0 -1
- package/dist/types/utils/encoding/toHex.d.ts +0 -139
- package/dist/types/utils/encoding/toHex.d.ts.map +0 -1
- package/dist/types/utils/encoding/toRlp.d.ts +0 -8
- package/dist/types/utils/encoding/toRlp.d.ts.map +0 -1
- package/dist/types/utils/ens/avatar/parseAvatarRecord.d.ts +0 -9
- package/dist/types/utils/ens/avatar/parseAvatarRecord.d.ts.map +0 -1
- package/dist/types/utils/ens/avatar/utils.d.ts +0 -37
- package/dist/types/utils/ens/avatar/utils.d.ts.map +0 -1
- package/dist/types/utils/ens/encodeLabelhash.d.ts +0 -3
- package/dist/types/utils/ens/encodeLabelhash.d.ts.map +0 -1
- package/dist/types/utils/ens/encodedLabelToLabelhash.d.ts +0 -3
- package/dist/types/utils/ens/encodedLabelToLabelhash.d.ts.map +0 -1
- package/dist/types/utils/ens/errors.d.ts +0 -2
- package/dist/types/utils/ens/errors.d.ts.map +0 -1
- package/dist/types/utils/ens/labelhash.d.ts +0 -11
- package/dist/types/utils/ens/labelhash.d.ts.map +0 -1
- package/dist/types/utils/ens/namehash.d.ts +0 -13
- package/dist/types/utils/ens/namehash.d.ts.map +0 -1
- package/dist/types/utils/ens/normalize.d.ts +0 -12
- package/dist/types/utils/ens/normalize.d.ts.map +0 -1
- package/dist/types/utils/ens/packetToBytes.d.ts +0 -3
- package/dist/types/utils/ens/packetToBytes.d.ts.map +0 -1
- package/dist/types/utils/errors/getCallError.d.ts +0 -9
- package/dist/types/utils/errors/getCallError.d.ts.map +0 -1
- package/dist/types/utils/errors/getContractError.d.ts +0 -12
- package/dist/types/utils/errors/getContractError.d.ts.map +0 -1
- package/dist/types/utils/errors/getEstimateGasError.d.ts +0 -11
- package/dist/types/utils/errors/getEstimateGasError.d.ts.map +0 -1
- package/dist/types/utils/errors/getNodeError.d.ts +0 -7
- package/dist/types/utils/errors/getNodeError.d.ts.map +0 -1
- package/dist/types/utils/errors/getTransactionError.d.ts +0 -12
- package/dist/types/utils/errors/getTransactionError.d.ts.map +0 -1
- package/dist/types/utils/filters/createFilterRequestScope.d.ts +0 -22
- package/dist/types/utils/filters/createFilterRequestScope.d.ts.map +0 -1
- package/dist/types/utils/formatters/block.d.ts +0 -28
- package/dist/types/utils/formatters/block.d.ts.map +0 -1
- package/dist/types/utils/formatters/extract.d.ts +0 -8
- package/dist/types/utils/formatters/extract.d.ts.map +0 -1
- package/dist/types/utils/formatters/feeHistory.d.ts +0 -4
- package/dist/types/utils/formatters/feeHistory.d.ts.map +0 -1
- package/dist/types/utils/formatters/formatter.d.ts +0 -10
- package/dist/types/utils/formatters/formatter.d.ts.map +0 -1
- package/dist/types/utils/formatters/log.d.ts +0 -7
- package/dist/types/utils/formatters/log.d.ts.map +0 -1
- package/dist/types/utils/formatters/transaction.d.ts +0 -30
- package/dist/types/utils/formatters/transaction.d.ts.map +0 -1
- package/dist/types/utils/formatters/transactionReceipt.d.ts +0 -14
- package/dist/types/utils/formatters/transactionReceipt.d.ts.map +0 -1
- package/dist/types/utils/formatters/transactionRequest.d.ts +0 -14
- package/dist/types/utils/formatters/transactionRequest.d.ts.map +0 -1
- package/dist/types/utils/hash/getEventSelector.d.ts +0 -4
- package/dist/types/utils/hash/getEventSelector.d.ts.map +0 -1
- package/dist/types/utils/hash/getFunctionSelector.d.ts +0 -3
- package/dist/types/utils/hash/getFunctionSelector.d.ts.map +0 -1
- package/dist/types/utils/hash/hashFunction.d.ts +0 -4
- package/dist/types/utils/hash/hashFunction.d.ts.map +0 -1
- package/dist/types/utils/hash/isHash.d.ts +0 -3
- package/dist/types/utils/hash/isHash.d.ts.map +0 -1
- package/dist/types/utils/hash/keccak256.d.ts +0 -6
- package/dist/types/utils/hash/keccak256.d.ts.map +0 -1
- package/dist/types/utils/index.d.ts +0 -82
- package/dist/types/utils/index.d.ts.map +0 -1
- package/dist/types/utils/observe.d.ts +0 -17
- package/dist/types/utils/observe.d.ts.map +0 -1
- package/dist/types/utils/poll.d.ts +0 -13
- package/dist/types/utils/poll.d.ts.map +0 -1
- package/dist/types/utils/promise/createBatchScheduler.d.ts +0 -17
- package/dist/types/utils/promise/createBatchScheduler.d.ts.map +0 -1
- package/dist/types/utils/promise/withCache.d.ts +0 -36
- package/dist/types/utils/promise/withCache.d.ts.map +0 -1
- package/dist/types/utils/promise/withRetry.d.ts +0 -12
- package/dist/types/utils/promise/withRetry.d.ts.map +0 -1
- package/dist/types/utils/promise/withTimeout.d.ts +0 -8
- package/dist/types/utils/promise/withTimeout.d.ts.map +0 -1
- package/dist/types/utils/regex.d.ts +0 -4
- package/dist/types/utils/regex.d.ts.map +0 -1
- package/dist/types/utils/rpc.d.ts +0 -72
- package/dist/types/utils/rpc.d.ts.map +0 -1
- package/dist/types/utils/signature/hashMessage.d.ts +0 -6
- package/dist/types/utils/signature/hashMessage.d.ts.map +0 -1
- package/dist/types/utils/signature/hashTypedData.d.ts +0 -11
- package/dist/types/utils/signature/hashTypedData.d.ts.map +0 -1
- package/dist/types/utils/signature/hexToSignature.d.ts +0 -13
- package/dist/types/utils/signature/hexToSignature.d.ts.map +0 -1
- package/dist/types/utils/signature/recoverAddress.d.ts +0 -9
- package/dist/types/utils/signature/recoverAddress.d.ts.map +0 -1
- package/dist/types/utils/signature/recoverMessageAddress.d.ts +0 -9
- package/dist/types/utils/signature/recoverMessageAddress.d.ts.map +0 -1
- package/dist/types/utils/signature/recoverPublicKey.d.ts +0 -8
- package/dist/types/utils/signature/recoverPublicKey.d.ts.map +0 -1
- package/dist/types/utils/signature/recoverTypedDataAddress.d.ts +0 -13
- package/dist/types/utils/signature/recoverTypedDataAddress.d.ts.map +0 -1
- package/dist/types/utils/signature/signatureToHex.d.ts +0 -17
- package/dist/types/utils/signature/signatureToHex.d.ts.map +0 -1
- package/dist/types/utils/signature/verifyMessage.d.ts +0 -25
- package/dist/types/utils/signature/verifyMessage.d.ts.map +0 -1
- package/dist/types/utils/signature/verifyTypedData.d.ts +0 -28
- package/dist/types/utils/signature/verifyTypedData.d.ts.map +0 -1
- package/dist/types/utils/stringify.d.ts +0 -2
- package/dist/types/utils/stringify.d.ts.map +0 -1
- package/dist/types/utils/transaction/assertRequest.d.ts +0 -5
- package/dist/types/utils/transaction/assertRequest.d.ts.map +0 -1
- package/dist/types/utils/transaction/assertTransaction.d.ts +0 -5
- package/dist/types/utils/transaction/assertTransaction.d.ts.map +0 -1
- package/dist/types/utils/transaction/getSerializedTransactionType.d.ts +0 -4
- package/dist/types/utils/transaction/getSerializedTransactionType.d.ts.map +0 -1
- package/dist/types/utils/transaction/getTransactionType.d.ts +0 -4
- package/dist/types/utils/transaction/getTransactionType.d.ts.map +0 -1
- package/dist/types/utils/transaction/parseTransaction.d.ts +0 -5
- package/dist/types/utils/transaction/parseTransaction.d.ts.map +0 -1
- package/dist/types/utils/transaction/prepareRequest.d.ts +0 -20
- package/dist/types/utils/transaction/prepareRequest.d.ts.map +0 -1
- package/dist/types/utils/transaction/serializeAccessList.d.ts +0 -5
- package/dist/types/utils/transaction/serializeAccessList.d.ts.map +0 -1
- package/dist/types/utils/transaction/serializeTransaction.d.ts +0 -7
- package/dist/types/utils/transaction/serializeTransaction.d.ts.map +0 -1
- package/dist/types/utils/typedData.d.ts +0 -6
- package/dist/types/utils/typedData.d.ts.map +0 -1
- package/dist/types/utils/uid.d.ts +0 -2
- package/dist/types/utils/uid.d.ts.map +0 -1
- package/dist/types/utils/unit/formatEther.d.ts +0 -2
- package/dist/types/utils/unit/formatEther.d.ts.map +0 -1
- package/dist/types/utils/unit/formatGwei.d.ts +0 -2
- package/dist/types/utils/unit/formatGwei.d.ts.map +0 -1
- package/dist/types/utils/unit/formatUnits.d.ts +0 -2
- package/dist/types/utils/unit/formatUnits.d.ts.map +0 -1
- package/dist/types/utils/unit/parseEther.d.ts +0 -2
- package/dist/types/utils/unit/parseEther.d.ts.map +0 -1
- package/dist/types/utils/unit/parseGwei.d.ts +0 -2
- package/dist/types/utils/unit/parseGwei.d.ts.map +0 -1
- package/dist/types/utils/unit/parseUnits.d.ts +0 -2
- package/dist/types/utils/unit/parseUnits.d.ts.map +0 -1
- package/dist/types/utils/wait.d.ts +0 -2
- package/dist/types/utils/wait.d.ts.map +0 -1
- package/dist/types/wallet.d.ts +0 -11
- package/dist/types/wallet.d.ts.map +0 -1
- package/dist/types/window.d.ts +0 -2
- package/dist/types/window.d.ts.map +0 -1
@@ -1,37 +0,0 @@
|
|
1
|
-
import type { Address } from 'abitype';
|
2
|
-
import { type CallParameters } from '../actions/public/call.js';
|
3
|
-
import type { Transport } from '../clients/transports/createTransport.js';
|
4
|
-
import type { Chain } from '../types/chain.js';
|
5
|
-
import type { Hex } from '../types/misc.js';
|
6
|
-
import type { Client } from '../clients/createClient.js';
|
7
|
-
export declare const offchainLookupSignature = "0x556f1830";
|
8
|
-
export declare const offchainLookupAbiItem: {
|
9
|
-
readonly name: "OffchainLookup";
|
10
|
-
readonly type: "error";
|
11
|
-
readonly inputs: readonly [{
|
12
|
-
readonly name: "sender";
|
13
|
-
readonly type: "address";
|
14
|
-
}, {
|
15
|
-
readonly name: "urls";
|
16
|
-
readonly type: "string[]";
|
17
|
-
}, {
|
18
|
-
readonly name: "callData";
|
19
|
-
readonly type: "bytes";
|
20
|
-
}, {
|
21
|
-
readonly name: "callbackFunction";
|
22
|
-
readonly type: "bytes4";
|
23
|
-
}, {
|
24
|
-
readonly name: "extraData";
|
25
|
-
readonly type: "bytes";
|
26
|
-
}];
|
27
|
-
};
|
28
|
-
export declare function offchainLookup<TChain extends Chain | undefined>(client: Client<Transport, TChain>, { blockNumber, blockTag, data, to, }: Pick<CallParameters, 'blockNumber' | 'blockTag'> & {
|
29
|
-
data: Hex;
|
30
|
-
to: Address;
|
31
|
-
}): Promise<Hex>;
|
32
|
-
export declare function ccipFetch({ data, sender, urls, }: {
|
33
|
-
data: Hex;
|
34
|
-
sender: Address;
|
35
|
-
urls: readonly string[];
|
36
|
-
}): Promise<`0x${string}`>;
|
37
|
-
//# sourceMappingURL=ccip.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ccip.d.ts","sourceRoot":"","sources":["../../../src/utils/ccip.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAO,OAAO,EAAE,MAAM,SAAS,CAAA;AAE3C,OAAO,EAAE,KAAK,cAAc,EAAQ,MAAM,2BAA2B,CAAA;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAA;AAQzE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAE9C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAE3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAQxD,eAAO,MAAM,uBAAuB,eAAe,CAAA;AACnD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;CAyBF,CAAA;AAEhC,wBAAsB,cAAc,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EACnE,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,EACjC,EACE,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,EAAE,GACH,EAAE,IAAI,CAAC,cAAc,EAAE,aAAa,GAAG,UAAU,CAAC,GAAG;IACpD,IAAI,EAAE,GAAG,CAAA;IACT,EAAE,EAAE,OAAO,CAAA;CACZ,GACA,OAAO,CAAC,GAAG,CAAC,CAwCd;AAED,wBAAsB,SAAS,CAAC,EAC9B,IAAI,EACJ,MAAM,EACN,IAAI,GACL,EAAE;IAAE,IAAI,EAAE,GAAG,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,0BAyDzD"}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import type { Chain, ChainConfig, ChainFormatters } from '../types/chain.js';
|
2
|
-
import type { Assign } from '../types/utils.js';
|
3
|
-
export type AssertCurrentChainParameters = {
|
4
|
-
chain?: Chain;
|
5
|
-
currentChainId: number;
|
6
|
-
};
|
7
|
-
export declare function assertCurrentChain({ chain, currentChainId, }: AssertCurrentChainParameters): void;
|
8
|
-
export declare function defineChain<chain extends Chain, formatters extends ChainFormatters>(chain: chain, config?: ChainConfig<formatters>): Assign<chain, ChainConfig<formatters>>;
|
9
|
-
export declare function getChainContractAddress({ blockNumber, chain, contract: name, }: {
|
10
|
-
blockNumber?: bigint;
|
11
|
-
chain: Chain;
|
12
|
-
contract: string;
|
13
|
-
}): `0x${string}`;
|
14
|
-
//# sourceMappingURL=chain.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"chain.d.ts","sourceRoot":"","sources":["../../../src/utils/chain.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,KAAK,EACL,WAAW,EAEX,eAAe,EAChB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE/C,MAAM,MAAM,4BAA4B,GAAG;IACzC,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,cAAc,GACf,EAAE,4BAA4B,GAAG,IAAI,CAIrC;AAED,wBAAgB,WAAW,CACzB,KAAK,SAAS,KAAK,EACnB,UAAU,SAAS,eAAe,EAElC,KAAK,EAAE,KAAK,EACZ,MAAM,GAAE,WAAW,CAAC,UAAU,CAAM,GACnC,MAAM,CAAC,KAAK,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC,CAYxC;AAED,wBAAgB,uBAAuB,CAAC,EACtC,WAAW,EACX,KAAK,EACL,QAAQ,EAAE,IAAI,GACf,EAAE;IACD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE,KAAK,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;CACjB,iBAuBA"}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
export declare function extractFunctionParts(def: string): {
|
2
|
-
type: string | undefined;
|
3
|
-
name: string | undefined;
|
4
|
-
params: string | undefined;
|
5
|
-
};
|
6
|
-
export declare function extractFunctionName(def: string): string | undefined;
|
7
|
-
export declare function extractFunctionParams(def: string): {
|
8
|
-
indexed?: boolean | undefined;
|
9
|
-
type: string;
|
10
|
-
name: string;
|
11
|
-
}[] | undefined;
|
12
|
-
export declare function extractFunctionType(def: string): string | undefined;
|
13
|
-
//# sourceMappingURL=extractFunctionParts.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"extractFunctionParts.d.ts","sourceRoot":"","sources":["../../../../src/utils/contract/extractFunctionParts.ts"],"names":[],"mappings":"AAEA,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM;;;;EAM/C;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,sBAE9C;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM;;;;gBAQhD;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,sBAE9C"}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import type { ByteArray, Hex } from '../../types/misc.js';
|
2
|
-
export type ConcatReturnType<TValue extends Hex | ByteArray> = TValue extends Hex ? Hex : ByteArray;
|
3
|
-
export declare function concat<TValue extends Hex | ByteArray>(values: TValue[]): ConcatReturnType<TValue>;
|
4
|
-
export declare function concatBytes(values: ByteArray[]): ByteArray;
|
5
|
-
export declare function concatHex(values: Hex[]): Hex;
|
6
|
-
//# sourceMappingURL=concat.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"concat.d.ts","sourceRoot":"","sources":["../../../../src/utils/data/concat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAEzD,MAAM,MAAM,gBAAgB,CAAC,MAAM,SAAS,GAAG,GAAG,SAAS,IACzD,MAAM,SAAS,GAAG,GAAG,GAAG,GAAG,SAAS,CAAA;AAEtC,wBAAgB,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,SAAS,EACnD,MAAM,EAAE,MAAM,EAAE,GACf,gBAAgB,CAAC,MAAM,CAAC,CAI1B;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,SAAS,CAY1D;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,GAAG,CAK5C"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"isBytes.d.ts","sourceRoot":"","sources":["../../../../src/utils/data/isBytes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAEpD,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,SAAS,CAO1D"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"isBytesEqual.d.ts","sourceRoot":"","sources":["../../../../src/utils/data/isBytesEqual.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,GAAG,EAAkB,MAAM,gBAAgB,CAAA;AAGzE,wBAAgB,YAAY,CAAC,EAAE,EAAE,SAAS,GAAG,GAAG,EAAE,EAAE,EAAE,SAAS,GAAG,GAAG,WAIpE"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"isHex.d.ts","sourceRoot":"","sources":["../../../../src/utils/data/isHex.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAE9C,wBAAgB,KAAK,CACnB,KAAK,EAAE,OAAO,EACd,EAAE,MAAa,EAAE,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GAC3C,KAAK,IAAI,GAAG,CAId"}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import type { ByteArray, Hex } from '../../types/misc.js';
|
2
|
-
type PadOptions = {
|
3
|
-
dir?: 'left' | 'right';
|
4
|
-
size?: number | null;
|
5
|
-
};
|
6
|
-
export type PadReturnType<TValue extends ByteArray | Hex> = TValue extends Hex ? Hex : ByteArray;
|
7
|
-
export declare function pad<TValue extends ByteArray | Hex>(hexOrBytes: TValue, { dir, size }?: PadOptions): PadReturnType<TValue>;
|
8
|
-
export declare function padHex(hex_: Hex, { dir, size }?: PadOptions): `0x${string}`;
|
9
|
-
export declare function padBytes(bytes: ByteArray, { dir, size }?: PadOptions): Uint8Array;
|
10
|
-
export {};
|
11
|
-
//# sourceMappingURL=pad.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"pad.d.ts","sourceRoot":"","sources":["../../../../src/utils/data/pad.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAEzD,KAAK,UAAU,GAAG;IAChB,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACtB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB,CAAA;AACD,MAAM,MAAM,aAAa,CAAC,MAAM,SAAS,SAAS,GAAG,GAAG,IAAI,MAAM,SAAS,GAAG,GAC1E,GAAG,GACH,SAAS,CAAA;AAEb,wBAAgB,GAAG,CAAC,MAAM,SAAS,SAAS,GAAG,GAAG,EAChD,UAAU,EAAE,MAAM,EAClB,EAAE,GAAG,EAAE,IAAS,EAAE,GAAE,UAAe,GAClC,aAAa,CAAC,MAAM,CAAC,CAIvB;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,GAAG,EAAE,IAAS,EAAE,GAAE,UAAe,iBAcpE;AAED,wBAAgB,QAAQ,CACtB,KAAK,EAAE,SAAS,EAChB,EAAE,GAAG,EAAE,IAAS,EAAE,GAAE,UAAe,cAgBpC"}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import type { ByteArray, Hex } from '../../types/misc.js';
|
2
|
-
/**
|
3
|
-
* @description Retrieves the size of the value (in bytes).
|
4
|
-
*
|
5
|
-
* @param value The value (hex or byte array) to retrieve the size of.
|
6
|
-
* @returns The size of the value (in bytes).
|
7
|
-
*/
|
8
|
-
export declare function size(value: Hex | ByteArray): number;
|
9
|
-
//# sourceMappingURL=size.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"size.d.ts","sourceRoot":"","sources":["../../../../src/utils/data/size.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAIzD;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,GAAG,GAAG,SAAS,UAG1C"}
|
@@ -1,33 +0,0 @@
|
|
1
|
-
import type { ByteArray, Hex } from '../../types/misc.js';
|
2
|
-
export type SliceReturnType<TValue extends ByteArray | Hex> = TValue extends Hex ? Hex : ByteArray;
|
3
|
-
/**
|
4
|
-
* @description Returns a section of the hex or byte array given a start/end bytes offset.
|
5
|
-
*
|
6
|
-
* @param value The hex or byte array to slice.
|
7
|
-
* @param start The start offset (in bytes).
|
8
|
-
* @param end The end offset (in bytes).
|
9
|
-
*/
|
10
|
-
export declare function slice<TValue extends ByteArray | Hex>(value: TValue, start?: number, end?: number, { strict }?: {
|
11
|
-
strict?: boolean;
|
12
|
-
}): SliceReturnType<TValue>;
|
13
|
-
/**
|
14
|
-
* @description Returns a section of the byte array given a start/end bytes offset.
|
15
|
-
*
|
16
|
-
* @param value The byte array to slice.
|
17
|
-
* @param start The start offset (in bytes).
|
18
|
-
* @param end The end offset (in bytes).
|
19
|
-
*/
|
20
|
-
export declare function sliceBytes(value_: ByteArray, start?: number, end?: number, { strict }?: {
|
21
|
-
strict?: boolean;
|
22
|
-
}): ByteArray;
|
23
|
-
/**
|
24
|
-
* @description Returns a section of the hex value given a start/end bytes offset.
|
25
|
-
*
|
26
|
-
* @param value The hex value to slice.
|
27
|
-
* @param start The start offset (in bytes).
|
28
|
-
* @param end The end offset (in bytes).
|
29
|
-
*/
|
30
|
-
export declare function sliceHex(value_: Hex, start?: number, end?: number, { strict }?: {
|
31
|
-
strict?: boolean;
|
32
|
-
}): Hex;
|
33
|
-
//# sourceMappingURL=slice.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"slice.d.ts","sourceRoot":"","sources":["../../../../src/utils/data/slice.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAKzD,MAAM,MAAM,eAAe,CAAC,MAAM,SAAS,SAAS,GAAG,GAAG,IAAI,MAAM,SAAS,GAAG,GAC5E,GAAG,GACH,SAAS,CAAA;AAEb;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,MAAM,SAAS,SAAS,GAAG,GAAG,EAClD,KAAK,EAAE,MAAM,EACb,KAAK,CAAC,EAAE,MAAM,EACd,GAAG,CAAC,EAAE,MAAM,EACZ,EAAE,MAAM,EAAE,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GACpC,eAAe,CAAC,MAAM,CAAC,CAQzB;AAyBD;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,SAAS,EACjB,KAAK,CAAC,EAAE,MAAM,EACd,GAAG,CAAC,EAAE,MAAM,EACZ,EAAE,MAAM,EAAE,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GACpC,SAAS,CAKX;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CACtB,MAAM,EAAE,GAAG,EACX,KAAK,CAAC,EAAE,MAAM,EACd,GAAG,CAAC,EAAE,MAAM,EACZ,EAAE,MAAM,EAAE,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GACpC,GAAG,CAOL"}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
import type { ByteArray, Hex } from '../../types/misc.js';
|
2
|
-
type TrimOptions = {
|
3
|
-
dir?: 'left' | 'right';
|
4
|
-
};
|
5
|
-
export type TrimReturnType<TValue extends ByteArray | Hex> = TValue extends Hex ? Hex : ByteArray;
|
6
|
-
export declare function trim<TValue extends ByteArray | Hex>(hexOrBytes: TValue, { dir }?: TrimOptions): TrimReturnType<TValue>;
|
7
|
-
export {};
|
8
|
-
//# sourceMappingURL=trim.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"trim.d.ts","sourceRoot":"","sources":["../../../../src/utils/data/trim.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAEzD,KAAK,WAAW,GAAG;IACjB,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB,CAAA;AACD,MAAM,MAAM,cAAc,CAAC,MAAM,SAAS,SAAS,GAAG,GAAG,IAAI,MAAM,SAAS,GAAG,GAC3E,GAAG,GACH,SAAS,CAAA;AAEb,wBAAgB,IAAI,CAAC,MAAM,SAAS,SAAS,GAAG,GAAG,EACjD,UAAU,EAAE,MAAM,EAClB,EAAE,GAAY,EAAE,GAAE,WAAgB,GACjC,cAAc,CAAC,MAAM,CAAC,CAsBxB"}
|
@@ -1,109 +0,0 @@
|
|
1
|
-
import type { ByteArray, Hex } from '../../types/misc.js';
|
2
|
-
export type FromBytesParameters<TTo extends 'string' | 'hex' | 'bigint' | 'number' | 'boolean'> = TTo | {
|
3
|
-
/** Size of the bytes. */
|
4
|
-
size?: number;
|
5
|
-
/** Type to convert to. */
|
6
|
-
to: TTo;
|
7
|
-
};
|
8
|
-
type FromBytesReturnType<TTo> = TTo extends 'string' ? string : TTo extends 'hex' ? Hex : TTo extends 'bigint' ? bigint : TTo extends 'number' ? number : TTo extends 'boolean' ? boolean : never;
|
9
|
-
/**
|
10
|
-
* Decodes a byte array into a UTF-8 string, hex value, number, bigint or boolean.
|
11
|
-
*
|
12
|
-
* - Docs: https://viem.sh/docs/utilities/fromBytes.html
|
13
|
-
* - Example: https://viem.sh/docs/utilities/fromBytes.html#usage
|
14
|
-
*
|
15
|
-
* @param bytes Byte array to decode.
|
16
|
-
* @param toOrOpts Type to convert to or options.
|
17
|
-
* @returns Decoded value.
|
18
|
-
*
|
19
|
-
* @example
|
20
|
-
* import { fromBytes } from 'viem'
|
21
|
-
* const data = fromBytes(new Uint8Array([1, 164]), 'number')
|
22
|
-
* // 420
|
23
|
-
*
|
24
|
-
* @example
|
25
|
-
* import { fromBytes } from 'viem'
|
26
|
-
* const data = fromBytes(
|
27
|
-
* new Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33]),
|
28
|
-
* 'string'
|
29
|
-
* )
|
30
|
-
* // 'Hello world'
|
31
|
-
*/
|
32
|
-
export declare function fromBytes<TTo extends 'string' | 'hex' | 'bigint' | 'number' | 'boolean'>(bytes: ByteArray, toOrOpts: FromBytesParameters<TTo>): FromBytesReturnType<TTo>;
|
33
|
-
export type BytesToBigIntOpts = {
|
34
|
-
/** Whether or not the number of a signed representation. */
|
35
|
-
signed?: boolean;
|
36
|
-
/** Size of the bytes. */
|
37
|
-
size?: number;
|
38
|
-
};
|
39
|
-
/**
|
40
|
-
* Decodes a byte array into a bigint.
|
41
|
-
*
|
42
|
-
* - Docs: https://viem.sh/docs/utilities/fromBytes.html#bytestobigint
|
43
|
-
*
|
44
|
-
* @param bytes Byte array to decode.
|
45
|
-
* @param opts Options.
|
46
|
-
* @returns BigInt value.
|
47
|
-
*
|
48
|
-
* @example
|
49
|
-
* import { bytesToBigint } from 'viem'
|
50
|
-
* const data = bytesToBigint(new Uint8Array([1, 164]))
|
51
|
-
* // 420n
|
52
|
-
*/
|
53
|
-
export declare function bytesToBigint(bytes: ByteArray, opts?: BytesToBigIntOpts): bigint;
|
54
|
-
export type BytesToBoolOpts = {
|
55
|
-
/** Size of the bytes. */
|
56
|
-
size?: number;
|
57
|
-
};
|
58
|
-
/**
|
59
|
-
* Decodes a byte array into a boolean.
|
60
|
-
*
|
61
|
-
* - Docs: https://viem.sh/docs/utilities/fromBytes.html#bytestobool
|
62
|
-
*
|
63
|
-
* @param bytes Byte array to decode.
|
64
|
-
* @param opts Options.
|
65
|
-
* @returns Boolean value.
|
66
|
-
*
|
67
|
-
* @example
|
68
|
-
* import { bytesToBool } from 'viem'
|
69
|
-
* const data = bytesToBool(new Uint8Array([1]))
|
70
|
-
* // true
|
71
|
-
*/
|
72
|
-
export declare function bytesToBool(bytes_: ByteArray, opts?: BytesToBoolOpts): boolean;
|
73
|
-
export type BytesToNumberOpts = BytesToBigIntOpts;
|
74
|
-
/**
|
75
|
-
* Decodes a byte array into a number.
|
76
|
-
*
|
77
|
-
* - Docs: https://viem.sh/docs/utilities/fromBytes.html#bytestonumber
|
78
|
-
*
|
79
|
-
* @param bytes Byte array to decode.
|
80
|
-
* @param opts Options.
|
81
|
-
* @returns Number value.
|
82
|
-
*
|
83
|
-
* @example
|
84
|
-
* import { bytesToNumber } from 'viem'
|
85
|
-
* const data = bytesToNumber(new Uint8Array([1, 164]))
|
86
|
-
* // 420
|
87
|
-
*/
|
88
|
-
export declare function bytesToNumber(bytes: ByteArray, opts?: BytesToNumberOpts): number;
|
89
|
-
export type BytesToStringOpts = {
|
90
|
-
/** Size of the bytes. */
|
91
|
-
size?: number;
|
92
|
-
};
|
93
|
-
/**
|
94
|
-
* Decodes a byte array into a UTF-8 string.
|
95
|
-
*
|
96
|
-
* - Docs: https://viem.sh/docs/utilities/fromBytes.html#bytestostring
|
97
|
-
*
|
98
|
-
* @param bytes Byte array to decode.
|
99
|
-
* @param opts Options.
|
100
|
-
* @returns String value.
|
101
|
-
*
|
102
|
-
* @example
|
103
|
-
* import { bytesToString } from 'viem'
|
104
|
-
* const data = bytesToString(new Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33]))
|
105
|
-
* // 'Hello world'
|
106
|
-
*/
|
107
|
-
export declare function bytesToString(bytes_: ByteArray, opts?: BytesToStringOpts): string;
|
108
|
-
export {};
|
109
|
-
//# sourceMappingURL=fromBytes.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"fromBytes.d.ts","sourceRoot":"","sources":["../../../../src/utils/encoding/fromBytes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAMzD,MAAM,MAAM,mBAAmB,CAC7B,GAAG,SAAS,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,IAE5D,GAAG,GACH;IACE,yBAAyB;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,0BAA0B;IAC1B,EAAE,EAAE,GAAG,CAAA;CACR,CAAA;AAEL,KAAK,mBAAmB,CAAC,GAAG,IAAI,GAAG,SAAS,QAAQ,GAChD,MAAM,GACN,GAAG,SAAS,KAAK,GACjB,GAAG,GACH,GAAG,SAAS,QAAQ,GACpB,MAAM,GACN,GAAG,SAAS,QAAQ,GACpB,MAAM,GACN,GAAG,SAAS,SAAS,GACrB,OAAO,GACP,KAAK,CAAA;AAET;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,SAAS,CACvB,GAAG,SAAS,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,EAE9D,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,mBAAmB,CAAC,GAAG,CAAC,GACjC,mBAAmB,CAAC,GAAG,CAAC,CAa1B;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,4DAA4D;IAC5D,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,yBAAyB;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,SAAS,EAChB,IAAI,GAAE,iBAAsB,GAC3B,MAAM,CAIR;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,yBAAyB;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,SAAS,EACjB,IAAI,GAAE,eAAoB,GACzB,OAAO,CAST;AAED,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,CAAA;AAEjD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,SAAS,EAChB,IAAI,GAAE,iBAAsB,GAC3B,MAAM,CAIR;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,yBAAyB;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,SAAS,EACjB,IAAI,GAAE,iBAAsB,GAC3B,MAAM,CAOR"}
|
@@ -1,138 +0,0 @@
|
|
1
|
-
import type { ByteArray, Hex } from '../../types/misc.js';
|
2
|
-
export declare function assertSize(hexOrBytes: Hex | ByteArray, { size }: {
|
3
|
-
size: number;
|
4
|
-
}): void;
|
5
|
-
export type FromHexParameters<TTo extends 'string' | 'bigint' | 'number' | 'bytes' | 'boolean'> = TTo | {
|
6
|
-
/** Size (in bytes) of the hex value. */
|
7
|
-
size?: number;
|
8
|
-
/** Type to convert to. */
|
9
|
-
to: TTo;
|
10
|
-
};
|
11
|
-
export type FromHexReturnType<TTo> = TTo extends 'string' ? string : TTo extends 'bigint' ? bigint : TTo extends 'number' ? number : TTo extends 'bytes' ? ByteArray : TTo extends 'boolean' ? boolean : never;
|
12
|
-
/**
|
13
|
-
* Decodes a hex string into a string, number, bigint, boolean, or byte array.
|
14
|
-
*
|
15
|
-
* - Docs: https://viem.sh/docs/utilities/fromHex.html
|
16
|
-
* - Example: https://viem.sh/docs/utilities/fromHex.html#usage
|
17
|
-
*
|
18
|
-
* @param hex Hex string to decode.
|
19
|
-
* @param toOrOpts Type to convert to or options.
|
20
|
-
* @returns Decoded value.
|
21
|
-
*
|
22
|
-
* @example
|
23
|
-
* import { fromHex } from 'viem'
|
24
|
-
* const data = fromHex('0x1a4', 'number')
|
25
|
-
* // 420
|
26
|
-
*
|
27
|
-
* @example
|
28
|
-
* import { fromHex } from 'viem'
|
29
|
-
* const data = fromHex('0x48656c6c6f20576f726c6421', 'string')
|
30
|
-
* // 'Hello world'
|
31
|
-
*
|
32
|
-
* @example
|
33
|
-
* import { fromHex } from 'viem'
|
34
|
-
* const data = fromHex('0x48656c6c6f20576f726c64210000000000000000000000000000000000000000', {
|
35
|
-
* size: 32,
|
36
|
-
* to: 'string'
|
37
|
-
* })
|
38
|
-
* // 'Hello world'
|
39
|
-
*/
|
40
|
-
export declare function fromHex<TTo extends 'string' | 'bigint' | 'number' | 'bytes' | 'boolean'>(hex: Hex, toOrOpts: FromHexParameters<TTo>): FromHexReturnType<TTo>;
|
41
|
-
export type HexToBigIntOpts = {
|
42
|
-
/** Whether or not the number of a signed representation. */
|
43
|
-
signed?: boolean;
|
44
|
-
/** Size (in bytes) of the hex value. */
|
45
|
-
size?: number;
|
46
|
-
};
|
47
|
-
/**
|
48
|
-
* Decodes a hex value into a bigint.
|
49
|
-
*
|
50
|
-
* - Docs: https://viem.sh/docs/utilities/fromHex.html#hextobigint
|
51
|
-
*
|
52
|
-
* @param hex Hex value to decode.
|
53
|
-
* @param opts Options.
|
54
|
-
* @returns BigInt value.
|
55
|
-
*
|
56
|
-
* @example
|
57
|
-
* import { hexToBigInt } from 'viem'
|
58
|
-
* const data = hexToBigInt('0x1a4', { signed: true })
|
59
|
-
* // 420n
|
60
|
-
*
|
61
|
-
* @example
|
62
|
-
* import { hexToBigInt } from 'viem'
|
63
|
-
* const data = hexToBigInt('0x00000000000000000000000000000000000000000000000000000000000001a4', { size: 32 })
|
64
|
-
* // 420n
|
65
|
-
*/
|
66
|
-
export declare function hexToBigInt(hex: Hex, opts?: HexToBigIntOpts): bigint;
|
67
|
-
export type HexToBoolOpts = {
|
68
|
-
/** Size (in bytes) of the hex value. */
|
69
|
-
size?: number;
|
70
|
-
};
|
71
|
-
/**
|
72
|
-
* Decodes a hex value into a boolean.
|
73
|
-
*
|
74
|
-
* - Docs: https://viem.sh/docs/utilities/fromHex.html#hextobool
|
75
|
-
*
|
76
|
-
* @param hex Hex value to decode.
|
77
|
-
* @param opts Options.
|
78
|
-
* @returns Boolean value.
|
79
|
-
*
|
80
|
-
* @example
|
81
|
-
* import { hexToBool } from 'viem'
|
82
|
-
* const data = hexToBool('0x01')
|
83
|
-
* // true
|
84
|
-
*
|
85
|
-
* @example
|
86
|
-
* import { hexToBool } from 'viem'
|
87
|
-
* const data = hexToBool('0x0000000000000000000000000000000000000000000000000000000000000001', { size: 32 })
|
88
|
-
* // true
|
89
|
-
*/
|
90
|
-
export declare function hexToBool(hex_: Hex, opts?: HexToBoolOpts): boolean;
|
91
|
-
export type HexToNumberOpts = HexToBigIntOpts;
|
92
|
-
/**
|
93
|
-
* Decodes a hex string into a number.
|
94
|
-
*
|
95
|
-
* - Docs: https://viem.sh/docs/utilities/fromHex.html#hextonumber
|
96
|
-
*
|
97
|
-
* @param hex Hex value to decode.
|
98
|
-
* @param opts Options.
|
99
|
-
* @returns Number value.
|
100
|
-
*
|
101
|
-
* @example
|
102
|
-
* import { hexToNumber } from 'viem'
|
103
|
-
* const data = hexToNumber('0x1a4')
|
104
|
-
* // 420
|
105
|
-
*
|
106
|
-
* @example
|
107
|
-
* import { hexToNumber } from 'viem'
|
108
|
-
* const data = hexToBigInt('0x00000000000000000000000000000000000000000000000000000000000001a4', { size: 32 })
|
109
|
-
* // 420
|
110
|
-
*/
|
111
|
-
export declare function hexToNumber(hex: Hex, opts?: HexToNumberOpts): number;
|
112
|
-
export type HexToStringOpts = {
|
113
|
-
/** Size (in bytes) of the hex value. */
|
114
|
-
size?: number;
|
115
|
-
};
|
116
|
-
/**
|
117
|
-
* Decodes a hex value into a UTF-8 string.
|
118
|
-
*
|
119
|
-
* - Docs: https://viem.sh/docs/utilities/fromHex.html#hextostring
|
120
|
-
*
|
121
|
-
* @param hex Hex value to decode.
|
122
|
-
* @param opts Options.
|
123
|
-
* @returns String value.
|
124
|
-
*
|
125
|
-
* @example
|
126
|
-
* import { hexToString } from 'viem'
|
127
|
-
* const data = hexToString('0x48656c6c6f20576f726c6421')
|
128
|
-
* // 'Hello world!'
|
129
|
-
*
|
130
|
-
* @example
|
131
|
-
* import { hexToString } from 'viem'
|
132
|
-
* const data = hexToString('0x48656c6c6f20576f726c64210000000000000000000000000000000000000000', {
|
133
|
-
* size: 32,
|
134
|
-
* })
|
135
|
-
* // 'Hello world'
|
136
|
-
*/
|
137
|
-
export declare function hexToString(hex: Hex, opts?: HexToStringOpts): string;
|
138
|
-
//# sourceMappingURL=fromHex.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"fromHex.d.ts","sourceRoot":"","sources":["../../../../src/utils/encoding/fromHex.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAMzD,wBAAgB,UAAU,CACxB,UAAU,EAAE,GAAG,GAAG,SAAS,EAC3B,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GACzB,IAAI,CAMN;AAED,MAAM,MAAM,iBAAiB,CAC3B,GAAG,SAAS,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,IAE9D,GAAG,GACH;IACE,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,0BAA0B;IAC1B,EAAE,EAAE,GAAG,CAAA;CACR,CAAA;AAEL,MAAM,MAAM,iBAAiB,CAAC,GAAG,IAAI,GAAG,SAAS,QAAQ,GACrD,MAAM,GACN,GAAG,SAAS,QAAQ,GACpB,MAAM,GACN,GAAG,SAAS,QAAQ,GACpB,MAAM,GACN,GAAG,SAAS,OAAO,GACnB,SAAS,GACT,GAAG,SAAS,SAAS,GACrB,OAAO,GACP,KAAK,CAAA;AAET;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,OAAO,CACrB,GAAG,SAAS,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,EAChE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,iBAAiB,CAAC,GAAG,CAAC,GAAG,iBAAiB,CAAC,GAAG,CAAC,CASpE;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,4DAA4D;IAC5D,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,GAAE,eAAoB,GAAG,MAAM,CAaxE;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,GAAE,aAAkB,GAAG,OAAO,CAStE;AAED,MAAM,MAAM,eAAe,GAAG,eAAe,CAAA;AAE7C;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,GAAE,eAAoB,GAAG,MAAM,CAExE;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,GAAE,eAAoB,GAAG,MAAM,CAOxE"}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import type { ByteArray, Hex } from '../../types/misc.js';
|
2
|
-
import type { RecursiveArray } from './toRlp.js';
|
3
|
-
type FromRlpReturnType<TTo> = TTo extends 'bytes' ? ByteArray : TTo extends 'hex' ? Hex : never;
|
4
|
-
export declare function fromRlp<TTo extends 'bytes' | 'hex'>(value: ByteArray | Hex, to: TTo): RecursiveArray<FromRlpReturnType<TTo>>;
|
5
|
-
export {};
|
6
|
-
//# sourceMappingURL=fromRlp.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"fromRlp.d.ts","sourceRoot":"","sources":["../../../../src/utils/encoding/fromRlp.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAKzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAEhD,KAAK,iBAAiB,CAAC,GAAG,IAAI,GAAG,SAAS,OAAO,GAC7C,SAAS,GACT,GAAG,SAAS,KAAK,GACjB,GAAG,GACH,KAAK,CAAA;AAET,wBAAgB,OAAO,CAAC,GAAG,SAAS,OAAO,GAAG,KAAK,EACjD,KAAK,EAAE,SAAS,GAAG,GAAG,EACtB,EAAE,EAAE,GAAG,GACN,cAAc,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,CASxC"}
|
@@ -1,125 +0,0 @@
|
|
1
|
-
import type { ByteArray, Hex } from '../../types/misc.js';
|
2
|
-
import { type NumberToHexOpts } from './toHex.js';
|
3
|
-
export type ToBytesParameters = {
|
4
|
-
/** Size of the output bytes. */
|
5
|
-
size?: number;
|
6
|
-
};
|
7
|
-
/**
|
8
|
-
* Encodes a UTF-8 string, hex value, bigint, number or boolean to a byte array.
|
9
|
-
*
|
10
|
-
* - Docs: https://viem.sh/docs/utilities/toBytes.html
|
11
|
-
* - Example: https://viem.sh/docs/utilities/toBytes.html#usage
|
12
|
-
*
|
13
|
-
* @param value Value to encode.
|
14
|
-
* @param opts Options.
|
15
|
-
* @returns Byte array value.
|
16
|
-
*
|
17
|
-
* @example
|
18
|
-
* import { toBytes } from 'viem'
|
19
|
-
* const data = toBytes('Hello world')
|
20
|
-
* // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33])
|
21
|
-
*
|
22
|
-
* @example
|
23
|
-
* import { toBytes } from 'viem'
|
24
|
-
* const data = toBytes(420)
|
25
|
-
* // Uint8Array([1, 164])
|
26
|
-
*
|
27
|
-
* @example
|
28
|
-
* import { toBytes } from 'viem'
|
29
|
-
* const data = toBytes(420, { size: 4 })
|
30
|
-
* // Uint8Array([0, 0, 1, 164])
|
31
|
-
*/
|
32
|
-
export declare function toBytes(value: string | bigint | number | boolean | Hex, opts?: ToBytesParameters): ByteArray;
|
33
|
-
export type BoolToHexOpts = {
|
34
|
-
/** Size of the output bytes. */
|
35
|
-
size?: number;
|
36
|
-
};
|
37
|
-
/**
|
38
|
-
* Encodes a boolean into a byte array.
|
39
|
-
*
|
40
|
-
* - Docs: https://viem.sh/docs/utilities/toBytes.html#booltobytes
|
41
|
-
*
|
42
|
-
* @param value Boolean value to encode.
|
43
|
-
* @param opts Options.
|
44
|
-
* @returns Byte array value.
|
45
|
-
*
|
46
|
-
* @example
|
47
|
-
* import { boolToBytes } from 'viem'
|
48
|
-
* const data = boolToBytes(true)
|
49
|
-
* // Uint8Array([1])
|
50
|
-
*
|
51
|
-
* @example
|
52
|
-
* import { boolToBytes } from 'viem'
|
53
|
-
* const data = boolToBytes(true, { size: 32 })
|
54
|
-
* // Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1])
|
55
|
-
*/
|
56
|
-
export declare function boolToBytes(value: boolean, opts?: BoolToHexOpts): Uint8Array;
|
57
|
-
export type HexToBytesOpts = {
|
58
|
-
/** Size of the output bytes. */
|
59
|
-
size?: number;
|
60
|
-
};
|
61
|
-
/**
|
62
|
-
* Encodes a hex string into a byte array.
|
63
|
-
*
|
64
|
-
* - Docs: https://viem.sh/docs/utilities/toBytes.html#hextobytes
|
65
|
-
*
|
66
|
-
* @param hex Hex string to encode.
|
67
|
-
* @param opts Options.
|
68
|
-
* @returns Byte array value.
|
69
|
-
*
|
70
|
-
* @example
|
71
|
-
* import { hexToBytes } from 'viem'
|
72
|
-
* const data = hexToBytes('0x48656c6c6f20776f726c6421')
|
73
|
-
* // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33])
|
74
|
-
*
|
75
|
-
* @example
|
76
|
-
* import { hexToBytes } from 'viem'
|
77
|
-
* const data = hexToBytes('0x48656c6c6f20776f726c6421', { size: 32 })
|
78
|
-
* // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
|
79
|
-
*/
|
80
|
-
export declare function hexToBytes(hex_: Hex, opts?: HexToBytesOpts): ByteArray;
|
81
|
-
/**
|
82
|
-
* Encodes a number into a byte array.
|
83
|
-
*
|
84
|
-
* - Docs: https://viem.sh/docs/utilities/toBytes.html#numbertobytes
|
85
|
-
*
|
86
|
-
* @param value Number to encode.
|
87
|
-
* @param opts Options.
|
88
|
-
* @returns Byte array value.
|
89
|
-
*
|
90
|
-
* @example
|
91
|
-
* import { numberToBytes } from 'viem'
|
92
|
-
* const data = numberToBytes(420)
|
93
|
-
* // Uint8Array([1, 164])
|
94
|
-
*
|
95
|
-
* @example
|
96
|
-
* import { numberToBytes } from 'viem'
|
97
|
-
* const data = numberToBytes(420, { size: 4 })
|
98
|
-
* // Uint8Array([0, 0, 1, 164])
|
99
|
-
*/
|
100
|
-
export declare function numberToBytes(value: bigint | number, opts?: NumberToHexOpts): Uint8Array;
|
101
|
-
export type StringToBytesOpts = {
|
102
|
-
/** Size of the output bytes. */
|
103
|
-
size?: number;
|
104
|
-
};
|
105
|
-
/**
|
106
|
-
* Encodes a UTF-8 string into a byte array.
|
107
|
-
*
|
108
|
-
* - Docs: https://viem.sh/docs/utilities/toBytes.html#stringtobytes
|
109
|
-
*
|
110
|
-
* @param value String to encode.
|
111
|
-
* @param opts Options.
|
112
|
-
* @returns Byte array value.
|
113
|
-
*
|
114
|
-
* @example
|
115
|
-
* import { stringToBytes } from 'viem'
|
116
|
-
* const data = stringToBytes('Hello world!')
|
117
|
-
* // Uint8Array([72, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100, 33])
|
118
|
-
*
|
119
|
-
* @example
|
120
|
-
* import { stringToBytes } from 'viem'
|
121
|
-
* const data = stringToBytes('Hello world!', { size: 32 })
|
122
|
-
* // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
|
123
|
-
*/
|
124
|
-
export declare function stringToBytes(value: string, opts?: StringToBytesOpts): ByteArray;
|
125
|
-
//# sourceMappingURL=toBytes.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"toBytes.d.ts","sourceRoot":"","sources":["../../../../src/utils/encoding/toBytes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAKzD,OAAO,EAAE,KAAK,eAAe,EAAe,MAAM,YAAY,CAAA;AAI9D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,gCAAgC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,OAAO,CACrB,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,GAAG,EAC/C,IAAI,GAAE,iBAAsB,GAC3B,SAAS,CAMX;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,gCAAgC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,GAAE,aAAkB,cAQnE;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,gCAAgC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,GAAE,cAAmB,GAAG,SAAS,CAsB1E;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,CAAC,EAAE,eAAe,cAG3E;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,gCAAgC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,iBAAsB,GAC3B,SAAS,CAOX"}
|