viem 2.8.9 → 2.8.11
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/CHANGELOG.md +20 -0
- package/_cjs/accounts/generateMnemonic.js.map +1 -1
- package/_cjs/actions/getContract.js.map +1 -1
- package/_cjs/actions/public/call.js +5 -1
- package/_cjs/actions/public/call.js.map +1 -1
- package/_cjs/actions/public/createContractEventFilter.js.map +1 -1
- package/_cjs/actions/public/estimateFeesPerGas.js.map +1 -1
- package/_cjs/actions/public/estimateMaxPriorityFeePerGas.js.map +1 -1
- package/_cjs/actions/public/watchBlockNumber.js +1 -1
- package/_cjs/actions/public/watchBlockNumber.js.map +1 -1
- package/_cjs/actions/public/watchBlocks.js +1 -1
- package/_cjs/actions/public/watchBlocks.js.map +1 -1
- package/_cjs/actions/public/watchContractEvent.js +73 -58
- package/_cjs/actions/public/watchContractEvent.js.map +1 -1
- package/_cjs/actions/public/watchEvent.js +1 -1
- package/_cjs/actions/public/watchEvent.js.map +1 -1
- package/_cjs/actions/public/watchPendingTransactions.js +1 -1
- package/_cjs/actions/public/watchPendingTransactions.js.map +1 -1
- package/_cjs/actions/wallet/prepareTransactionRequest.js.map +1 -1
- package/_cjs/chains/celo/parsers.js.map +1 -1
- package/_cjs/chains/celo/serializers.js.map +1 -1
- package/_cjs/chains/definitions/arbitrumSepolia.js +1 -1
- package/_cjs/chains/definitions/arbitrumSepolia.js.map +1 -1
- package/_cjs/chains/definitions/lukso.js +6 -0
- package/_cjs/chains/definitions/lukso.js.map +1 -1
- package/_cjs/chains/definitions/luksoTestnet.js +34 -0
- package/_cjs/chains/definitions/luksoTestnet.js.map +1 -0
- package/_cjs/chains/definitions/zkSyncInMemoryNode.js +17 -0
- package/_cjs/chains/definitions/zkSyncInMemoryNode.js.map +1 -0
- package/_cjs/chains/definitions/zkSyncLocalNode.js +17 -0
- package/_cjs/chains/definitions/zkSyncLocalNode.js.map +1 -0
- package/_cjs/chains/index.js +19 -13
- package/_cjs/chains/index.js.map +1 -1
- package/_cjs/chains/opStack/actions/getL1BaseFee.js.map +1 -1
- package/_cjs/chains/opStack/actions/getTimeToProve.js.map +1 -1
- package/_cjs/chains/opStack/actions/waitForNextL2Output.js.map +1 -1
- package/_cjs/chains/zksync/formatters.js.map +1 -1
- package/_cjs/chains/zksync/serializers.js.map +1 -1
- package/_cjs/chains/zksync/utils/assertEip712Request.js.map +1 -1
- package/_cjs/chains/zksync/utils/assertEip712Transaction.js.map +1 -1
- package/_cjs/chains/zksync/utils/isEip712Transaction.js.map +1 -1
- package/_cjs/clients/createClient.js.map +1 -1
- package/_cjs/clients/decorators/public.js.map +1 -1
- package/_cjs/clients/transports/createTransport.js.map +1 -1
- package/_cjs/clients/transports/fallback.js.map +1 -1
- package/_cjs/clients/transports/http.js.map +1 -1
- package/_cjs/errors/abi.js.map +1 -1
- package/_cjs/errors/account.js.map +1 -1
- package/_cjs/errors/base.js.map +1 -1
- package/_cjs/errors/chain.js.map +1 -1
- package/_cjs/errors/contract.js.map +1 -1
- package/_cjs/errors/node.js +5 -5
- package/_cjs/errors/node.js.map +1 -1
- package/_cjs/errors/request.js.map +1 -1
- package/_cjs/errors/rpc.js.map +1 -1
- package/_cjs/errors/version.js +1 -1
- package/_cjs/errors/version.js.map +1 -1
- package/_cjs/index.js.map +1 -1
- package/_cjs/utils/abi/encodeAbiParameters.js +3 -0
- package/_cjs/utils/abi/encodeAbiParameters.js.map +1 -1
- package/_cjs/utils/abi/formatAbiItem.js.map +1 -1
- package/_cjs/utils/address/getAddress.js.map +1 -1
- package/_cjs/utils/data/isHex.js.map +1 -1
- package/_cjs/utils/data/slice.js.map +1 -1
- package/_cjs/utils/encoding/toBytes.js.map +1 -1
- package/_cjs/utils/errors/getNodeError.js.map +1 -1
- package/_cjs/utils/formatters/block.js.map +1 -1
- package/_cjs/utils/formatters/extract.js.map +1 -1
- package/_cjs/utils/formatters/log.js +1 -1
- package/_cjs/utils/formatters/log.js.map +1 -1
- package/_cjs/utils/formatters/proof.js.map +1 -1
- package/_cjs/utils/formatters/transaction.js.map +1 -1
- package/_cjs/utils/formatters/transactionReceipt.js.map +1 -1
- package/_cjs/utils/formatters/transactionRequest.js.map +1 -1
- package/_cjs/utils/hash/keccak256.js.map +1 -1
- package/_cjs/utils/hash/ripemd160.js.map +1 -1
- package/_cjs/utils/hash/sha256.js.map +1 -1
- package/_cjs/utils/promise/withRetry.js.map +1 -1
- package/_cjs/utils/promise/withTimeout.js +1 -1
- package/_cjs/utils/promise/withTimeout.js.map +1 -1
- package/_cjs/utils/rpc/http.js +1 -1
- package/_cjs/utils/rpc/http.js.map +1 -1
- package/_cjs/utils/signature/hashMessage.js.map +1 -1
- package/_cjs/utils/transaction/assertRequest.js.map +1 -1
- package/_cjs/utils/transaction/getTransactionType.js.map +1 -1
- package/_cjs/utils/transaction/serializeAccessList.js.map +1 -1
- package/_cjs/utils/transaction/serializeTransaction.js.map +1 -1
- package/_cjs/utils/typedData.js.map +1 -1
- package/_esm/accounts/generateMnemonic.js.map +1 -1
- package/_esm/actions/getContract.js.map +1 -1
- package/_esm/actions/public/call.js +5 -1
- package/_esm/actions/public/call.js.map +1 -1
- package/_esm/actions/public/createContractEventFilter.js.map +1 -1
- package/_esm/actions/public/estimateFeesPerGas.js.map +1 -1
- package/_esm/actions/public/estimateMaxPriorityFeePerGas.js.map +1 -1
- package/_esm/actions/public/watchBlockNumber.js +1 -1
- package/_esm/actions/public/watchBlockNumber.js.map +1 -1
- package/_esm/actions/public/watchBlocks.js +1 -1
- package/_esm/actions/public/watchBlocks.js.map +1 -1
- package/_esm/actions/public/watchContractEvent.js +75 -60
- package/_esm/actions/public/watchContractEvent.js.map +1 -1
- package/_esm/actions/public/watchEvent.js +1 -1
- package/_esm/actions/public/watchEvent.js.map +1 -1
- package/_esm/actions/public/watchPendingTransactions.js +1 -1
- package/_esm/actions/public/watchPendingTransactions.js.map +1 -1
- package/_esm/actions/wallet/prepareTransactionRequest.js.map +1 -1
- package/_esm/chains/celo/parsers.js.map +1 -1
- package/_esm/chains/celo/serializers.js.map +1 -1
- package/_esm/chains/definitions/arbitrumSepolia.js +1 -1
- package/_esm/chains/definitions/arbitrumSepolia.js.map +1 -1
- package/_esm/chains/definitions/lukso.js +6 -0
- package/_esm/chains/definitions/lukso.js.map +1 -1
- package/_esm/chains/definitions/luksoTestnet.js +31 -0
- package/_esm/chains/definitions/luksoTestnet.js.map +1 -0
- package/_esm/chains/definitions/zkSyncInMemoryNode.js +14 -0
- package/_esm/chains/definitions/zkSyncInMemoryNode.js.map +1 -0
- package/_esm/chains/definitions/zkSyncLocalNode.js +14 -0
- package/_esm/chains/definitions/zkSyncLocalNode.js.map +1 -0
- package/_esm/chains/index.js +8 -5
- package/_esm/chains/index.js.map +1 -1
- package/_esm/chains/opStack/actions/getL1BaseFee.js.map +1 -1
- package/_esm/chains/opStack/actions/getTimeToProve.js.map +1 -1
- package/_esm/chains/opStack/actions/waitForNextL2Output.js.map +1 -1
- package/_esm/chains/opStack/decorators/publicL2.js +2 -2
- package/_esm/chains/zksync/formatters.js.map +1 -1
- package/_esm/chains/zksync/serializers.js.map +1 -1
- package/_esm/chains/zksync/utils/assertEip712Request.js.map +1 -1
- package/_esm/chains/zksync/utils/assertEip712Transaction.js.map +1 -1
- package/_esm/chains/zksync/utils/isEip712Transaction.js.map +1 -1
- package/_esm/clients/createClient.js.map +1 -1
- package/_esm/clients/decorators/public.js.map +1 -1
- package/_esm/clients/transports/createTransport.js.map +1 -1
- package/_esm/clients/transports/fallback.js.map +1 -1
- package/_esm/clients/transports/http.js.map +1 -1
- package/_esm/errors/abi.js.map +1 -1
- package/_esm/errors/account.js.map +1 -1
- package/_esm/errors/base.js.map +1 -1
- package/_esm/errors/chain.js.map +1 -1
- package/_esm/errors/contract.js.map +1 -1
- package/_esm/errors/node.js +5 -5
- package/_esm/errors/node.js.map +1 -1
- package/_esm/errors/request.js.map +1 -1
- package/_esm/errors/rpc.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_esm/errors/version.js.map +1 -1
- package/_esm/index.js.map +1 -1
- package/_esm/utils/abi/encodeAbiParameters.js +3 -0
- package/_esm/utils/abi/encodeAbiParameters.js.map +1 -1
- package/_esm/utils/abi/formatAbiItem.js.map +1 -1
- package/_esm/utils/address/getAddress.js.map +1 -1
- package/_esm/utils/data/isHex.js.map +1 -1
- package/_esm/utils/data/slice.js.map +1 -1
- package/_esm/utils/encoding/toBytes.js.map +1 -1
- package/_esm/utils/errors/getNodeError.js.map +1 -1
- package/_esm/utils/formatters/block.js.map +1 -1
- package/_esm/utils/formatters/extract.js.map +1 -1
- package/_esm/utils/formatters/log.js +1 -1
- package/_esm/utils/formatters/log.js.map +1 -1
- package/_esm/utils/formatters/proof.js.map +1 -1
- package/_esm/utils/formatters/transaction.js.map +1 -1
- package/_esm/utils/formatters/transactionReceipt.js.map +1 -1
- package/_esm/utils/formatters/transactionRequest.js.map +1 -1
- package/_esm/utils/hash/keccak256.js.map +1 -1
- package/_esm/utils/hash/ripemd160.js.map +1 -1
- package/_esm/utils/hash/sha256.js.map +1 -1
- package/_esm/utils/promise/withRetry.js.map +1 -1
- package/_esm/utils/promise/withTimeout.js +1 -1
- package/_esm/utils/promise/withTimeout.js.map +1 -1
- package/_esm/utils/rpc/http.js +1 -1
- package/_esm/utils/rpc/http.js.map +1 -1
- package/_esm/utils/signature/hashMessage.js.map +1 -1
- package/_esm/utils/transaction/assertRequest.js.map +1 -1
- package/_esm/utils/transaction/getTransactionType.js.map +1 -1
- package/_esm/utils/transaction/serializeAccessList.js.map +1 -1
- package/_esm/utils/transaction/serializeTransaction.js.map +1 -1
- package/_esm/utils/typedData.js.map +1 -1
- package/_types/accounts/generateMnemonic.d.ts +1 -1
- package/_types/accounts/generateMnemonic.d.ts.map +1 -1
- package/_types/accounts/types.d.ts +9 -9
- package/_types/accounts/types.d.ts.map +1 -1
- package/_types/accounts/utils/signTransaction.d.ts +1 -1
- package/_types/accounts/utils/signTransaction.d.ts.map +1 -1
- package/_types/actions/ens/getEnsAddress.d.ts +4 -4
- package/_types/actions/ens/getEnsAddress.d.ts.map +1 -1
- package/_types/actions/ens/getEnsAvatar.d.ts +1 -1
- package/_types/actions/ens/getEnsAvatar.d.ts.map +1 -1
- package/_types/actions/ens/getEnsName.d.ts +3 -3
- package/_types/actions/ens/getEnsName.d.ts.map +1 -1
- package/_types/actions/ens/getEnsResolver.d.ts +1 -1
- package/_types/actions/ens/getEnsResolver.d.ts.map +1 -1
- package/_types/actions/ens/getEnsText.d.ts +3 -3
- package/_types/actions/ens/getEnsText.d.ts.map +1 -1
- package/_types/actions/getContract.d.ts +3 -3
- package/_types/actions/getContract.d.ts.map +1 -1
- package/_types/actions/public/call.d.ts +8 -8
- package/_types/actions/public/call.d.ts.map +1 -1
- package/_types/actions/public/createContractEventFilter.d.ts +6 -6
- package/_types/actions/public/createContractEventFilter.d.ts.map +1 -1
- package/_types/actions/public/createEventFilter.d.ts +21 -21
- package/_types/actions/public/createEventFilter.d.ts.map +1 -1
- package/_types/actions/public/estimateFeesPerGas.d.ts +4 -4
- package/_types/actions/public/estimateFeesPerGas.d.ts.map +1 -1
- package/_types/actions/public/estimateGas.d.ts +5 -5
- package/_types/actions/public/estimateGas.d.ts.map +1 -1
- package/_types/actions/public/estimateMaxPriorityFeePerGas.d.ts +3 -3
- package/_types/actions/public/estimateMaxPriorityFeePerGas.d.ts.map +1 -1
- package/_types/actions/public/getBalance.d.ts +4 -4
- package/_types/actions/public/getBalance.d.ts.map +1 -1
- package/_types/actions/public/getBlock.d.ts +10 -10
- package/_types/actions/public/getBlock.d.ts.map +1 -1
- package/_types/actions/public/getBlockNumber.d.ts +1 -1
- package/_types/actions/public/getBlockNumber.d.ts.map +1 -1
- package/_types/actions/public/getBlockTransactionCount.d.ts +9 -9
- package/_types/actions/public/getBlockTransactionCount.d.ts.map +1 -1
- package/_types/actions/public/getBytecode.d.ts +4 -4
- package/_types/actions/public/getBytecode.d.ts.map +1 -1
- package/_types/actions/public/getContractEvents.d.ts +4 -4
- package/_types/actions/public/getContractEvents.d.ts.map +1 -1
- package/_types/actions/public/getFeeHistory.d.ts +4 -4
- package/_types/actions/public/getFeeHistory.d.ts.map +1 -1
- package/_types/actions/public/getLogs.d.ts +17 -17
- package/_types/actions/public/getLogs.d.ts.map +1 -1
- package/_types/actions/public/getProof.d.ts +4 -4
- package/_types/actions/public/getProof.d.ts.map +1 -1
- package/_types/actions/public/getStorageAt.d.ts +4 -4
- package/_types/actions/public/getStorageAt.d.ts.map +1 -1
- package/_types/actions/public/getTransaction.d.ts +13 -13
- package/_types/actions/public/getTransaction.d.ts.map +1 -1
- package/_types/actions/public/getTransactionConfirmations.d.ts +2 -2
- package/_types/actions/public/getTransactionConfirmations.d.ts.map +1 -1
- package/_types/actions/public/getTransactionCount.d.ts +4 -4
- package/_types/actions/public/getTransactionCount.d.ts.map +1 -1
- package/_types/actions/public/simulateContract.d.ts +3 -3
- package/_types/actions/public/simulateContract.d.ts.map +1 -1
- package/_types/actions/public/waitForTransactionReceipt.d.ts +6 -6
- package/_types/actions/public/waitForTransactionReceipt.d.ts.map +1 -1
- package/_types/actions/public/watchBlockNumber.d.ts +1 -1
- package/_types/actions/public/watchBlockNumber.d.ts.map +1 -1
- package/_types/actions/public/watchContractEvent.d.ts.map +1 -1
- package/_types/actions/public/watchEvent.d.ts +13 -13
- package/_types/actions/public/watchEvent.d.ts.map +1 -1
- package/_types/actions/public/watchPendingTransactions.d.ts +1 -1
- package/_types/actions/public/watchPendingTransactions.d.ts.map +1 -1
- package/_types/actions/test/mine.d.ts +1 -1
- package/_types/actions/test/mine.d.ts.map +1 -1
- package/_types/actions/test/reset.d.ts +2 -2
- package/_types/actions/test/reset.d.ts.map +1 -1
- package/_types/actions/wallet/prepareTransactionRequest.d.ts +5 -5
- package/_types/actions/wallet/prepareTransactionRequest.d.ts.map +1 -1
- package/_types/actions/wallet/writeContract.d.ts +1 -1
- package/_types/actions/wallet/writeContract.d.ts.map +1 -1
- package/_types/chains/celo/chainConfig.d.ts +312 -312
- package/_types/chains/celo/formatters.d.ts +312 -312
- package/_types/chains/celo/parsers.d.ts.map +1 -1
- package/_types/chains/celo/serializers.d.ts +1 -1
- package/_types/chains/celo/serializers.d.ts.map +1 -1
- package/_types/chains/celo/types.d.ts +39 -39
- package/_types/chains/celo/types.d.ts.map +1 -1
- package/_types/chains/definitions/ancient8.d.ts +217 -217
- package/_types/chains/definitions/ancient8Sepolia.d.ts +217 -217
- package/_types/chains/definitions/arbitrumSepolia.d.ts +1 -1
- package/_types/chains/definitions/base.d.ts +217 -217
- package/_types/chains/definitions/baseGoerli.d.ts +217 -217
- package/_types/chains/definitions/baseSepolia.d.ts +217 -217
- package/_types/chains/definitions/celo.d.ts +312 -312
- package/_types/chains/definitions/celoAlfajores.d.ts +312 -312
- package/_types/chains/definitions/fraxtal.d.ts +217 -217
- package/_types/chains/definitions/fraxtalTestnet.d.ts +217 -217
- package/_types/chains/definitions/liskSepolia.d.ts +217 -217
- package/_types/chains/definitions/lukso.d.ts +6 -8
- package/_types/chains/definitions/lukso.d.ts.map +1 -1
- package/_types/chains/definitions/luksoTestnet.d.ts +35 -0
- package/_types/chains/definitions/luksoTestnet.d.ts.map +1 -0
- package/_types/chains/definitions/optimism.d.ts +217 -217
- package/_types/chains/definitions/optimismGoerli.d.ts +217 -217
- package/_types/chains/definitions/optimismSepolia.d.ts +217 -217
- package/_types/chains/definitions/pgn.d.ts +217 -217
- package/_types/chains/definitions/pgnTestnet.d.ts +217 -217
- package/_types/chains/definitions/rss3.d.ts +217 -217
- package/_types/chains/definitions/rss3Sepolia.d.ts +217 -217
- package/_types/chains/definitions/zkSync.d.ts +33 -33
- package/_types/chains/definitions/zkSyncInMemoryNode.d.ts +42 -0
- package/_types/chains/definitions/zkSyncInMemoryNode.d.ts.map +1 -0
- package/_types/chains/definitions/zkSyncLocalNode.d.ts +42 -0
- package/_types/chains/definitions/zkSyncLocalNode.d.ts.map +1 -0
- package/_types/chains/definitions/zkSyncSepoliaTestnet.d.ts +33 -33
- package/_types/chains/definitions/zkSyncTestnet.d.ts +33 -33
- package/_types/chains/definitions/zora.d.ts +217 -217
- package/_types/chains/definitions/zoraSepolia.d.ts +217 -217
- package/_types/chains/definitions/zoraTestnet.d.ts +217 -217
- package/_types/chains/index.d.ts +8 -5
- package/_types/chains/index.d.ts.map +1 -1
- package/_types/chains/opStack/actions/buildDepositTransaction.d.ts +7 -7
- package/_types/chains/opStack/actions/buildDepositTransaction.d.ts.map +1 -1
- package/_types/chains/opStack/actions/buildInitiateWithdrawal.d.ts +3 -3
- package/_types/chains/opStack/actions/buildInitiateWithdrawal.d.ts.map +1 -1
- package/_types/chains/opStack/actions/depositTransaction.d.ts +1 -1
- package/_types/chains/opStack/actions/depositTransaction.d.ts.map +1 -1
- package/_types/chains/opStack/actions/estimateDepositTransactionGas.d.ts +1 -1
- package/_types/chains/opStack/actions/estimateDepositTransactionGas.d.ts.map +1 -1
- package/_types/chains/opStack/actions/estimateFinalizeWithdrawalGas.d.ts +1 -1
- package/_types/chains/opStack/actions/estimateFinalizeWithdrawalGas.d.ts.map +1 -1
- package/_types/chains/opStack/actions/estimateInitiateWithdrawalGas.d.ts +1 -1
- package/_types/chains/opStack/actions/estimateInitiateWithdrawalGas.d.ts.map +1 -1
- package/_types/chains/opStack/actions/estimateL1Fee.d.ts +1 -1
- package/_types/chains/opStack/actions/estimateL1Fee.d.ts.map +1 -1
- package/_types/chains/opStack/actions/estimateL1Gas.d.ts +1 -1
- package/_types/chains/opStack/actions/estimateL1Gas.d.ts.map +1 -1
- package/_types/chains/opStack/actions/estimateProveWithdrawalGas.d.ts +1 -1
- package/_types/chains/opStack/actions/estimateProveWithdrawalGas.d.ts.map +1 -1
- package/_types/chains/opStack/actions/finalizeWithdrawal.d.ts +1 -1
- package/_types/chains/opStack/actions/finalizeWithdrawal.d.ts.map +1 -1
- package/_types/chains/opStack/actions/getL1BaseFee.d.ts +2 -2
- package/_types/chains/opStack/actions/getL1BaseFee.d.ts.map +1 -1
- package/_types/chains/opStack/actions/getTimeToNextL2Output.d.ts +2 -2
- package/_types/chains/opStack/actions/getTimeToNextL2Output.d.ts.map +1 -1
- package/_types/chains/opStack/actions/getTimeToProve.d.ts +1 -1
- package/_types/chains/opStack/actions/getTimeToProve.d.ts.map +1 -1
- package/_types/chains/opStack/actions/proveWithdrawal.d.ts +1 -1
- package/_types/chains/opStack/actions/proveWithdrawal.d.ts.map +1 -1
- package/_types/chains/opStack/actions/waitForNextL2Output.d.ts +2 -2
- package/_types/chains/opStack/actions/waitForNextL2Output.d.ts.map +1 -1
- package/_types/chains/opStack/actions/waitToProve.d.ts +1 -1
- package/_types/chains/opStack/actions/waitToProve.d.ts.map +1 -1
- package/_types/chains/opStack/chainConfig.d.ts +217 -217
- package/_types/chains/opStack/decorators/publicL2.d.ts +3 -3
- package/_types/chains/opStack/decorators/publicL2.d.ts.map +1 -1
- package/_types/chains/opStack/formatters.d.ts +217 -217
- package/_types/chains/opStack/types/deposit.d.ts +6 -6
- package/_types/chains/opStack/types/deposit.d.ts.map +1 -1
- package/_types/chains/opStack/types/transaction.d.ts +4 -4
- package/_types/chains/opStack/types/transaction.d.ts.map +1 -1
- package/_types/chains/opStack/types/withdrawal.d.ts +2 -2
- package/_types/chains/opStack/types/withdrawal.d.ts.map +1 -1
- package/_types/chains/zksync/chainConfig.d.ts +33 -33
- package/_types/chains/zksync/formatters.d.ts +33 -33
- package/_types/chains/zksync/serializers.d.ts +1 -1
- package/_types/chains/zksync/serializers.d.ts.map +1 -1
- package/_types/chains/zksync/types/eip712.d.ts +4 -4
- package/_types/chains/zksync/types/eip712.d.ts.map +1 -1
- package/_types/chains/zksync/types/transaction.d.ts +21 -21
- package/_types/chains/zksync/types/transaction.d.ts.map +1 -1
- package/_types/chains/zksync/utils/assertEip712Request.d.ts +2 -1
- package/_types/chains/zksync/utils/assertEip712Request.d.ts.map +1 -1
- package/_types/chains/zksync/utils/assertEip712Transaction.d.ts +2 -1
- package/_types/chains/zksync/utils/assertEip712Transaction.d.ts.map +1 -1
- package/_types/chains/zksync/utils/isEip712Transaction.d.ts +2 -1
- package/_types/chains/zksync/utils/isEip712Transaction.d.ts.map +1 -1
- package/_types/clients/createClient.d.ts +2 -2
- package/_types/clients/createClient.d.ts.map +1 -1
- package/_types/clients/decorators/public.d.ts +7 -7
- package/_types/clients/decorators/public.d.ts.map +1 -1
- package/_types/clients/decorators/test.d.ts +1 -1
- package/_types/clients/decorators/test.d.ts.map +1 -1
- package/_types/clients/transports/createTransport.d.ts +9 -9
- package/_types/clients/transports/createTransport.d.ts.map +1 -1
- package/_types/clients/transports/custom.d.ts +4 -4
- package/_types/clients/transports/custom.d.ts.map +1 -1
- package/_types/clients/transports/fallback.d.ts +17 -17
- package/_types/clients/transports/fallback.d.ts.map +1 -1
- package/_types/clients/transports/http.d.ts +13 -13
- package/_types/clients/transports/http.d.ts.map +1 -1
- package/_types/clients/transports/ipc.d.ts +6 -6
- package/_types/clients/transports/ipc.d.ts.map +1 -1
- package/_types/clients/transports/webSocket.d.ts +6 -6
- package/_types/clients/transports/webSocket.d.ts.map +1 -1
- package/_types/errors/abi.d.ts +6 -6
- package/_types/errors/abi.d.ts.map +1 -1
- package/_types/errors/account.d.ts +1 -1
- package/_types/errors/account.d.ts.map +1 -1
- package/_types/errors/base.d.ts +9 -9
- package/_types/errors/base.d.ts.map +1 -1
- package/_types/errors/block.d.ts +2 -2
- package/_types/errors/block.d.ts.map +1 -1
- package/_types/errors/chain.d.ts +3 -3
- package/_types/errors/chain.d.ts.map +1 -1
- package/_types/errors/contract.d.ts +20 -20
- package/_types/errors/contract.d.ts.map +1 -1
- package/_types/errors/encoding.d.ts +3 -3
- package/_types/errors/encoding.d.ts.map +1 -1
- package/_types/errors/estimateGas.d.ts +3 -3
- package/_types/errors/estimateGas.d.ts.map +1 -1
- package/_types/errors/node.d.ts +27 -27
- package/_types/errors/node.d.ts.map +1 -1
- package/_types/errors/request.d.ts +7 -7
- package/_types/errors/request.d.ts.map +1 -1
- package/_types/errors/rpc.d.ts +5 -5
- package/_types/errors/rpc.d.ts.map +1 -1
- package/_types/errors/transaction.d.ts +7 -7
- package/_types/errors/transaction.d.ts.map +1 -1
- package/_types/errors/version.d.ts +1 -1
- package/_types/errors/version.d.ts.map +1 -1
- package/_types/index.d.ts +1 -1
- package/_types/index.d.ts.map +1 -1
- package/_types/types/block.d.ts +3 -3
- package/_types/types/block.d.ts.map +1 -1
- package/_types/types/chain.d.ts +1 -1
- package/_types/types/chain.d.ts.map +1 -1
- package/_types/types/contract.d.ts +5 -5
- package/_types/types/contract.d.ts.map +1 -1
- package/_types/types/eip1193.d.ts +29 -29
- package/_types/types/eip1193.d.ts.map +1 -1
- package/_types/types/ens.d.ts +1 -1
- package/_types/types/ens.d.ts.map +1 -1
- package/_types/types/fee.d.ts +6 -6
- package/_types/types/fee.d.ts.map +1 -1
- package/_types/types/filter.d.ts +9 -9
- package/_types/types/filter.d.ts.map +1 -1
- package/_types/types/kzg.d.ts +1 -1
- package/_types/types/kzg.d.ts.map +1 -1
- package/_types/types/misc.d.ts +2 -2
- package/_types/types/misc.d.ts.map +1 -1
- package/_types/types/rpc.d.ts +16 -16
- package/_types/types/rpc.d.ts.map +1 -1
- package/_types/types/stateOverride.d.ts +5 -5
- package/_types/types/stateOverride.d.ts.map +1 -1
- package/_types/types/transaction.d.ts +56 -56
- package/_types/types/transaction.d.ts.map +1 -1
- package/_types/types/typedData.d.ts +1 -1
- package/_types/types/typedData.d.ts.map +1 -1
- package/_types/types/utils.d.ts +6 -3
- package/_types/types/utils.d.ts.map +1 -1
- package/_types/types/window.d.ts +1 -1
- package/_types/types/window.d.ts.map +1 -1
- package/_types/utils/abi/decodeEventLog.d.ts +1 -1
- package/_types/utils/abi/decodeEventLog.d.ts.map +1 -1
- package/_types/utils/abi/decodeFunctionResult.d.ts +2 -2
- package/_types/utils/abi/decodeFunctionResult.d.ts.map +1 -1
- package/_types/utils/abi/encodeAbiParameters.d.ts.map +1 -1
- package/_types/utils/abi/encodeErrorResult.d.ts +2 -2
- package/_types/utils/abi/encodeErrorResult.d.ts.map +1 -1
- package/_types/utils/abi/encodeEventTopics.d.ts +2 -2
- package/_types/utils/abi/encodeEventTopics.d.ts.map +1 -1
- package/_types/utils/abi/encodeFunctionData.d.ts +2 -2
- package/_types/utils/abi/encodeFunctionData.d.ts.map +1 -1
- package/_types/utils/abi/encodeFunctionResult.d.ts +2 -2
- package/_types/utils/abi/encodeFunctionResult.d.ts.map +1 -1
- package/_types/utils/abi/formatAbiItem.d.ts +2 -2
- package/_types/utils/abi/formatAbiItem.d.ts.map +1 -1
- package/_types/utils/abi/formatAbiItemWithArgs.d.ts +2 -2
- package/_types/utils/abi/formatAbiItemWithArgs.d.ts.map +1 -1
- package/_types/utils/address/getAddress.d.ts +1 -1
- package/_types/utils/address/getAddress.d.ts.map +1 -1
- package/_types/utils/address/getContractAddress.d.ts +1 -1
- package/_types/utils/address/getContractAddress.d.ts.map +1 -1
- package/_types/utils/address/isAddress.d.ts +1 -1
- package/_types/utils/address/isAddress.d.ts.map +1 -1
- package/_types/utils/blob/commitmentToVersionedHash.d.ts +1 -1
- package/_types/utils/blob/commitmentToVersionedHash.d.ts.map +1 -1
- package/_types/utils/blob/commitmentsToVersionedHashes.d.ts +1 -1
- package/_types/utils/blob/commitmentsToVersionedHashes.d.ts.map +1 -1
- package/_types/utils/blob/sidecarsToVersionedHashes.d.ts +1 -1
- package/_types/utils/blob/sidecarsToVersionedHashes.d.ts.map +1 -1
- package/_types/utils/chain/assertCurrentChain.d.ts +1 -1
- package/_types/utils/chain/assertCurrentChain.d.ts.map +1 -1
- package/_types/utils/chain/getChainContractAddress.d.ts +1 -1
- package/_types/utils/chain/getChainContractAddress.d.ts.map +1 -1
- package/_types/utils/cursor.d.ts +1 -1
- package/_types/utils/cursor.d.ts.map +1 -1
- package/_types/utils/data/isHex.d.ts +1 -1
- package/_types/utils/data/isHex.d.ts.map +1 -1
- package/_types/utils/data/pad.d.ts +2 -2
- package/_types/utils/data/pad.d.ts.map +1 -1
- package/_types/utils/data/slice.d.ts +6 -6
- package/_types/utils/data/slice.d.ts.map +1 -1
- package/_types/utils/data/trim.d.ts +1 -1
- package/_types/utils/data/trim.d.ts.map +1 -1
- package/_types/utils/encoding/fromBytes.d.ts +5 -5
- package/_types/utils/encoding/fromBytes.d.ts.map +1 -1
- package/_types/utils/encoding/fromHex.d.ts +5 -5
- package/_types/utils/encoding/fromHex.d.ts.map +1 -1
- package/_types/utils/encoding/toBytes.d.ts +5 -5
- package/_types/utils/encoding/toBytes.d.ts.map +1 -1
- package/_types/utils/encoding/toHex.d.ts +7 -7
- package/_types/utils/encoding/toHex.d.ts.map +1 -1
- package/_types/utils/ens/avatar/parseAvatarRecord.d.ts +1 -1
- package/_types/utils/ens/avatar/parseAvatarRecord.d.ts.map +1 -1
- package/_types/utils/errors/getCallError.d.ts +2 -2
- package/_types/utils/errors/getCallError.d.ts.map +1 -1
- package/_types/utils/errors/getContractError.d.ts +3 -3
- package/_types/utils/errors/getContractError.d.ts.map +1 -1
- package/_types/utils/errors/getEstimateGasError.d.ts +3 -3
- package/_types/utils/errors/getEstimateGasError.d.ts.map +1 -1
- package/_types/utils/errors/getNodeError.d.ts +2 -1
- package/_types/utils/errors/getNodeError.d.ts.map +1 -1
- package/_types/utils/errors/getTransactionError.d.ts +2 -2
- package/_types/utils/errors/getTransactionError.d.ts.map +1 -1
- package/_types/utils/formatters/block.d.ts +3 -3
- package/_types/utils/formatters/block.d.ts.map +1 -1
- package/_types/utils/formatters/extract.d.ts +1 -1
- package/_types/utils/formatters/extract.d.ts.map +1 -1
- package/_types/utils/formatters/formatter.d.ts.map +1 -1
- package/_types/utils/formatters/log.d.ts +4 -3
- package/_types/utils/formatters/log.d.ts.map +1 -1
- package/_types/utils/formatters/proof.d.ts +2 -1
- package/_types/utils/formatters/proof.d.ts.map +1 -1
- package/_types/utils/formatters/transaction.d.ts +3 -3
- package/_types/utils/formatters/transaction.d.ts.map +1 -1
- package/_types/utils/formatters/transactionReceipt.d.ts +3 -2
- package/_types/utils/formatters/transactionReceipt.d.ts.map +1 -1
- package/_types/utils/formatters/transactionRequest.d.ts +3 -2
- package/_types/utils/formatters/transactionRequest.d.ts.map +1 -1
- package/_types/utils/hash/keccak256.d.ts +1 -1
- package/_types/utils/hash/keccak256.d.ts.map +1 -1
- package/_types/utils/hash/ripemd160.d.ts +1 -1
- package/_types/utils/hash/ripemd160.d.ts.map +1 -1
- package/_types/utils/hash/sha256.d.ts +1 -1
- package/_types/utils/hash/sha256.d.ts.map +1 -1
- package/_types/utils/poll.d.ts +2 -2
- package/_types/utils/poll.d.ts.map +1 -1
- package/_types/utils/promise/createBatchScheduler.d.ts +4 -4
- package/_types/utils/promise/createBatchScheduler.d.ts.map +1 -1
- package/_types/utils/promise/withCache.d.ts +1 -1
- package/_types/utils/promise/withCache.d.ts.map +1 -1
- package/_types/utils/promise/withRetry.d.ts +4 -4
- package/_types/utils/promise/withRetry.d.ts.map +1 -1
- package/_types/utils/promise/withTimeout.d.ts +4 -4
- package/_types/utils/promise/withTimeout.d.ts.map +1 -1
- package/_types/utils/rpc/http.d.ts +6 -6
- package/_types/utils/rpc/http.d.ts.map +1 -1
- package/_types/utils/rpc/socket.d.ts +2 -2
- package/_types/utils/rpc/socket.d.ts.map +1 -1
- package/_types/utils/signature/hashMessage.d.ts +1 -1
- package/_types/utils/signature/hashMessage.d.ts.map +1 -1
- package/_types/utils/transaction/assertRequest.d.ts +2 -1
- package/_types/utils/transaction/assertRequest.d.ts.map +1 -1
- package/_types/utils/transaction/getTransactionType.d.ts +4 -4
- package/_types/utils/transaction/getTransactionType.d.ts.map +1 -1
- package/_types/utils/transaction/serializeAccessList.d.ts +1 -1
- package/_types/utils/transaction/serializeAccessList.d.ts.map +1 -1
- package/_types/utils/transaction/serializeTransaction.d.ts +2 -2
- package/_types/utils/transaction/serializeTransaction.d.ts.map +1 -1
- package/_types/utils/typedData.d.ts +1 -1
- package/_types/utils/typedData.d.ts.map +1 -1
- package/accounts/generateMnemonic.ts +1 -1
- package/accounts/types.ts +12 -10
- package/accounts/utils/signTransaction.ts +1 -1
- package/actions/ens/getEnsAddress.ts +4 -4
- package/actions/ens/getEnsAvatar.ts +1 -1
- package/actions/ens/getEnsName.ts +3 -3
- package/actions/ens/getEnsResolver.ts +1 -1
- package/actions/ens/getEnsText.ts +3 -3
- package/actions/getContract.ts +3 -3
- package/actions/public/call.ts +16 -12
- package/actions/public/createContractEventFilter.ts +9 -6
- package/actions/public/createEventFilter.ts +21 -21
- package/actions/public/estimateFeesPerGas.ts +4 -4
- package/actions/public/estimateGas.ts +5 -5
- package/actions/public/estimateMaxPriorityFeePerGas.ts +11 -7
- package/actions/public/getBalance.ts +4 -4
- package/actions/public/getBlock.ts +10 -10
- package/actions/public/getBlockNumber.ts +1 -1
- package/actions/public/getBlockTransactionCount.ts +9 -9
- package/actions/public/getBytecode.ts +4 -4
- package/actions/public/getContractEvents.ts +4 -4
- package/actions/public/getFeeHistory.ts +4 -4
- package/actions/public/getLogs.ts +17 -17
- package/actions/public/getProof.ts +4 -4
- package/actions/public/getStorageAt.ts +4 -4
- package/actions/public/getTransaction.ts +13 -13
- package/actions/public/getTransactionConfirmations.ts +2 -2
- package/actions/public/getTransactionCount.ts +4 -4
- package/actions/public/simulateContract.ts +3 -3
- package/actions/public/waitForTransactionReceipt.ts +6 -6
- package/actions/public/watchBlockNumber.ts +2 -2
- package/actions/public/watchBlocks.ts +1 -1
- package/actions/public/watchContractEvent.ts +75 -59
- package/actions/public/watchEvent.ts +14 -14
- package/actions/public/watchPendingTransactions.ts +2 -2
- package/actions/test/mine.ts +1 -1
- package/actions/test/reset.ts +2 -2
- package/actions/wallet/prepareTransactionRequest.ts +5 -4
- package/actions/wallet/writeContract.ts +1 -1
- package/chains/celo/parsers.ts +3 -2
- package/chains/celo/serializers.ts +3 -3
- package/chains/celo/types.ts +37 -37
- package/chains/definitions/arbitrumSepolia.ts +1 -1
- package/chains/definitions/lukso.ts +6 -0
- package/chains/definitions/luksoTestnet.ts +31 -0
- package/chains/definitions/zkSyncInMemoryNode.ts +14 -0
- package/chains/definitions/zkSyncLocalNode.ts +14 -0
- package/chains/index.ts +8 -5
- package/chains/opStack/actions/buildDepositTransaction.ts +7 -7
- package/chains/opStack/actions/buildInitiateWithdrawal.ts +3 -3
- package/chains/opStack/actions/depositTransaction.ts +1 -1
- package/chains/opStack/actions/estimateDepositTransactionGas.ts +1 -1
- package/chains/opStack/actions/estimateFinalizeWithdrawalGas.ts +1 -1
- package/chains/opStack/actions/estimateInitiateWithdrawalGas.ts +1 -1
- package/chains/opStack/actions/estimateL1Fee.ts +1 -1
- package/chains/opStack/actions/estimateL1Gas.ts +1 -1
- package/chains/opStack/actions/estimateProveWithdrawalGas.ts +1 -1
- package/chains/opStack/actions/finalizeWithdrawal.ts +1 -1
- package/chains/opStack/actions/getL1BaseFee.ts +2 -2
- package/chains/opStack/actions/getTimeToNextL2Output.ts +2 -2
- package/chains/opStack/actions/getTimeToProve.ts +3 -1
- package/chains/opStack/actions/proveWithdrawal.ts +1 -1
- package/chains/opStack/actions/waitForNextL2Output.ts +4 -2
- package/chains/opStack/actions/waitToProve.ts +1 -1
- package/chains/opStack/decorators/publicL2.ts +3 -3
- package/chains/opStack/types/deposit.ts +6 -6
- package/chains/opStack/types/transaction.ts +4 -4
- package/chains/opStack/types/withdrawal.ts +2 -2
- package/chains/zksync/formatters.ts +1 -1
- package/chains/zksync/serializers.ts +1 -1
- package/chains/zksync/types/eip712.ts +4 -4
- package/chains/zksync/types/transaction.ts +21 -21
- package/chains/zksync/utils/assertEip712Request.ts +2 -1
- package/chains/zksync/utils/assertEip712Transaction.ts +2 -1
- package/chains/zksync/utils/isEip712Transaction.ts +2 -1
- package/clients/createClient.ts +3 -3
- package/clients/decorators/public.ts +23 -21
- package/clients/decorators/test.ts +1 -1
- package/clients/transports/createTransport.ts +9 -9
- package/clients/transports/custom.ts +4 -4
- package/clients/transports/fallback.ts +28 -26
- package/clients/transports/http.ts +13 -13
- package/clients/transports/ipc.ts +6 -6
- package/clients/transports/webSocket.ts +6 -6
- package/errors/abi.ts +12 -3
- package/errors/account.ts +1 -1
- package/errors/base.ts +13 -10
- package/errors/block.ts +2 -2
- package/errors/chain.ts +3 -3
- package/errors/contract.ts +26 -15
- package/errors/encoding.ts +3 -3
- package/errors/estimateGas.ts +3 -3
- package/errors/node.ts +35 -14
- package/errors/request.ts +7 -7
- package/errors/rpc.ts +5 -5
- package/errors/transaction.ts +7 -7
- package/errors/version.ts +1 -1
- package/index.ts +2 -0
- package/package.json +1 -1
- package/types/block.ts +3 -3
- package/types/chain.ts +1 -1
- package/types/contract.ts +7 -5
- package/types/eip1193.ts +42 -38
- package/types/ens.ts +1 -1
- package/types/fee.ts +6 -6
- package/types/filter.ts +9 -9
- package/types/kzg.ts +1 -1
- package/types/misc.ts +2 -2
- package/types/rpc.ts +16 -16
- package/types/stateOverride.ts +5 -5
- package/types/transaction.ts +63 -56
- package/types/typedData.ts +1 -1
- package/types/utils.ts +9 -3
- package/types/window.ts +1 -1
- package/utils/abi/decodeEventLog.ts +1 -1
- package/utils/abi/decodeFunctionResult.ts +2 -2
- package/utils/abi/encodeAbiParameters.ts +5 -0
- package/utils/abi/encodeErrorResult.ts +2 -2
- package/utils/abi/encodeEventTopics.ts +2 -2
- package/utils/abi/encodeFunctionData.ts +2 -2
- package/utils/abi/encodeFunctionResult.ts +2 -2
- package/utils/abi/formatAbiItem.ts +2 -2
- package/utils/abi/formatAbiItemWithArgs.ts +2 -2
- package/utils/address/getAddress.ts +4 -1
- package/utils/address/getContractAddress.ts +1 -1
- package/utils/address/isAddress.ts +1 -1
- package/utils/blob/commitmentToVersionedHash.ts +1 -1
- package/utils/blob/commitmentsToVersionedHashes.ts +1 -1
- package/utils/blob/sidecarsToVersionedHashes.ts +1 -1
- package/utils/chain/assertCurrentChain.ts +1 -1
- package/utils/chain/getChainContractAddress.ts +1 -1
- package/utils/cursor.ts +1 -1
- package/utils/data/isHex.ts +1 -1
- package/utils/data/pad.ts +2 -2
- package/utils/data/slice.ts +15 -11
- package/utils/data/trim.ts +1 -1
- package/utils/encoding/fromBytes.ts +5 -5
- package/utils/encoding/fromHex.ts +5 -5
- package/utils/encoding/toBytes.ts +8 -5
- package/utils/encoding/toHex.ts +7 -7
- package/utils/ens/avatar/parseAvatarRecord.ts +2 -2
- package/utils/errors/getCallError.ts +2 -2
- package/utils/errors/getContractError.ts +3 -3
- package/utils/errors/getEstimateGasError.ts +3 -3
- package/utils/errors/getNodeError.ts +4 -1
- package/utils/errors/getTransactionError.ts +2 -2
- package/utils/formatters/block.ts +2 -2
- package/utils/formatters/extract.ts +1 -1
- package/utils/formatters/formatter.ts +1 -1
- package/utils/formatters/log.ts +6 -2
- package/utils/formatters/proof.ts +2 -1
- package/utils/formatters/transaction.ts +2 -2
- package/utils/formatters/transactionReceipt.ts +2 -1
- package/utils/formatters/transactionRequest.ts +4 -1
- package/utils/hash/keccak256.ts +1 -1
- package/utils/hash/ripemd160.ts +1 -1
- package/utils/hash/sha256.ts +1 -1
- package/utils/poll.ts +2 -2
- package/utils/promise/createBatchScheduler.ts +6 -6
- package/utils/promise/withCache.ts +1 -1
- package/utils/promise/withRetry.ts +14 -9
- package/utils/promise/withTimeout.ts +6 -4
- package/utils/rpc/http.ts +7 -7
- package/utils/rpc/socket.ts +2 -2
- package/utils/signature/hashMessage.ts +1 -1
- package/utils/transaction/assertRequest.ts +4 -1
- package/utils/transaction/getTransactionType.ts +10 -4
- package/utils/transaction/parseTransaction.ts +1 -1
- package/utils/transaction/serializeAccessList.ts +1 -1
- package/utils/transaction/serializeTransaction.ts +6 -6
- package/utils/typedData.ts +1 -1
package/types/misc.ts
CHANGED
@@ -22,13 +22,13 @@ export type Signature = OneOf<
|
|
22
22
|
s: Hex
|
23
23
|
/** @deprecated use `yParity`. */
|
24
24
|
v: bigint
|
25
|
-
yParity?: number
|
25
|
+
yParity?: number | undefined
|
26
26
|
}
|
27
27
|
| {
|
28
28
|
r: Hex
|
29
29
|
s: Hex
|
30
30
|
/** @deprecated use `yParity`. */
|
31
|
-
v?: bigint
|
31
|
+
v?: bigint | undefined
|
32
32
|
yParity: number
|
33
33
|
}
|
34
34
|
>
|
package/types/rpc.ts
CHANGED
@@ -68,38 +68,38 @@ export type RpcTransaction<TPending extends boolean = boolean> = UnionOmit<
|
|
68
68
|
>
|
69
69
|
|
70
70
|
type SuccessResult<T> = {
|
71
|
-
method?: never
|
71
|
+
method?: never | undefined
|
72
72
|
result: T
|
73
|
-
error?: never
|
73
|
+
error?: never | undefined
|
74
74
|
}
|
75
75
|
type ErrorResult<T> = {
|
76
|
-
method?: never
|
77
|
-
result?: never
|
76
|
+
method?: never | undefined
|
77
|
+
result?: never | undefined
|
78
78
|
error: T
|
79
79
|
}
|
80
80
|
type Subscription<TResult, TError> = {
|
81
81
|
method: 'eth_subscription'
|
82
|
-
error?: never
|
83
|
-
result?: never
|
82
|
+
error?: never | undefined
|
83
|
+
result?: never | undefined
|
84
84
|
params: {
|
85
85
|
subscription: string
|
86
86
|
} & (
|
87
87
|
| {
|
88
88
|
result: TResult
|
89
|
-
error?: never
|
89
|
+
error?: never | undefined
|
90
90
|
}
|
91
91
|
| {
|
92
|
-
result?: never
|
92
|
+
result?: never | undefined
|
93
93
|
error: TError
|
94
94
|
}
|
95
95
|
)
|
96
96
|
}
|
97
97
|
|
98
98
|
export type RpcRequest = {
|
99
|
-
jsonrpc?: '2.0'
|
99
|
+
jsonrpc?: '2.0' | undefined
|
100
100
|
method: string
|
101
|
-
params?: any
|
102
|
-
id?: number
|
101
|
+
params?: any | undefined
|
102
|
+
id?: number | undefined
|
103
103
|
}
|
104
104
|
|
105
105
|
export type RpcResponse<TResult = any, TError = any> = {
|
@@ -118,15 +118,15 @@ export type RpcStateMapping = {
|
|
118
118
|
|
119
119
|
export type RpcAccountStateOverride = {
|
120
120
|
/** Fake balance to set for the account before executing the call. <32 bytes */
|
121
|
-
balance?: Hex
|
121
|
+
balance?: Hex | undefined
|
122
122
|
/** Fake nonce to set for the account before executing the call. <8 bytes */
|
123
|
-
nonce?: Hex
|
123
|
+
nonce?: Hex | undefined
|
124
124
|
/** Fake EVM bytecode to inject into the account before executing the call. */
|
125
|
-
code?: Hex
|
125
|
+
code?: Hex | undefined
|
126
126
|
/** Fake key-value mapping to override all slots in the account storage before executing the call. */
|
127
|
-
state?: RpcStateMapping
|
127
|
+
state?: RpcStateMapping | undefined
|
128
128
|
/** Fake key-value mapping to override individual slots in the account storage before executing the call. */
|
129
|
-
stateDiff?: RpcStateMapping
|
129
|
+
stateDiff?: RpcStateMapping | undefined
|
130
130
|
}
|
131
131
|
|
132
132
|
export type RpcStateOverride = {
|
package/types/stateOverride.ts
CHANGED
@@ -10,17 +10,17 @@ export type StateMapping = Array<{
|
|
10
10
|
export type StateOverride = Array<
|
11
11
|
{
|
12
12
|
address: Address
|
13
|
-
balance?: bigint
|
14
|
-
nonce?: number
|
15
|
-
code?: Hex
|
13
|
+
balance?: bigint | undefined
|
14
|
+
nonce?: number | undefined
|
15
|
+
code?: Hex | undefined
|
16
16
|
} & OneOf<
|
17
17
|
| {
|
18
18
|
/** Fake key-value mapping to override all slots in the account storage before executing the call. */
|
19
|
-
state?: StateMapping
|
19
|
+
state?: StateMapping | undefined
|
20
20
|
}
|
21
21
|
| {
|
22
22
|
/** Fake key-value mapping to override individual slots in the account storage before executing the call. */
|
23
|
-
stateDiff?: StateMapping
|
23
|
+
stateDiff?: StateMapping | undefined
|
24
24
|
}
|
25
25
|
>
|
26
26
|
>
|
package/types/transaction.ts
CHANGED
@@ -9,7 +9,13 @@ import type {
|
|
9
9
|
import type { Kzg } from './kzg.js'
|
10
10
|
import type { Log } from './log.js'
|
11
11
|
import type { ByteArray, Hash, Hex, Signature } from './misc.js'
|
12
|
-
import type {
|
12
|
+
import type {
|
13
|
+
Branded,
|
14
|
+
ExactPartial,
|
15
|
+
IsNever,
|
16
|
+
OneOf,
|
17
|
+
RequiredBy,
|
18
|
+
} from './utils.js'
|
13
19
|
|
14
20
|
export type AccessList = { address: Address; storageKeys: Hex[] }[]
|
15
21
|
|
@@ -27,15 +33,15 @@ export type TransactionReceipt<
|
|
27
33
|
TType = TransactionType,
|
28
34
|
> = {
|
29
35
|
/** The actual value per gas deducted from the sender's account for blob gas. Only specified for blob transactions as defined by EIP-4844. */
|
30
|
-
blobGasPrice?: TQuantity
|
36
|
+
blobGasPrice?: TQuantity | undefined
|
31
37
|
/** The amount of blob gas used. Only specified for blob transactions as defined by EIP-4844. */
|
32
|
-
blobGasUsed?: TQuantity
|
38
|
+
blobGasUsed?: TQuantity | undefined
|
33
39
|
/** Hash of block containing this transaction */
|
34
40
|
blockHash: Hash
|
35
41
|
/** Number of block containing this transaction */
|
36
42
|
blockNumber: TQuantity
|
37
43
|
/** Address of new contract or `null` if no contract was created */
|
38
|
-
contractAddress: Address | null
|
44
|
+
contractAddress: Address | null | undefined
|
39
45
|
/** Gas used by this and all preceding transactions in this block */
|
40
46
|
cumulativeGasUsed: TQuantity
|
41
47
|
/** Pre-London, it is equal to the transaction's gasPrice. Post-London, it is equal to the actual gas price paid for inclusion. */
|
@@ -49,7 +55,7 @@ export type TransactionReceipt<
|
|
49
55
|
/** Logs bloom filter */
|
50
56
|
logsBloom: Hex
|
51
57
|
/** The post-transaction state root. Only specified for transactions included before the Byzantium upgrade. */
|
52
|
-
root?: Hash
|
58
|
+
root?: Hash | undefined
|
53
59
|
/** `success` if this transaction was successful or `reverted` if it failed */
|
54
60
|
status: TStatus
|
55
61
|
/** Transaction recipient or `null` if deploying a contract */
|
@@ -106,11 +112,11 @@ export type TransactionLegacy<
|
|
106
112
|
> = Omit<TransactionBase<TQuantity, TIndex, TPending>, 'yParity'> &
|
107
113
|
FeeValuesLegacy<TQuantity> & {
|
108
114
|
/** EIP-2930 Access List. */
|
109
|
-
accessList?: never
|
110
|
-
blobVersionedHashes?: never
|
115
|
+
accessList?: never | undefined
|
116
|
+
blobVersionedHashes?: never | undefined
|
111
117
|
/** Chain ID that this transaction is valid on. */
|
112
|
-
chainId?: TIndex
|
113
|
-
yParity?: never
|
118
|
+
chainId?: TIndex | undefined
|
119
|
+
yParity?: never | undefined
|
114
120
|
type: TType
|
115
121
|
}
|
116
122
|
export type TransactionEIP2930<
|
@@ -122,7 +128,7 @@ export type TransactionEIP2930<
|
|
122
128
|
FeeValuesLegacy<TQuantity> & {
|
123
129
|
/** EIP-2930 Access List. */
|
124
130
|
accessList: AccessList
|
125
|
-
blobVersionedHashes?: never
|
131
|
+
blobVersionedHashes?: never | undefined
|
126
132
|
/** Chain ID that this transaction is valid on. */
|
127
133
|
chainId: TIndex
|
128
134
|
type: TType
|
@@ -136,7 +142,7 @@ export type TransactionEIP1559<
|
|
136
142
|
FeeValuesEIP1559<TQuantity> & {
|
137
143
|
/** EIP-2930 Access List. */
|
138
144
|
accessList: AccessList
|
139
|
-
blobVersionedHashes?: never
|
145
|
+
blobVersionedHashes?: never | undefined
|
140
146
|
/** Chain ID that this transaction is valid on. */
|
141
147
|
chainId: TIndex
|
142
148
|
type: TType
|
@@ -169,58 +175,58 @@ export type Transaction<
|
|
169
175
|
|
170
176
|
export type TransactionRequestBase<TQuantity = bigint, TIndex = number> = {
|
171
177
|
/** Contract code or a hashed method call with encoded args */
|
172
|
-
data?: Hex
|
178
|
+
data?: Hex | undefined
|
173
179
|
/** Transaction sender */
|
174
180
|
from: Address
|
175
181
|
/** Gas provided for transaction execution */
|
176
|
-
gas?: TQuantity
|
182
|
+
gas?: TQuantity | undefined
|
177
183
|
/** Unique number identifying this transaction */
|
178
|
-
nonce?: TIndex
|
184
|
+
nonce?: TIndex | undefined
|
179
185
|
/** Transaction recipient */
|
180
|
-
to?: Address | null
|
186
|
+
to?: Address | null | undefined
|
181
187
|
/** Value in wei sent with this transaction */
|
182
|
-
value?: TQuantity
|
188
|
+
value?: TQuantity | undefined
|
183
189
|
}
|
184
190
|
export type TransactionRequestLegacy<
|
185
191
|
TQuantity = bigint,
|
186
192
|
TIndex = number,
|
187
193
|
TTransactionType = 'legacy',
|
188
194
|
> = TransactionRequestBase<TQuantity, TIndex> &
|
189
|
-
|
190
|
-
accessList?: never
|
195
|
+
ExactPartial<FeeValuesLegacy<TQuantity>> & {
|
196
|
+
accessList?: never | undefined
|
191
197
|
blobs?: undefined
|
192
|
-
type?: TTransactionType
|
198
|
+
type?: TTransactionType | undefined
|
193
199
|
}
|
194
200
|
export type TransactionRequestEIP2930<
|
195
201
|
TQuantity = bigint,
|
196
202
|
TIndex = number,
|
197
203
|
TTransactionType = 'eip2930',
|
198
204
|
> = TransactionRequestBase<TQuantity, TIndex> &
|
199
|
-
|
200
|
-
accessList?: AccessList
|
205
|
+
ExactPartial<FeeValuesLegacy<TQuantity>> & {
|
206
|
+
accessList?: AccessList | undefined
|
201
207
|
blobs?: undefined
|
202
|
-
type?: TTransactionType
|
208
|
+
type?: TTransactionType | undefined
|
203
209
|
}
|
204
210
|
export type TransactionRequestEIP1559<
|
205
211
|
TQuantity = bigint,
|
206
212
|
TIndex = number,
|
207
213
|
TTransactionType = 'eip1559',
|
208
214
|
> = TransactionRequestBase<TQuantity, TIndex> &
|
209
|
-
|
210
|
-
accessList?: AccessList
|
215
|
+
ExactPartial<FeeValuesEIP1559<TQuantity>> & {
|
216
|
+
accessList?: AccessList | undefined
|
211
217
|
blobs?: undefined
|
212
|
-
type?: TTransactionType
|
218
|
+
type?: TTransactionType | undefined
|
213
219
|
}
|
214
220
|
export type TransactionRequestEIP4844<
|
215
221
|
TQuantity = bigint,
|
216
222
|
TIndex = number,
|
217
223
|
TTransactionType = 'eip4844',
|
218
224
|
> = RequiredBy<TransactionRequestBase<TQuantity, TIndex>, 'to'> &
|
219
|
-
RequiredBy<
|
220
|
-
accessList?: AccessList
|
225
|
+
RequiredBy<ExactPartial<FeeValuesEIP4844<TQuantity>>, 'maxFeePerBlobGas'> & {
|
226
|
+
accessList?: AccessList | undefined
|
221
227
|
/** The blobs associated with this transaction. */
|
222
228
|
blobs: readonly Hex[] | readonly ByteArray[]
|
223
|
-
type?: TTransactionType
|
229
|
+
type?: TTransactionType | undefined
|
224
230
|
}
|
225
231
|
export type TransactionRequest<TQuantity = bigint, TIndex = number> = OneOf<
|
226
232
|
| TransactionRequestLegacy<TQuantity, TIndex>
|
@@ -246,64 +252,65 @@ export type TransactionSerialized<
|
|
246
252
|
export type TransactionSerializableBase<
|
247
253
|
TQuantity = bigint,
|
248
254
|
TIndex = number,
|
249
|
-
> = Omit<TransactionRequestBase<TQuantity, TIndex>, 'from'> &
|
255
|
+
> = Omit<TransactionRequestBase<TQuantity, TIndex>, 'from'> &
|
256
|
+
ExactPartial<Signature>
|
250
257
|
|
251
258
|
export type TransactionSerializableLegacy<
|
252
259
|
TQuantity = bigint,
|
253
260
|
TIndex = number,
|
254
261
|
> = TransactionSerializableBase<TQuantity, TIndex> &
|
255
|
-
|
262
|
+
ExactPartial<FeeValuesLegacy<TQuantity>> & {
|
256
263
|
accessList?: undefined
|
257
264
|
blobs?: undefined
|
258
265
|
blobVersionedHashes?: undefined
|
259
|
-
chainId?: number
|
260
|
-
type?: 'legacy'
|
266
|
+
chainId?: number | undefined
|
267
|
+
type?: 'legacy' | undefined
|
261
268
|
}
|
262
269
|
|
263
270
|
export type TransactionSerializableEIP2930<
|
264
271
|
TQuantity = bigint,
|
265
272
|
TIndex = number,
|
266
273
|
> = TransactionSerializableBase<TQuantity, TIndex> &
|
267
|
-
|
268
|
-
accessList?: AccessList
|
274
|
+
ExactPartial<FeeValuesLegacy<TQuantity>> & {
|
275
|
+
accessList?: AccessList | undefined
|
269
276
|
blobs?: undefined
|
270
277
|
blobVersionedHashes?: undefined
|
271
278
|
chainId: number
|
272
|
-
type?: 'eip2930'
|
273
|
-
yParity?: number
|
279
|
+
type?: 'eip2930' | undefined
|
280
|
+
yParity?: number | undefined
|
274
281
|
}
|
275
282
|
|
276
283
|
export type TransactionSerializableEIP1559<
|
277
284
|
TQuantity = bigint,
|
278
285
|
TIndex = number,
|
279
286
|
> = TransactionSerializableBase<TQuantity, TIndex> &
|
280
|
-
|
281
|
-
accessList?: AccessList
|
287
|
+
ExactPartial<FeeValuesEIP1559<TQuantity>> & {
|
288
|
+
accessList?: AccessList | undefined
|
282
289
|
blobs?: undefined
|
283
290
|
blobVersionedHashes?: undefined
|
284
291
|
chainId: number
|
285
|
-
type?: 'eip1559'
|
286
|
-
yParity?: number
|
292
|
+
type?: 'eip1559' | undefined
|
293
|
+
yParity?: number | undefined
|
287
294
|
}
|
288
295
|
|
289
296
|
export type TransactionSerializableEIP4844<
|
290
297
|
TQuantity = bigint,
|
291
298
|
TIndex = number,
|
292
299
|
> = TransactionSerializableBase<TQuantity, TIndex> &
|
293
|
-
|
294
|
-
accessList?: AccessList
|
300
|
+
ExactPartial<FeeValuesEIP4844<TQuantity>> & {
|
301
|
+
accessList?: AccessList | undefined
|
295
302
|
chainId: number
|
296
|
-
type?: 'eip4844'
|
297
|
-
yParity?: number
|
303
|
+
type?: 'eip4844' | undefined
|
304
|
+
yParity?: number | undefined
|
298
305
|
} & OneOf<
|
299
306
|
| {
|
300
307
|
blobVersionedHashes: readonly Hex[]
|
301
|
-
sidecars?: readonly BlobSidecar<Hex>[] | false
|
308
|
+
sidecars?: readonly BlobSidecar<Hex>[] | false | undefined
|
302
309
|
}
|
303
310
|
| {
|
304
311
|
blobs: readonly Hex[] | readonly ByteArray[]
|
305
312
|
kzg: Kzg
|
306
|
-
sidecars?: false
|
313
|
+
sidecars?: false | undefined
|
307
314
|
}
|
308
315
|
>
|
309
316
|
|
@@ -311,16 +318,16 @@ export type TransactionSerializableGeneric<
|
|
311
318
|
TQuantity = bigint,
|
312
319
|
TIndex = number,
|
313
320
|
> = TransactionSerializableBase<TQuantity, TIndex> & {
|
314
|
-
accessList?: AccessList
|
315
|
-
blobs?: readonly Hex[] | readonly ByteArray[]
|
316
|
-
blobVersionedHashes?: readonly Hex[]
|
317
|
-
chainId?: number
|
318
|
-
gasPrice?: TQuantity
|
319
|
-
maxFeePerBlobGas?: TQuantity
|
320
|
-
maxFeePerGas?: TQuantity
|
321
|
-
maxPriorityFeePerGas?: TQuantity
|
322
|
-
sidecars?: readonly BlobSidecar<Hex>[] | false
|
323
|
-
type?: string
|
321
|
+
accessList?: AccessList | undefined
|
322
|
+
blobs?: readonly Hex[] | readonly ByteArray[] | undefined
|
323
|
+
blobVersionedHashes?: readonly Hex[] | undefined
|
324
|
+
chainId?: number | undefined
|
325
|
+
gasPrice?: TQuantity | undefined
|
326
|
+
maxFeePerBlobGas?: TQuantity | undefined
|
327
|
+
maxFeePerGas?: TQuantity | undefined
|
328
|
+
maxPriorityFeePerGas?: TQuantity | undefined
|
329
|
+
sidecars?: readonly BlobSidecar<Hex>[] | false | undefined
|
330
|
+
type?: string | undefined
|
324
331
|
}
|
325
332
|
|
326
333
|
export type TransactionSerializable<
|
package/types/typedData.ts
CHANGED
package/types/utils.ts
CHANGED
@@ -115,7 +115,7 @@ export type MaybePromise<T> = T | Promise<T>
|
|
115
115
|
* => { a: string, b?: number }
|
116
116
|
*/
|
117
117
|
export type MaybeRequired<T, TRequired extends boolean> = TRequired extends true
|
118
|
-
?
|
118
|
+
? ExactRequired<T>
|
119
119
|
: T
|
120
120
|
|
121
121
|
/**
|
@@ -166,7 +166,8 @@ export type Omit<type, keys extends keyof type> = Pick<
|
|
166
166
|
* PartialBy<{ a: string, b: number }, 'a'>
|
167
167
|
* => { a?: string, b: number }
|
168
168
|
*/
|
169
|
-
export type PartialBy<T, K extends keyof T> = Omit<T, K> &
|
169
|
+
export type PartialBy<T, K extends keyof T> = Omit<T, K> &
|
170
|
+
ExactPartial<Pick<T, K>>
|
170
171
|
|
171
172
|
/**
|
172
173
|
* @description Combines members of an intersection into a readable type.
|
@@ -187,7 +188,8 @@ export type Prettify<T> = {
|
|
187
188
|
* RequiredBy<{ a?: string, b: number }, 'a'>
|
188
189
|
* => { a: string, b: number }
|
189
190
|
*/
|
190
|
-
export type RequiredBy<T, K extends keyof T> = Omit<T, K> &
|
191
|
+
export type RequiredBy<T, K extends keyof T> = Omit<T, K> &
|
192
|
+
ExactRequired<Pick<T, K>>
|
191
193
|
|
192
194
|
/**
|
193
195
|
* @description Creates a type that extracts the values of T.
|
@@ -231,6 +233,10 @@ export type ExactPartial<type> = {
|
|
231
233
|
[key in keyof type]?: type[key] | undefined
|
232
234
|
}
|
233
235
|
|
236
|
+
export type ExactRequired<type> = {
|
237
|
+
[P in keyof type]-?: Exclude<type[P], undefined>
|
238
|
+
}
|
239
|
+
|
234
240
|
export type OneOf<
|
235
241
|
union extends object,
|
236
242
|
fallback extends object | undefined = undefined,
|
package/types/window.ts
CHANGED
@@ -46,7 +46,7 @@ export type DecodeEventLogParameters<
|
|
46
46
|
> = {
|
47
47
|
abi: abi
|
48
48
|
data?: data | undefined
|
49
|
-
eventName?: eventName | ContractEventName<abi>
|
49
|
+
eventName?: eventName | ContractEventName<abi> | undefined
|
50
50
|
strict?: strict | boolean | undefined
|
51
51
|
topics: [signature: Hex, ...args: topics] | []
|
52
52
|
}
|
@@ -64,9 +64,9 @@ export type DecodeFunctionResultParameters<
|
|
64
64
|
} & UnionEvaluate<
|
65
65
|
IsNarrowable<abi, Abi> extends true
|
66
66
|
? abi['length'] extends 1
|
67
|
-
? { functionName?: functionName | allFunctionNames }
|
67
|
+
? { functionName?: functionName | allFunctionNames | undefined }
|
68
68
|
: { functionName: functionName | allFunctionNames }
|
69
|
-
: { functionName?: functionName | allFunctionNames }
|
69
|
+
: { functionName?: functionName | allFunctionNames | undefined }
|
70
70
|
> &
|
71
71
|
UnionEvaluate<
|
72
72
|
readonly [] extends allArgs
|
@@ -20,6 +20,7 @@ import {
|
|
20
20
|
InvalidAddressError,
|
21
21
|
type InvalidAddressErrorType,
|
22
22
|
} from '../../errors/address.js'
|
23
|
+
import { BaseError } from '../../errors/base.js'
|
23
24
|
import type { ErrorType } from '../../errors/utils.js'
|
24
25
|
import type { Hex } from '../../types/misc.js'
|
25
26
|
import { type IsAddressErrorType, isAddress } from '../address/isAddress.js'
|
@@ -311,6 +312,10 @@ export type EncodeBoolErrorType =
|
|
311
312
|
| ErrorType
|
312
313
|
|
313
314
|
function encodeBool(value: boolean): PreparedParam {
|
315
|
+
if (typeof value !== 'boolean')
|
316
|
+
throw new BaseError(
|
317
|
+
`Invalid boolean value: "${value}" (type: ${typeof value}). Expected: \`true\` or \`false\`.`,
|
318
|
+
)
|
314
319
|
return { dynamic: false, encoded: padHex(boolToHex(value)) }
|
315
320
|
}
|
316
321
|
|
@@ -50,9 +50,9 @@ export type EncodeErrorResultParameters<
|
|
50
50
|
} & UnionEvaluate<
|
51
51
|
IsNarrowable<abi, Abi> extends true
|
52
52
|
? abi['length'] extends 1
|
53
|
-
? { errorName?: errorName | allErrorNames }
|
53
|
+
? { errorName?: errorName | allErrorNames | undefined }
|
54
54
|
: { errorName: errorName | allErrorNames }
|
55
|
-
: { errorName?: errorName | allErrorNames }
|
55
|
+
: { errorName?: errorName | allErrorNames | undefined }
|
56
56
|
> &
|
57
57
|
(hasErrors extends true ? unknown : never)
|
58
58
|
|
@@ -60,9 +60,9 @@ export type EncodeEventTopicsParameters<
|
|
60
60
|
} & UnionEvaluate<
|
61
61
|
IsNarrowable<abi, Abi> extends true
|
62
62
|
? abi['length'] extends 1
|
63
|
-
? { eventName?: eventName | allErrorNames }
|
63
|
+
? { eventName?: eventName | allErrorNames | undefined }
|
64
64
|
: { eventName: eventName | allErrorNames }
|
65
|
-
: { eventName?: eventName | allErrorNames }
|
65
|
+
: { eventName?: eventName | allErrorNames | undefined }
|
66
66
|
> &
|
67
67
|
(hasEvents extends true ? unknown : never)
|
68
68
|
|
@@ -52,9 +52,9 @@ export type EncodeFunctionDataParameters<
|
|
52
52
|
} & UnionEvaluate<
|
53
53
|
IsNarrowable<abi, Abi> extends true
|
54
54
|
? abi['length'] extends 1
|
55
|
-
? { functionName?: functionName | allFunctionNames }
|
55
|
+
? { functionName?: functionName | allFunctionNames | undefined }
|
56
56
|
: { functionName: functionName | allFunctionNames }
|
57
|
-
: { functionName?: functionName | allFunctionNames }
|
57
|
+
: { functionName?: functionName | allFunctionNames | undefined }
|
58
58
|
> &
|
59
59
|
UnionEvaluate<
|
60
60
|
readonly [] extends allArgs
|
@@ -49,9 +49,9 @@ export type EncodeFunctionResultParameters<
|
|
49
49
|
} & UnionEvaluate<
|
50
50
|
IsNarrowable<abi, Abi> extends true
|
51
51
|
? abi['length'] extends 1
|
52
|
-
? { functionName?: functionName | allFunctionNames }
|
52
|
+
? { functionName?: functionName | allFunctionNames | undefined }
|
53
53
|
: { functionName: functionName | allFunctionNames }
|
54
|
-
: { functionName?: functionName | allFunctionNames }
|
54
|
+
: { functionName?: functionName | allFunctionNames | undefined }
|
55
55
|
> &
|
56
56
|
(hasFunctions extends true ? unknown : never)
|
57
57
|
|
@@ -14,7 +14,7 @@ export type FormatAbiItemErrorType =
|
|
14
14
|
|
15
15
|
export function formatAbiItem(
|
16
16
|
abiItem: AbiItem,
|
17
|
-
{ includeName = false }: { includeName?: boolean } = {},
|
17
|
+
{ includeName = false }: { includeName?: boolean | undefined } = {},
|
18
18
|
) {
|
19
19
|
if (
|
20
20
|
abiItem.type !== 'function' &&
|
@@ -30,7 +30,7 @@ export type FormatAbiParamsErrorType = ErrorType
|
|
30
30
|
|
31
31
|
export function formatAbiParams(
|
32
32
|
params: readonly AbiParameter[] | undefined,
|
33
|
-
{ includeName = false }: { includeName?: boolean } = {},
|
33
|
+
{ includeName = false }: { includeName?: boolean | undefined } = {},
|
34
34
|
): string {
|
35
35
|
if (!params) return ''
|
36
36
|
return params
|
@@ -14,8 +14,8 @@ export function formatAbiItemWithArgs({
|
|
14
14
|
}: {
|
15
15
|
abiItem: AbiItem
|
16
16
|
args: readonly unknown[]
|
17
|
-
includeFunctionName?: boolean
|
18
|
-
includeName?: boolean
|
17
|
+
includeFunctionName?: boolean | undefined
|
18
|
+
includeName?: boolean | undefined
|
19
19
|
}) {
|
20
20
|
if (!('name' in abiItem)) return
|
21
21
|
if (!('inputs' in abiItem)) return
|
@@ -14,7 +14,10 @@ export type ChecksumAddressErrorType =
|
|
14
14
|
| StringToBytesErrorType
|
15
15
|
| ErrorType
|
16
16
|
|
17
|
-
export function checksumAddress(
|
17
|
+
export function checksumAddress(
|
18
|
+
address_: Address,
|
19
|
+
chainId?: number | undefined,
|
20
|
+
): Address {
|
18
21
|
const hexAddress = chainId
|
19
22
|
? `${chainId}${address_.toLowerCase()}`
|
20
23
|
: address_.substring(2).toLowerCase()
|
@@ -14,7 +14,7 @@ export type CommitmentToVersionedHashParameters<
|
|
14
14
|
/** Return type. */
|
15
15
|
to?: to | To | undefined
|
16
16
|
/** Version to tag onto the hash. */
|
17
|
-
version?: number
|
17
|
+
version?: number | undefined
|
18
18
|
}
|
19
19
|
|
20
20
|
export type CommitmentToVersionedHashReturnType<to extends To> =
|
@@ -16,7 +16,7 @@ export type CommitmentsToVersionedHashesParameters<
|
|
16
16
|
/** Return type. */
|
17
17
|
to?: to | To | undefined
|
18
18
|
/** Version to tag onto the hashes. */
|
19
|
-
version?: number
|
19
|
+
version?: number | undefined
|
20
20
|
}
|
21
21
|
|
22
22
|
export type CommitmentsToVersionedHashesReturnType<to extends To> =
|
@@ -17,7 +17,7 @@ export type SidecarsToVersionedHashesParameters<
|
|
17
17
|
/** Return type. */
|
18
18
|
to?: to | To | undefined
|
19
19
|
/** Version to tag onto the hashes. */
|
20
|
-
version?: number
|
20
|
+
version?: number | undefined
|
21
21
|
}
|
22
22
|
|
23
23
|
export type SidecarsToVersionedHashesReturnType<to extends To> =
|
package/utils/cursor.ts
CHANGED
package/utils/data/isHex.ts
CHANGED
@@ -5,7 +5,7 @@ export type IsHexErrorType = ErrorType
|
|
5
5
|
|
6
6
|
export function isHex(
|
7
7
|
value: unknown,
|
8
|
-
{ strict = true }: { strict?: boolean } = {},
|
8
|
+
{ strict = true }: { strict?: boolean | undefined } = {},
|
9
9
|
): value is Hex {
|
10
10
|
if (!value) return false
|
11
11
|
if (typeof value !== 'string') return false
|