viem 0.0.0-main.20240110T155739 → 0.0.0-main.20240110T220130
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 +7 -7
- package/README.md +1 -1
- package/_cjs/errors/base.js +1 -1
- package/_cjs/errors/base.js.map +1 -1
- package/_cjs/errors/version.js +1 -1
- package/_esm/actions/ens/getEnsAddress.js +2 -2
- package/_esm/actions/ens/getEnsAvatar.js +3 -3
- package/_esm/actions/ens/getEnsName.js +1 -1
- package/_esm/actions/ens/getEnsResolver.js +2 -2
- package/_esm/actions/ens/getEnsText.js +2 -2
- package/_esm/actions/getContract.js +2 -2
- package/_esm/actions/public/call.js +1 -1
- package/_esm/actions/public/createBlockFilter.js +3 -3
- package/_esm/actions/public/createContractEventFilter.js +3 -3
- package/_esm/actions/public/createEventFilter.js +3 -3
- package/_esm/actions/public/createPendingTransactionFilter.js +3 -3
- package/_esm/actions/public/estimateContractGas.js +2 -2
- package/_esm/actions/public/estimateFeesPerGas.js +2 -2
- package/_esm/actions/public/estimateGas.js +1 -1
- package/_esm/actions/public/estimateMaxPriorityFeePerGas.js +2 -2
- package/_esm/actions/public/getBalance.js +2 -2
- package/_esm/actions/public/getBlock.js +1 -1
- package/_esm/actions/public/getBlockNumber.js +1 -1
- package/_esm/actions/public/getBlockTransactionCount.js +1 -1
- package/_esm/actions/public/getBytecode.js +1 -1
- package/_esm/actions/public/getChainId.js +1 -1
- package/_esm/actions/public/getContractEvents.js +1 -1
- package/_esm/actions/public/getFeeHistory.js +1 -1
- package/_esm/actions/public/getFilterChanges.js +5 -5
- package/_esm/actions/public/getFilterLogs.js +1 -1
- package/_esm/actions/public/getGasPrice.js +1 -1
- package/_esm/actions/public/getLogs.js +1 -1
- package/_esm/actions/public/getProof.js +1 -1
- package/_esm/actions/public/getStorageAt.js +1 -1
- package/_esm/actions/public/getTransaction.js +2 -2
- package/_esm/actions/public/getTransactionConfirmations.js +1 -1
- package/_esm/actions/public/getTransactionCount.js +2 -2
- package/_esm/actions/public/getTransactionReceipt.js +2 -2
- package/_esm/actions/public/multicall.js +2 -2
- package/_esm/actions/public/readContract.js +2 -2
- package/_esm/actions/public/simulateContract.js +3 -3
- package/_esm/actions/public/uninstallFilter.js +5 -5
- package/_esm/actions/public/verifyMessage.js +1 -1
- package/_esm/actions/public/verifyTypedData.js +1 -1
- package/_esm/actions/public/waitForTransactionReceipt.js +2 -2
- package/_esm/actions/public/watchBlockNumber.js +1 -1
- package/_esm/actions/public/watchBlocks.js +1 -1
- package/_esm/actions/public/watchContractEvent.js +3 -3
- package/_esm/actions/public/watchEvent.js +4 -4
- package/_esm/actions/public/watchPendingTransactions.js +2 -2
- package/_esm/actions/test/dropTransaction.js +1 -1
- package/_esm/actions/test/dumpState.js +1 -1
- package/_esm/actions/test/getAutomine.js +1 -1
- package/_esm/actions/test/getTxpoolContent.js +1 -1
- package/_esm/actions/test/getTxpoolStatus.js +1 -1
- package/_esm/actions/test/impersonateAccount.js +1 -1
- package/_esm/actions/test/increaseTime.js +1 -1
- package/_esm/actions/test/inspectTxpool.js +1 -1
- package/_esm/actions/test/loadState.js +1 -1
- package/_esm/actions/test/mine.js +1 -1
- package/_esm/actions/test/removeBlockTimestampInterval.js +2 -2
- package/_esm/actions/test/reset.js +1 -1
- package/_esm/actions/test/revert.js +1 -1
- package/_esm/actions/test/sendUnsignedTransaction.js +1 -1
- package/_esm/actions/test/setAutomine.js +1 -1
- package/_esm/actions/test/setBalance.js +1 -1
- package/_esm/actions/test/setBlockGasLimit.js +1 -1
- package/_esm/actions/test/setBlockTimestampInterval.js +2 -2
- package/_esm/actions/test/setCode.js +1 -1
- package/_esm/actions/test/setCoinbase.js +1 -1
- package/_esm/actions/test/setIntervalMining.js +1 -1
- package/_esm/actions/test/setLoggingEnabled.js +1 -1
- package/_esm/actions/test/setMinGasPrice.js +1 -1
- package/_esm/actions/test/setNextBlockBaseFeePerGas.js +1 -1
- package/_esm/actions/test/setNextBlockTimestamp.js +1 -1
- package/_esm/actions/test/setNonce.js +1 -1
- package/_esm/actions/test/setRpcUrl.js +1 -1
- package/_esm/actions/test/setStorageAt.js +1 -1
- package/_esm/actions/test/snapshot.js +1 -1
- package/_esm/actions/test/stopImpersonatingAccount.js +2 -2
- package/_esm/actions/wallet/addChain.js +1 -1
- package/_esm/actions/wallet/deployContract.js +2 -2
- package/_esm/actions/wallet/getAddresses.js +1 -1
- package/_esm/actions/wallet/getPermissions.js +1 -1
- package/_esm/actions/wallet/prepareTransactionRequest.js +1 -1
- package/_esm/actions/wallet/requestAddresses.js +1 -1
- package/_esm/actions/wallet/requestPermissions.js +1 -1
- package/_esm/actions/wallet/sendRawTransaction.js +1 -1
- package/_esm/actions/wallet/sendTransaction.js +2 -2
- package/_esm/actions/wallet/signMessage.js +4 -4
- package/_esm/actions/wallet/signTransaction.js +1 -1
- package/_esm/actions/wallet/signTypedData.js +2 -2
- package/_esm/actions/wallet/switchChain.js +1 -1
- package/_esm/actions/wallet/watchAsset.js +1 -1
- package/_esm/actions/wallet/writeContract.js +5 -5
- package/_esm/chains/opStack/actions/buildDepositTransaction.js +1 -1
- package/_esm/chains/opStack/actions/buildInitiateWithdrawal.js +1 -1
- package/_esm/chains/opStack/actions/buildProveWithdrawal.js +1 -1
- package/_esm/chains/opStack/actions/depositTransaction.js +1 -1
- package/_esm/chains/opStack/actions/estimateDepositTransactionGas.js +1 -1
- package/_esm/chains/opStack/actions/estimateFinalizeWithdrawalGas.js +1 -1
- package/_esm/chains/opStack/actions/estimateInitiateWithdrawalGas.js +1 -1
- package/_esm/chains/opStack/actions/estimateProveWithdrawalGas.js +1 -1
- package/_esm/chains/opStack/actions/finalizeWithdrawal.js +1 -1
- package/_esm/chains/opStack/actions/getL2Output.js +1 -1
- package/_esm/chains/opStack/actions/getTimeToFinalize.js +2 -2
- package/_esm/chains/opStack/actions/getTimeToNextL2Output.js +2 -2
- package/_esm/chains/opStack/actions/getTimeToProve.js +2 -2
- package/_esm/chains/opStack/actions/getWithdrawalStatus.js +2 -2
- package/_esm/chains/opStack/actions/initiateWithdrawal.js +1 -1
- package/_esm/chains/opStack/actions/proveWithdrawal.js +1 -1
- package/_esm/chains/opStack/actions/waitForNextL2Output.js +1 -1
- package/_esm/chains/opStack/actions/waitToFinalize.js +2 -2
- package/_esm/chains/opStack/actions/waitToProve.js +2 -2
- package/_esm/chains/opStack/decorators/publicL1.js +1 -1
- package/_esm/chains/opStack/decorators/publicL2.js +1 -1
- package/_esm/chains/opStack/decorators/walletL1.js +1 -1
- package/_esm/chains/opStack/decorators/walletL2.js +1 -1
- package/_esm/errors/base.js +1 -1
- package/_esm/errors/base.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_esm/utils/encoding/fromBytes.js +6 -6
- package/_esm/utils/encoding/fromHex.js +6 -6
- package/_esm/utils/encoding/toBytes.js +6 -6
- package/_esm/utils/encoding/toHex.js +6 -6
- package/_esm/utils/ens/labelhash.js +1 -1
- package/_esm/utils/ens/namehash.js +1 -1
- package/_esm/utils/signature/verifyMessage.js +1 -1
- package/_esm/utils/signature/verifyTypedData.js +1 -1
- package/_esm/utils/unit/formatEther.js +1 -1
- package/_esm/utils/unit/formatGwei.js +1 -1
- package/_esm/utils/unit/formatUnits.js +1 -1
- package/_esm/utils/unit/parseEther.js +1 -1
- package/_esm/utils/unit/parseGwei.js +1 -1
- package/_esm/utils/unit/parseUnits.js +1 -1
- package/_types/actions/ens/getEnsAddress.d.ts +2 -2
- package/_types/actions/ens/getEnsAvatar.d.ts +3 -3
- package/_types/actions/ens/getEnsName.d.ts +1 -1
- package/_types/actions/ens/getEnsResolver.d.ts +2 -2
- package/_types/actions/ens/getEnsText.d.ts +2 -2
- package/_types/actions/getContract.d.ts +22 -22
- package/_types/actions/public/call.d.ts +1 -1
- package/_types/actions/public/createBlockFilter.d.ts +3 -3
- package/_types/actions/public/createContractEventFilter.d.ts +3 -3
- package/_types/actions/public/createEventFilter.d.ts +3 -3
- package/_types/actions/public/createPendingTransactionFilter.d.ts +3 -3
- package/_types/actions/public/estimateContractGas.d.ts +2 -2
- package/_types/actions/public/estimateFeesPerGas.d.ts +2 -2
- package/_types/actions/public/estimateGas.d.ts +1 -1
- package/_types/actions/public/estimateMaxPriorityFeePerGas.d.ts +2 -2
- package/_types/actions/public/getBalance.d.ts +2 -2
- package/_types/actions/public/getBlock.d.ts +1 -1
- package/_types/actions/public/getBlockNumber.d.ts +1 -1
- package/_types/actions/public/getBlockTransactionCount.d.ts +1 -1
- package/_types/actions/public/getBytecode.d.ts +1 -1
- package/_types/actions/public/getChainId.d.ts +1 -1
- package/_types/actions/public/getContractEvents.d.ts +1 -1
- package/_types/actions/public/getFeeHistory.d.ts +1 -1
- package/_types/actions/public/getFilterChanges.d.ts +5 -5
- package/_types/actions/public/getFilterLogs.d.ts +1 -1
- package/_types/actions/public/getGasPrice.d.ts +1 -1
- package/_types/actions/public/getLogs.d.ts +1 -1
- package/_types/actions/public/getProof.d.ts +1 -1
- package/_types/actions/public/getStorageAt.d.ts +1 -1
- package/_types/actions/public/getTransaction.d.ts +2 -2
- package/_types/actions/public/getTransactionConfirmations.d.ts +1 -1
- package/_types/actions/public/getTransactionCount.d.ts +2 -2
- package/_types/actions/public/getTransactionReceipt.d.ts +2 -2
- package/_types/actions/public/multicall.d.ts +2 -2
- package/_types/actions/public/readContract.d.ts +2 -2
- package/_types/actions/public/simulateContract.d.ts +3 -3
- package/_types/actions/public/uninstallFilter.d.ts +5 -5
- package/_types/actions/public/verifyMessage.d.ts +1 -1
- package/_types/actions/public/verifyTypedData.d.ts +1 -1
- package/_types/actions/public/waitForTransactionReceipt.d.ts +2 -2
- package/_types/actions/public/watchBlockNumber.d.ts +1 -1
- package/_types/actions/public/watchBlocks.d.ts +1 -1
- package/_types/actions/public/watchContractEvent.d.ts +3 -3
- package/_types/actions/public/watchEvent.d.ts +4 -4
- package/_types/actions/public/watchPendingTransactions.d.ts +2 -2
- package/_types/actions/test/dropTransaction.d.ts +1 -1
- package/_types/actions/test/dumpState.d.ts +1 -1
- package/_types/actions/test/getAutomine.d.ts +1 -1
- package/_types/actions/test/getTxpoolContent.d.ts +1 -1
- package/_types/actions/test/getTxpoolStatus.d.ts +1 -1
- package/_types/actions/test/impersonateAccount.d.ts +1 -1
- package/_types/actions/test/increaseTime.d.ts +1 -1
- package/_types/actions/test/inspectTxpool.d.ts +1 -1
- package/_types/actions/test/loadState.d.ts +1 -1
- package/_types/actions/test/mine.d.ts +1 -1
- package/_types/actions/test/removeBlockTimestampInterval.d.ts +2 -2
- package/_types/actions/test/reset.d.ts +1 -1
- package/_types/actions/test/revert.d.ts +1 -1
- package/_types/actions/test/sendUnsignedTransaction.d.ts +1 -1
- package/_types/actions/test/setAutomine.d.ts +1 -1
- package/_types/actions/test/setBalance.d.ts +1 -1
- package/_types/actions/test/setBlockGasLimit.d.ts +1 -1
- package/_types/actions/test/setBlockTimestampInterval.d.ts +2 -2
- package/_types/actions/test/setCode.d.ts +1 -1
- package/_types/actions/test/setCoinbase.d.ts +1 -1
- package/_types/actions/test/setIntervalMining.d.ts +1 -1
- package/_types/actions/test/setLoggingEnabled.d.ts +1 -1
- package/_types/actions/test/setMinGasPrice.d.ts +1 -1
- package/_types/actions/test/setNextBlockBaseFeePerGas.d.ts +1 -1
- package/_types/actions/test/setNextBlockTimestamp.d.ts +1 -1
- package/_types/actions/test/setNonce.d.ts +1 -1
- package/_types/actions/test/setRpcUrl.d.ts +1 -1
- package/_types/actions/test/setStorageAt.d.ts +1 -1
- package/_types/actions/test/snapshot.d.ts +1 -1
- package/_types/actions/test/stopImpersonatingAccount.d.ts +2 -2
- package/_types/actions/wallet/addChain.d.ts +1 -1
- package/_types/actions/wallet/deployContract.d.ts +2 -2
- package/_types/actions/wallet/getAddresses.d.ts +1 -1
- package/_types/actions/wallet/getPermissions.d.ts +1 -1
- package/_types/actions/wallet/prepareTransactionRequest.d.ts +1 -1
- package/_types/actions/wallet/requestAddresses.d.ts +1 -1
- package/_types/actions/wallet/requestPermissions.d.ts +1 -1
- package/_types/actions/wallet/sendRawTransaction.d.ts +1 -1
- package/_types/actions/wallet/sendTransaction.d.ts +2 -2
- package/_types/actions/wallet/signMessage.d.ts +4 -4
- package/_types/actions/wallet/signTransaction.d.ts +1 -1
- package/_types/actions/wallet/signTypedData.d.ts +2 -2
- package/_types/actions/wallet/switchChain.d.ts +1 -1
- package/_types/actions/wallet/watchAsset.d.ts +1 -1
- package/_types/actions/wallet/writeContract.d.ts +5 -5
- package/_types/chains/opStack/actions/buildDepositTransaction.d.ts +1 -1
- package/_types/chains/opStack/actions/buildInitiateWithdrawal.d.ts +1 -1
- package/_types/chains/opStack/actions/buildProveWithdrawal.d.ts +1 -1
- package/_types/chains/opStack/actions/depositTransaction.d.ts +1 -1
- package/_types/chains/opStack/actions/estimateDepositTransactionGas.d.ts +1 -1
- package/_types/chains/opStack/actions/estimateFinalizeWithdrawalGas.d.ts +1 -1
- package/_types/chains/opStack/actions/estimateInitiateWithdrawalGas.d.ts +1 -1
- package/_types/chains/opStack/actions/estimateProveWithdrawalGas.d.ts +1 -1
- package/_types/chains/opStack/actions/finalizeWithdrawal.d.ts +1 -1
- package/_types/chains/opStack/actions/getL2Output.d.ts +1 -1
- package/_types/chains/opStack/actions/getTimeToFinalize.d.ts +2 -2
- package/_types/chains/opStack/actions/getTimeToNextL2Output.d.ts +2 -2
- package/_types/chains/opStack/actions/getTimeToProve.d.ts +2 -2
- package/_types/chains/opStack/actions/getWithdrawalStatus.d.ts +2 -2
- package/_types/chains/opStack/actions/initiateWithdrawal.d.ts +1 -1
- package/_types/chains/opStack/actions/proveWithdrawal.d.ts +1 -1
- package/_types/chains/opStack/actions/waitForNextL2Output.d.ts +1 -1
- package/_types/chains/opStack/actions/waitToFinalize.d.ts +2 -2
- package/_types/chains/opStack/actions/waitToProve.d.ts +2 -2
- package/_types/chains/opStack/decorators/publicL1.d.ts +20 -20
- package/_types/chains/opStack/decorators/publicL2.d.ts +4 -4
- package/_types/chains/opStack/decorators/walletL1.d.ts +4 -4
- package/_types/chains/opStack/decorators/walletL2.d.ts +2 -2
- package/_types/clients/createPublicClient.d.ts +2 -2
- package/_types/clients/createTestClient.d.ts +3 -3
- package/_types/clients/createWalletClient.d.ts +5 -5
- package/_types/clients/decorators/public.d.ts +79 -79
- package/_types/clients/decorators/test.d.ts +33 -33
- package/_types/clients/decorators/wallet.d.ts +26 -26
- package/_types/errors/version.d.ts +1 -1
- package/_types/utils/encoding/fromBytes.d.ts +6 -6
- package/_types/utils/encoding/fromHex.d.ts +6 -6
- package/_types/utils/encoding/toBytes.d.ts +6 -6
- package/_types/utils/encoding/toHex.d.ts +6 -6
- package/_types/utils/ens/labelhash.d.ts +1 -1
- package/_types/utils/ens/namehash.d.ts +1 -1
- package/_types/utils/signature/verifyMessage.d.ts +1 -1
- package/_types/utils/signature/verifyTypedData.d.ts +1 -1
- package/_types/utils/unit/formatEther.d.ts +1 -1
- package/_types/utils/unit/formatGwei.d.ts +1 -1
- package/_types/utils/unit/formatUnits.d.ts +1 -1
- package/_types/utils/unit/parseEther.d.ts +1 -1
- package/_types/utils/unit/parseGwei.d.ts +1 -1
- package/_types/utils/unit/parseUnits.d.ts +1 -1
- package/actions/ens/getEnsAddress.ts +2 -2
- package/actions/ens/getEnsAvatar.ts +3 -3
- package/actions/ens/getEnsName.ts +1 -1
- package/actions/ens/getEnsResolver.ts +2 -2
- package/actions/ens/getEnsText.ts +2 -2
- package/actions/getContract.ts +22 -22
- package/actions/public/call.ts +1 -1
- package/actions/public/createBlockFilter.ts +3 -3
- package/actions/public/createContractEventFilter.ts +3 -3
- package/actions/public/createEventFilter.ts +3 -3
- package/actions/public/createPendingTransactionFilter.ts +3 -3
- package/actions/public/estimateContractGas.ts +2 -2
- package/actions/public/estimateFeesPerGas.ts +2 -2
- package/actions/public/estimateGas.ts +1 -1
- package/actions/public/estimateMaxPriorityFeePerGas.ts +2 -2
- package/actions/public/getBalance.ts +2 -2
- package/actions/public/getBlock.ts +1 -1
- package/actions/public/getBlockNumber.ts +1 -1
- package/actions/public/getBlockTransactionCount.ts +1 -1
- package/actions/public/getBytecode.ts +1 -1
- package/actions/public/getChainId.ts +1 -1
- package/actions/public/getContractEvents.ts +1 -1
- package/actions/public/getFeeHistory.ts +1 -1
- package/actions/public/getFilterChanges.ts +5 -5
- package/actions/public/getFilterLogs.ts +1 -1
- package/actions/public/getGasPrice.ts +1 -1
- package/actions/public/getLogs.ts +1 -1
- package/actions/public/getProof.ts +1 -1
- package/actions/public/getStorageAt.ts +1 -1
- package/actions/public/getTransaction.ts +2 -2
- package/actions/public/getTransactionConfirmations.ts +1 -1
- package/actions/public/getTransactionCount.ts +2 -2
- package/actions/public/getTransactionReceipt.ts +2 -2
- package/actions/public/multicall.ts +2 -2
- package/actions/public/readContract.ts +2 -2
- package/actions/public/simulateContract.ts +3 -3
- package/actions/public/uninstallFilter.ts +5 -5
- package/actions/public/verifyMessage.ts +1 -1
- package/actions/public/verifyTypedData.ts +1 -1
- package/actions/public/waitForTransactionReceipt.ts +2 -2
- package/actions/public/watchBlockNumber.ts +1 -1
- package/actions/public/watchBlocks.ts +1 -1
- package/actions/public/watchContractEvent.ts +3 -3
- package/actions/public/watchEvent.ts +4 -4
- package/actions/public/watchPendingTransactions.ts +2 -2
- package/actions/test/dropTransaction.ts +1 -1
- package/actions/test/dumpState.ts +1 -1
- package/actions/test/getAutomine.ts +1 -1
- package/actions/test/getTxpoolContent.ts +1 -1
- package/actions/test/getTxpoolStatus.ts +1 -1
- package/actions/test/impersonateAccount.ts +1 -1
- package/actions/test/increaseTime.ts +1 -1
- package/actions/test/inspectTxpool.ts +1 -1
- package/actions/test/loadState.ts +1 -1
- package/actions/test/mine.ts +1 -1
- package/actions/test/removeBlockTimestampInterval.ts +2 -2
- package/actions/test/reset.ts +1 -1
- package/actions/test/revert.ts +1 -1
- package/actions/test/sendUnsignedTransaction.ts +1 -1
- package/actions/test/setAutomine.ts +1 -1
- package/actions/test/setBalance.ts +1 -1
- package/actions/test/setBlockGasLimit.ts +1 -1
- package/actions/test/setBlockTimestampInterval.ts +2 -2
- package/actions/test/setCode.ts +1 -1
- package/actions/test/setCoinbase.ts +1 -1
- package/actions/test/setIntervalMining.ts +1 -1
- package/actions/test/setLoggingEnabled.ts +1 -1
- package/actions/test/setMinGasPrice.ts +1 -1
- package/actions/test/setNextBlockBaseFeePerGas.ts +1 -1
- package/actions/test/setNextBlockTimestamp.ts +1 -1
- package/actions/test/setNonce.ts +1 -1
- package/actions/test/setRpcUrl.ts +1 -1
- package/actions/test/setStorageAt.ts +1 -1
- package/actions/test/snapshot.ts +1 -1
- package/actions/test/stopImpersonatingAccount.ts +2 -2
- package/actions/wallet/addChain.ts +1 -1
- package/actions/wallet/deployContract.ts +2 -2
- package/actions/wallet/getAddresses.ts +1 -1
- package/actions/wallet/getPermissions.ts +1 -1
- package/actions/wallet/prepareTransactionRequest.ts +1 -1
- package/actions/wallet/requestAddresses.ts +1 -1
- package/actions/wallet/requestPermissions.ts +1 -1
- package/actions/wallet/sendRawTransaction.ts +1 -1
- package/actions/wallet/sendTransaction.ts +2 -2
- package/actions/wallet/signMessage.ts +4 -4
- package/actions/wallet/signTransaction.ts +1 -1
- package/actions/wallet/signTypedData.ts +2 -2
- package/actions/wallet/switchChain.ts +1 -1
- package/actions/wallet/watchAsset.ts +1 -1
- package/actions/wallet/writeContract.ts +5 -5
- package/chains/opStack/actions/buildDepositTransaction.ts +1 -1
- package/chains/opStack/actions/buildInitiateWithdrawal.ts +1 -1
- package/chains/opStack/actions/buildProveWithdrawal.ts +1 -1
- 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/estimateProveWithdrawalGas.ts +1 -1
- package/chains/opStack/actions/finalizeWithdrawal.ts +1 -1
- package/chains/opStack/actions/getL2Output.ts +1 -1
- package/chains/opStack/actions/getTimeToFinalize.ts +2 -2
- package/chains/opStack/actions/getTimeToNextL2Output.ts +2 -2
- package/chains/opStack/actions/getTimeToProve.ts +2 -2
- package/chains/opStack/actions/getWithdrawalStatus.ts +2 -2
- package/chains/opStack/actions/initiateWithdrawal.ts +1 -1
- package/chains/opStack/actions/proveWithdrawal.ts +1 -1
- package/chains/opStack/actions/waitForNextL2Output.ts +1 -1
- package/chains/opStack/actions/waitToFinalize.ts +2 -2
- package/chains/opStack/actions/waitToProve.ts +2 -2
- package/chains/opStack/decorators/publicL1.ts +20 -20
- package/chains/opStack/decorators/publicL2.ts +4 -4
- package/chains/opStack/decorators/walletL1.ts +4 -4
- package/chains/opStack/decorators/walletL2.ts +2 -2
- package/chains/zksync/types.ts +6 -6
- package/clients/createPublicClient.ts +2 -2
- package/clients/createTestClient.ts +3 -3
- package/clients/createWalletClient.ts +5 -5
- package/clients/decorators/public.ts +79 -79
- package/clients/decorators/test.ts +33 -33
- package/clients/decorators/wallet.ts +26 -26
- package/errors/base.ts +1 -1
- package/errors/version.ts +1 -1
- package/package.json +1 -1
- package/utils/encoding/fromBytes.ts +6 -6
- package/utils/encoding/fromHex.ts +6 -6
- package/utils/encoding/toBytes.ts +6 -6
- package/utils/encoding/toHex.ts +6 -6
- package/utils/ens/labelhash.ts +1 -1
- package/utils/ens/namehash.ts +1 -1
- package/utils/signature/verifyMessage.ts +1 -1
- package/utils/signature/verifyTypedData.ts +1 -1
- package/utils/unit/formatEther.ts +1 -1
- package/utils/unit/formatGwei.ts +1 -1
- package/utils/unit/formatUnits.ts +1 -1
- package/utils/unit/parseEther.ts +1 -1
- package/utils/unit/parseGwei.ts +1 -1
- package/utils/unit/parseUnits.ts +1 -1
@@ -33,7 +33,7 @@ export type TestActions = {
|
|
33
33
|
/**
|
34
34
|
* Removes a transaction from the mempool.
|
35
35
|
*
|
36
|
-
* - Docs: https://viem.sh/docs/actions/test/dropTransaction
|
36
|
+
* - Docs: https://viem.sh/docs/actions/test/dropTransaction
|
37
37
|
*
|
38
38
|
* @param args - {@link DropTransactionParameters}
|
39
39
|
*
|
@@ -55,7 +55,7 @@ export type TestActions = {
|
|
55
55
|
* Serializes the current state (including contracts code, contract's storage,
|
56
56
|
* accounts properties, etc.) into a savable data blob.
|
57
57
|
*
|
58
|
-
* - Docs: https://viem.sh/docs/actions/test/dumpState
|
58
|
+
* - Docs: https://viem.sh/docs/actions/test/dumpState
|
59
59
|
*
|
60
60
|
* @param client - Client to use
|
61
61
|
*
|
@@ -74,7 +74,7 @@ export type TestActions = {
|
|
74
74
|
/**
|
75
75
|
* Returns the automatic mining status of the node.
|
76
76
|
*
|
77
|
-
* - Docs: https://viem.sh/docs/actions/test/getAutomine
|
77
|
+
* - Docs: https://viem.sh/docs/actions/test/getAutomine
|
78
78
|
*
|
79
79
|
* @returns Whether or not the node is auto mining. {@link GetAutomineReturnType}
|
80
80
|
*
|
@@ -93,7 +93,7 @@ export type TestActions = {
|
|
93
93
|
/**
|
94
94
|
* Returns the details of all transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only.
|
95
95
|
*
|
96
|
-
* - Docs: https://viem.sh/docs/actions/test/getTxpoolContent
|
96
|
+
* - Docs: https://viem.sh/docs/actions/test/getTxpoolContent
|
97
97
|
*
|
98
98
|
* @returns Transaction pool content. {@link GetTxpoolContentReturnType}
|
99
99
|
*
|
@@ -112,7 +112,7 @@ export type TestActions = {
|
|
112
112
|
/**
|
113
113
|
* Returns a summary of all the transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only.
|
114
114
|
*
|
115
|
-
* - Docs: https://viem.sh/docs/actions/test/getTxpoolStatus
|
115
|
+
* - Docs: https://viem.sh/docs/actions/test/getTxpoolStatus
|
116
116
|
*
|
117
117
|
* @returns Transaction pool status. {@link GetTxpoolStatusReturnType}
|
118
118
|
*
|
@@ -131,7 +131,7 @@ export type TestActions = {
|
|
131
131
|
/**
|
132
132
|
* Impersonate an account or contract address. This lets you send transactions from that account even if you don't have access to its private key.
|
133
133
|
*
|
134
|
-
* - Docs: https://viem.sh/docs/actions/test/impersonateAccount
|
134
|
+
* - Docs: https://viem.sh/docs/actions/test/impersonateAccount
|
135
135
|
*
|
136
136
|
* @param args - {@link ImpersonateAccountParameters}
|
137
137
|
*
|
@@ -152,7 +152,7 @@ export type TestActions = {
|
|
152
152
|
/**
|
153
153
|
* Jump forward in time by the given amount of time, in seconds.
|
154
154
|
*
|
155
|
-
* - Docs: https://viem.sh/docs/actions/test/increaseTime
|
155
|
+
* - Docs: https://viem.sh/docs/actions/test/increaseTime
|
156
156
|
*
|
157
157
|
* @param args – {@link IncreaseTimeParameters}
|
158
158
|
*
|
@@ -173,7 +173,7 @@ export type TestActions = {
|
|
173
173
|
/**
|
174
174
|
* Returns a summary of all the transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only.
|
175
175
|
*
|
176
|
-
* - Docs: https://viem.sh/docs/actions/test/inspectTxpool
|
176
|
+
* - Docs: https://viem.sh/docs/actions/test/inspectTxpool
|
177
177
|
*
|
178
178
|
* @returns Transaction pool inspection data. {@link InspectTxpoolReturnType}
|
179
179
|
*
|
@@ -192,7 +192,7 @@ export type TestActions = {
|
|
192
192
|
/**
|
193
193
|
* Adds state previously dumped with `dumpState` to the current chain.
|
194
194
|
*
|
195
|
-
* - Docs: https://viem.sh/docs/actions/test/loadState
|
195
|
+
* - Docs: https://viem.sh/docs/actions/test/loadState
|
196
196
|
*
|
197
197
|
* @param client - Client to use
|
198
198
|
*
|
@@ -211,7 +211,7 @@ export type TestActions = {
|
|
211
211
|
/**
|
212
212
|
* Mine a specified number of blocks.
|
213
213
|
*
|
214
|
-
* - Docs: https://viem.sh/docs/actions/test/mine
|
214
|
+
* - Docs: https://viem.sh/docs/actions/test/mine
|
215
215
|
*
|
216
216
|
* @param client - Client to use
|
217
217
|
* @param args – {@link MineParameters}
|
@@ -229,9 +229,9 @@ export type TestActions = {
|
|
229
229
|
*/
|
230
230
|
mine: (args: MineParameters) => Promise<void>;
|
231
231
|
/**
|
232
|
-
* Removes [`setBlockTimestampInterval`](https://viem.sh/docs/actions/test/setBlockTimestampInterval
|
232
|
+
* Removes [`setBlockTimestampInterval`](https://viem.sh/docs/actions/test/setBlockTimestampInterval) if it exists.
|
233
233
|
*
|
234
|
-
* - Docs: https://viem.sh/docs/actions/test/removeBlockTimestampInterval
|
234
|
+
* - Docs: https://viem.sh/docs/actions/test/removeBlockTimestampInterval
|
235
235
|
*
|
236
236
|
* @example
|
237
237
|
* import { createTestClient, http } from 'viem'
|
@@ -249,7 +249,7 @@ export type TestActions = {
|
|
249
249
|
/**
|
250
250
|
* Resets fork back to its original state.
|
251
251
|
*
|
252
|
-
* - Docs: https://viem.sh/docs/actions/test/reset
|
252
|
+
* - Docs: https://viem.sh/docs/actions/test/reset
|
253
253
|
*
|
254
254
|
* @param args – {@link ResetParameters}
|
255
255
|
*
|
@@ -268,7 +268,7 @@ export type TestActions = {
|
|
268
268
|
/**
|
269
269
|
* Revert the state of the blockchain at the current block.
|
270
270
|
*
|
271
|
-
* - Docs: https://viem.sh/docs/actions/test/revert
|
271
|
+
* - Docs: https://viem.sh/docs/actions/test/revert
|
272
272
|
*
|
273
273
|
* @param args – {@link RevertParameters}
|
274
274
|
*
|
@@ -287,7 +287,7 @@ export type TestActions = {
|
|
287
287
|
/**
|
288
288
|
* Returns the details of all transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only.
|
289
289
|
*
|
290
|
-
* - Docs: https://viem.sh/docs/actions/test/getTxpoolContent
|
290
|
+
* - Docs: https://viem.sh/docs/actions/test/getTxpoolContent
|
291
291
|
*
|
292
292
|
* @param args – {@link SendUnsignedTransactionParameters}
|
293
293
|
* @returns The transaction hash. {@link SendUnsignedTransactionReturnType}
|
@@ -311,7 +311,7 @@ export type TestActions = {
|
|
311
311
|
/**
|
312
312
|
* Enables or disables the automatic mining of new blocks with each new transaction submitted to the network.
|
313
313
|
*
|
314
|
-
* - Docs: https://viem.sh/docs/actions/test/setAutomine
|
314
|
+
* - Docs: https://viem.sh/docs/actions/test/setAutomine
|
315
315
|
*
|
316
316
|
* @example
|
317
317
|
* import { createTestClient, http } from 'viem'
|
@@ -328,7 +328,7 @@ export type TestActions = {
|
|
328
328
|
/**
|
329
329
|
* Modifies the balance of an account.
|
330
330
|
*
|
331
|
-
* - Docs: https://viem.sh/docs/actions/test/setBalance
|
331
|
+
* - Docs: https://viem.sh/docs/actions/test/setBalance
|
332
332
|
*
|
333
333
|
* @param args – {@link SetBalanceParameters}
|
334
334
|
*
|
@@ -350,7 +350,7 @@ export type TestActions = {
|
|
350
350
|
/**
|
351
351
|
* Sets the block's gas limit.
|
352
352
|
*
|
353
|
-
* - Docs: https://viem.sh/docs/actions/test/setBlockGasLimit
|
353
|
+
* - Docs: https://viem.sh/docs/actions/test/setBlockGasLimit
|
354
354
|
*
|
355
355
|
* @param args – {@link SetBlockGasLimitParameters}
|
356
356
|
*
|
@@ -367,9 +367,9 @@ export type TestActions = {
|
|
367
367
|
*/
|
368
368
|
setBlockGasLimit: (args: SetBlockGasLimitParameters) => Promise<void>;
|
369
369
|
/**
|
370
|
-
* Similar to [`increaseTime`](https://viem.sh/docs/actions/test/increaseTime
|
370
|
+
* Similar to [`increaseTime`](https://viem.sh/docs/actions/test/increaseTime), but sets a block timestamp `interval`. The timestamp of future blocks will be computed as `lastBlock_timestamp` + `interval`.
|
371
371
|
*
|
372
|
-
* - Docs: https://viem.sh/docs/actions/test/setBlockTimestampInterval
|
372
|
+
* - Docs: https://viem.sh/docs/actions/test/setBlockTimestampInterval
|
373
373
|
*
|
374
374
|
* @param args – {@link SetBlockTimestampIntervalParameters}
|
375
375
|
*
|
@@ -388,7 +388,7 @@ export type TestActions = {
|
|
388
388
|
/**
|
389
389
|
* Modifies the bytecode stored at an account's address.
|
390
390
|
*
|
391
|
-
* - Docs: https://viem.sh/docs/actions/test/setCode
|
391
|
+
* - Docs: https://viem.sh/docs/actions/test/setCode
|
392
392
|
*
|
393
393
|
* @param args – {@link SetCodeParameters}
|
394
394
|
*
|
@@ -410,7 +410,7 @@ export type TestActions = {
|
|
410
410
|
/**
|
411
411
|
* Sets the coinbase address to be used in new blocks.
|
412
412
|
*
|
413
|
-
* - Docs: https://viem.sh/docs/actions/test/setCoinbase
|
413
|
+
* - Docs: https://viem.sh/docs/actions/test/setCoinbase
|
414
414
|
*
|
415
415
|
* @param args – {@link SetCoinbaseParameters}
|
416
416
|
*
|
@@ -431,7 +431,7 @@ export type TestActions = {
|
|
431
431
|
/**
|
432
432
|
* Sets the automatic mining interval (in seconds) of blocks. Setting the interval to 0 will disable automatic mining.
|
433
433
|
*
|
434
|
-
* - Docs: https://viem.sh/docs/actions/test/setIntervalMining
|
434
|
+
* - Docs: https://viem.sh/docs/actions/test/setIntervalMining
|
435
435
|
*
|
436
436
|
* @param args – {@link SetIntervalMiningParameters}
|
437
437
|
*
|
@@ -450,7 +450,7 @@ export type TestActions = {
|
|
450
450
|
/**
|
451
451
|
* Enable or disable logging on the test node network.
|
452
452
|
*
|
453
|
-
* - Docs: https://viem.sh/docs/actions/test/setLoggingEnabled
|
453
|
+
* - Docs: https://viem.sh/docs/actions/test/setLoggingEnabled
|
454
454
|
*
|
455
455
|
* @param client - Client to use
|
456
456
|
*
|
@@ -469,7 +469,7 @@ export type TestActions = {
|
|
469
469
|
/**
|
470
470
|
* Change the minimum gas price accepted by the network (in wei).
|
471
471
|
*
|
472
|
-
* - Docs: https://viem.sh/docs/actions/test/setMinGasPrice
|
472
|
+
* - Docs: https://viem.sh/docs/actions/test/setMinGasPrice
|
473
473
|
*
|
474
474
|
* Note: `setMinGasPrice` can only be used on clients that do not have EIP-1559 enabled.
|
475
475
|
*
|
@@ -492,7 +492,7 @@ export type TestActions = {
|
|
492
492
|
/**
|
493
493
|
* Sets the next block's base fee per gas.
|
494
494
|
*
|
495
|
-
* - Docs: https://viem.sh/docs/actions/test/setNextBlockBaseFeePerGas
|
495
|
+
* - Docs: https://viem.sh/docs/actions/test/setNextBlockBaseFeePerGas
|
496
496
|
*
|
497
497
|
* @param args – {@link SetNextBlockBaseFeePerGasParameters}
|
498
498
|
*
|
@@ -513,7 +513,7 @@ export type TestActions = {
|
|
513
513
|
/**
|
514
514
|
* Sets the next block's timestamp.
|
515
515
|
*
|
516
|
-
* - Docs: https://viem.sh/docs/actions/test/setNextBlockTimestamp
|
516
|
+
* - Docs: https://viem.sh/docs/actions/test/setNextBlockTimestamp
|
517
517
|
*
|
518
518
|
* @param args – {@link SetNextBlockTimestampParameters}
|
519
519
|
*
|
@@ -532,7 +532,7 @@ export type TestActions = {
|
|
532
532
|
/**
|
533
533
|
* Modifies (overrides) the nonce of an account.
|
534
534
|
*
|
535
|
-
* - Docs: https://viem.sh/docs/actions/test/setNonce
|
535
|
+
* - Docs: https://viem.sh/docs/actions/test/setNonce
|
536
536
|
*
|
537
537
|
* @param args – {@link SetNonceParameters}
|
538
538
|
*
|
@@ -554,7 +554,7 @@ export type TestActions = {
|
|
554
554
|
/**
|
555
555
|
* Sets the backend RPC URL.
|
556
556
|
*
|
557
|
-
* - Docs: https://viem.sh/docs/actions/test/setRpcUrl
|
557
|
+
* - Docs: https://viem.sh/docs/actions/test/setRpcUrl
|
558
558
|
*
|
559
559
|
* @param jsonRpcUrl – RPC URL
|
560
560
|
*
|
@@ -573,7 +573,7 @@ export type TestActions = {
|
|
573
573
|
/**
|
574
574
|
* Writes to a slot of an account's storage.
|
575
575
|
*
|
576
|
-
* - Docs: https://viem.sh/docs/actions/test/setStorageAt
|
576
|
+
* - Docs: https://viem.sh/docs/actions/test/setStorageAt
|
577
577
|
*
|
578
578
|
* @param args – {@link SetStorageAtParameters}
|
579
579
|
*
|
@@ -596,7 +596,7 @@ export type TestActions = {
|
|
596
596
|
/**
|
597
597
|
* Snapshot the state of the blockchain at the current block.
|
598
598
|
*
|
599
|
-
* - Docs: https://viem.sh/docs/actions/test/snapshot
|
599
|
+
* - Docs: https://viem.sh/docs/actions/test/snapshot
|
600
600
|
*
|
601
601
|
* @example
|
602
602
|
* import { createTestClient, http } from 'viem'
|
@@ -612,9 +612,9 @@ export type TestActions = {
|
|
612
612
|
*/
|
613
613
|
snapshot: () => Promise<Quantity>;
|
614
614
|
/**
|
615
|
-
* Stop impersonating an account after having previously used [`impersonateAccount`](https://viem.sh/docs/actions/test/impersonateAccount
|
615
|
+
* Stop impersonating an account after having previously used [`impersonateAccount`](https://viem.sh/docs/actions/test/impersonateAccount).
|
616
616
|
*
|
617
|
-
* - Docs: https://viem.sh/docs/actions/test/stopImpersonatingAccount
|
617
|
+
* - Docs: https://viem.sh/docs/actions/test/stopImpersonatingAccount
|
618
618
|
*
|
619
619
|
* @param args – {@link StopImpersonatingAccountParameters}
|
620
620
|
*
|
@@ -24,7 +24,7 @@ export type WalletActions<TChain extends Chain | undefined = Chain | undefined,
|
|
24
24
|
/**
|
25
25
|
* Adds an EVM chain to the wallet.
|
26
26
|
*
|
27
|
-
* - Docs: https://viem.sh/docs/actions/wallet/addChain
|
27
|
+
* - Docs: https://viem.sh/docs/actions/wallet/addChain
|
28
28
|
* - JSON-RPC Methods: [`eth_addEthereumChain`](https://eips.ethereum.org/EIPS/eip-3085)
|
29
29
|
*
|
30
30
|
* @param args - {@link AddChainParameters}
|
@@ -42,11 +42,11 @@ export type WalletActions<TChain extends Chain | undefined = Chain | undefined,
|
|
42
42
|
/**
|
43
43
|
* Deploys a contract to the network, given bytecode and constructor arguments.
|
44
44
|
*
|
45
|
-
* - Docs: https://viem.sh/docs/contract/deployContract
|
45
|
+
* - Docs: https://viem.sh/docs/contract/deployContract
|
46
46
|
* - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts/deploying-contracts
|
47
47
|
*
|
48
48
|
* @param args - {@link DeployContractParameters}
|
49
|
-
* @returns The [Transaction](https://viem.sh/docs/glossary/terms
|
49
|
+
* @returns The [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. {@link DeployContractReturnType}
|
50
50
|
*
|
51
51
|
* @example
|
52
52
|
* import { createWalletClient, http } from 'viem'
|
@@ -68,7 +68,7 @@ export type WalletActions<TChain extends Chain | undefined = Chain | undefined,
|
|
68
68
|
/**
|
69
69
|
* Returns a list of account addresses owned by the wallet or client.
|
70
70
|
*
|
71
|
-
* - Docs: https://viem.sh/docs/actions/wallet/getAddresses
|
71
|
+
* - Docs: https://viem.sh/docs/actions/wallet/getAddresses
|
72
72
|
* - JSON-RPC Methods: [`eth_accounts`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_accounts)
|
73
73
|
*
|
74
74
|
* @returns List of account addresses owned by the wallet or client. {@link GetAddressesReturnType}
|
@@ -87,7 +87,7 @@ export type WalletActions<TChain extends Chain | undefined = Chain | undefined,
|
|
87
87
|
/**
|
88
88
|
* Returns the chain ID associated with the current network.
|
89
89
|
*
|
90
|
-
* - Docs: https://viem.sh/docs/actions/public/getChainId
|
90
|
+
* - Docs: https://viem.sh/docs/actions/public/getChainId
|
91
91
|
* - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid)
|
92
92
|
*
|
93
93
|
* @returns The current chain ID. {@link GetChainIdReturnType}
|
@@ -107,7 +107,7 @@ export type WalletActions<TChain extends Chain | undefined = Chain | undefined,
|
|
107
107
|
/**
|
108
108
|
* Gets the wallets current permissions.
|
109
109
|
*
|
110
|
-
* - Docs: https://viem.sh/docs/actions/wallet/getPermissions
|
110
|
+
* - Docs: https://viem.sh/docs/actions/wallet/getPermissions
|
111
111
|
* - JSON-RPC Methods: [`wallet_getPermissions`](https://eips.ethereum.org/EIPS/eip-2255)
|
112
112
|
*
|
113
113
|
* @returns The wallet permissions. {@link GetPermissionsReturnType}
|
@@ -126,7 +126,7 @@ export type WalletActions<TChain extends Chain | undefined = Chain | undefined,
|
|
126
126
|
/**
|
127
127
|
* Prepares a transaction request for signing.
|
128
128
|
*
|
129
|
-
* - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest
|
129
|
+
* - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest
|
130
130
|
*
|
131
131
|
* @param args - {@link PrepareTransactionRequestParameters}
|
132
132
|
* @returns The transaction request. {@link PrepareTransactionRequestReturnType}
|
@@ -165,7 +165,7 @@ export type WalletActions<TChain extends Chain | undefined = Chain | undefined,
|
|
165
165
|
/**
|
166
166
|
* Requests a list of accounts managed by a wallet.
|
167
167
|
*
|
168
|
-
* - Docs: https://viem.sh/docs/actions/wallet/requestAddresses
|
168
|
+
* - Docs: https://viem.sh/docs/actions/wallet/requestAddresses
|
169
169
|
* - JSON-RPC Methods: [`eth_requestAccounts`](https://eips.ethereum.org/EIPS/eip-1102)
|
170
170
|
*
|
171
171
|
* Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses).
|
@@ -188,7 +188,7 @@ export type WalletActions<TChain extends Chain | undefined = Chain | undefined,
|
|
188
188
|
/**
|
189
189
|
* Requests permissions for a wallet.
|
190
190
|
*
|
191
|
-
* - Docs: https://viem.sh/docs/actions/wallet/requestPermissions
|
191
|
+
* - Docs: https://viem.sh/docs/actions/wallet/requestPermissions
|
192
192
|
* - JSON-RPC Methods: [`wallet_requestPermissions`](https://eips.ethereum.org/EIPS/eip-2255)
|
193
193
|
*
|
194
194
|
* @param args - {@link RequestPermissionsParameters}
|
@@ -210,7 +210,7 @@ export type WalletActions<TChain extends Chain | undefined = Chain | undefined,
|
|
210
210
|
/**
|
211
211
|
* Sends a **signed** transaction to the network
|
212
212
|
*
|
213
|
-
* - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction
|
213
|
+
* - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction
|
214
214
|
* - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/)
|
215
215
|
*
|
216
216
|
* @param client - Client to use
|
@@ -235,14 +235,14 @@ export type WalletActions<TChain extends Chain | undefined = Chain | undefined,
|
|
235
235
|
/**
|
236
236
|
* Creates, signs, and sends a new transaction to the network.
|
237
237
|
*
|
238
|
-
* - Docs: https://viem.sh/docs/actions/wallet/sendTransaction
|
238
|
+
* - Docs: https://viem.sh/docs/actions/wallet/sendTransaction
|
239
239
|
* - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions/sending-transactions
|
240
240
|
* - JSON-RPC Methods:
|
241
241
|
* - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction)
|
242
242
|
* - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction)
|
243
243
|
*
|
244
244
|
* @param args - {@link SendTransactionParameters}
|
245
|
-
* @returns The [Transaction](https://viem.sh/docs/glossary/terms
|
245
|
+
* @returns The [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. {@link SendTransactionReturnType}
|
246
246
|
*
|
247
247
|
* @example
|
248
248
|
* import { createWalletClient, custom } from 'viem'
|
@@ -278,14 +278,14 @@ export type WalletActions<TChain extends Chain | undefined = Chain | undefined,
|
|
278
278
|
/**
|
279
279
|
* Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`.
|
280
280
|
*
|
281
|
-
* - Docs: https://viem.sh/docs/actions/wallet/signMessage
|
281
|
+
* - Docs: https://viem.sh/docs/actions/wallet/signMessage
|
282
282
|
* - JSON-RPC Methods:
|
283
|
-
* - JSON-RPC Accounts: [`personal_sign`](https://docs.metamask.io/guide/signing-data
|
283
|
+
* - JSON-RPC Accounts: [`personal_sign`](https://docs.metamask.io/guide/signing-data#personal-sign)
|
284
284
|
* - Local Accounts: Signs locally. No JSON-RPC request.
|
285
285
|
*
|
286
286
|
* With the calculated signature, you can:
|
287
|
-
* - use [`verifyMessage`](https://viem.sh/docs/utilities/verifyMessage
|
288
|
-
* - use [`recoverMessageAddress`](https://viem.sh/docs/utilities/recoverMessageAddress
|
287
|
+
* - use [`verifyMessage`](https://viem.sh/docs/utilities/verifyMessage) to verify the signature,
|
288
|
+
* - use [`recoverMessageAddress`](https://viem.sh/docs/utilities/recoverMessageAddress) to recover the signing address from a signature.
|
289
289
|
*
|
290
290
|
* @param args - {@link SignMessageParameters}
|
291
291
|
* @returns The signed message. {@link SignMessageReturnType}
|
@@ -322,7 +322,7 @@ export type WalletActions<TChain extends Chain | undefined = Chain | undefined,
|
|
322
322
|
/**
|
323
323
|
* Signs a transaction.
|
324
324
|
*
|
325
|
-
* - Docs: https://viem.sh/docs/actions/wallet/signTransaction
|
325
|
+
* - Docs: https://viem.sh/docs/actions/wallet/signTransaction
|
326
326
|
* - JSON-RPC Methods:
|
327
327
|
* - JSON-RPC Accounts: [`eth_signTransaction`](https://ethereum.github.io/execution-apis/api-documentation/)
|
328
328
|
* - Local Accounts: Signs locally. No JSON-RPC request.
|
@@ -366,9 +366,9 @@ export type WalletActions<TChain extends Chain | undefined = Chain | undefined,
|
|
366
366
|
/**
|
367
367
|
* Signs typed data and calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`.
|
368
368
|
*
|
369
|
-
* - Docs: https://viem.sh/docs/actions/wallet/signTypedData
|
369
|
+
* - Docs: https://viem.sh/docs/actions/wallet/signTypedData
|
370
370
|
* - JSON-RPC Methods:
|
371
|
-
* - JSON-RPC Accounts: [`eth_signTypedData_v4`](https://docs.metamask.io/guide/signing-data
|
371
|
+
* - JSON-RPC Accounts: [`eth_signTypedData_v4`](https://docs.metamask.io/guide/signing-data#signtypeddata-v4)
|
372
372
|
* - Local Accounts: Signs locally. No JSON-RPC request.
|
373
373
|
*
|
374
374
|
* @param client - Client to use
|
@@ -465,7 +465,7 @@ export type WalletActions<TChain extends Chain | undefined = Chain | undefined,
|
|
465
465
|
/**
|
466
466
|
* Switch the target chain in a wallet.
|
467
467
|
*
|
468
|
-
* - Docs: https://viem.sh/docs/actions/wallet/switchChain
|
468
|
+
* - Docs: https://viem.sh/docs/actions/wallet/switchChain
|
469
469
|
* - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-3326)
|
470
470
|
*
|
471
471
|
* @param args - {@link SwitchChainParameters}
|
@@ -484,7 +484,7 @@ export type WalletActions<TChain extends Chain | undefined = Chain | undefined,
|
|
484
484
|
/**
|
485
485
|
* Adds an EVM chain to the wallet.
|
486
486
|
*
|
487
|
-
* - Docs: https://viem.sh/docs/actions/wallet/watchAsset
|
487
|
+
* - Docs: https://viem.sh/docs/actions/wallet/watchAsset
|
488
488
|
* - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-747)
|
489
489
|
*
|
490
490
|
* @param args - {@link WatchAssetParameters}
|
@@ -511,17 +511,17 @@ export type WalletActions<TChain extends Chain | undefined = Chain | undefined,
|
|
511
511
|
/**
|
512
512
|
* Executes a write function on a contract.
|
513
513
|
*
|
514
|
-
* - Docs: https://viem.sh/docs/contract/writeContract
|
514
|
+
* - Docs: https://viem.sh/docs/contract/writeContract
|
515
515
|
* - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts/writing-to-contracts
|
516
516
|
*
|
517
|
-
* A "write" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a [Transaction](https://viem.sh/docs/glossary/terms
|
517
|
+
* A "write" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a [Transaction](https://viem.sh/docs/glossary/terms) is needed to be broadcast in order to change the state.
|
518
518
|
*
|
519
|
-
* Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet
|
519
|
+
* Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData).
|
520
520
|
*
|
521
|
-
* __Warning: The `write` internally sends a transaction – it does not validate if the contract write will succeed (the contract may throw an error). It is highly recommended to [simulate the contract write with `contract.simulate`](https://viem.sh/docs/contract/writeContract
|
521
|
+
* __Warning: The `write` internally sends a transaction – it does not validate if the contract write will succeed (the contract may throw an error). It is highly recommended to [simulate the contract write with `contract.simulate`](https://viem.sh/docs/contract/writeContract#usage) before you execute it.__
|
522
522
|
*
|
523
523
|
* @param args - {@link WriteContractParameters}
|
524
|
-
* @returns A [Transaction Hash](https://viem.sh/docs/glossary/terms
|
524
|
+
* @returns A [Transaction Hash](https://viem.sh/docs/glossary/terms#hash). {@link WriteContractReturnType}
|
525
525
|
*
|
526
526
|
* @example
|
527
527
|
* import { createWalletClient, custom, parseAbi } from 'viem'
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const version = "0.0.0-main.
|
1
|
+
export declare const version = "0.0.0-main.20240110T220130";
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
@@ -14,8 +14,8 @@ export type FromBytesErrorType = BytesToHexErrorType | BytesToBigIntErrorType |
|
|
14
14
|
/**
|
15
15
|
* Decodes a byte array into a UTF-8 string, hex value, number, bigint or boolean.
|
16
16
|
*
|
17
|
-
* - Docs: https://viem.sh/docs/utilities/fromBytes
|
18
|
-
* - Example: https://viem.sh/docs/utilities/fromBytes
|
17
|
+
* - Docs: https://viem.sh/docs/utilities/fromBytes
|
18
|
+
* - Example: https://viem.sh/docs/utilities/fromBytes#usage
|
19
19
|
*
|
20
20
|
* @param bytes Byte array to decode.
|
21
21
|
* @param toOrOpts Type to convert to or options.
|
@@ -45,7 +45,7 @@ export type BytesToBigIntErrorType = BytesToHexErrorType | HexToBigIntErrorType
|
|
45
45
|
/**
|
46
46
|
* Decodes a byte array into a bigint.
|
47
47
|
*
|
48
|
-
* - Docs: https://viem.sh/docs/utilities/fromBytes
|
48
|
+
* - Docs: https://viem.sh/docs/utilities/fromBytes#bytestobigint
|
49
49
|
*
|
50
50
|
* @param bytes Byte array to decode.
|
51
51
|
* @param opts Options.
|
@@ -65,7 +65,7 @@ export type BytesToBoolErrorType = AssertSizeErrorType | TrimErrorType | ErrorTy
|
|
65
65
|
/**
|
66
66
|
* Decodes a byte array into a boolean.
|
67
67
|
*
|
68
|
-
* - Docs: https://viem.sh/docs/utilities/fromBytes
|
68
|
+
* - Docs: https://viem.sh/docs/utilities/fromBytes#bytestobool
|
69
69
|
*
|
70
70
|
* @param bytes Byte array to decode.
|
71
71
|
* @param opts Options.
|
@@ -82,7 +82,7 @@ export type BytesToNumberErrorType = BytesToHexErrorType | HexToNumberErrorType
|
|
82
82
|
/**
|
83
83
|
* Decodes a byte array into a number.
|
84
84
|
*
|
85
|
-
* - Docs: https://viem.sh/docs/utilities/fromBytes
|
85
|
+
* - Docs: https://viem.sh/docs/utilities/fromBytes#bytestonumber
|
86
86
|
*
|
87
87
|
* @param bytes Byte array to decode.
|
88
88
|
* @param opts Options.
|
@@ -102,7 +102,7 @@ export type BytesToStringErrorType = AssertSizeErrorType | TrimErrorType | Error
|
|
102
102
|
/**
|
103
103
|
* Decodes a byte array into a UTF-8 string.
|
104
104
|
*
|
105
|
-
* - Docs: https://viem.sh/docs/utilities/fromBytes
|
105
|
+
* - Docs: https://viem.sh/docs/utilities/fromBytes#bytestostring
|
106
106
|
*
|
107
107
|
* @param bytes Byte array to decode.
|
108
108
|
* @param opts Options.
|
@@ -19,8 +19,8 @@ export type FromHexErrorType = HexToNumberErrorType | HexToBigIntErrorType | Hex
|
|
19
19
|
/**
|
20
20
|
* Decodes a hex string into a string, number, bigint, boolean, or byte array.
|
21
21
|
*
|
22
|
-
* - Docs: https://viem.sh/docs/utilities/fromHex
|
23
|
-
* - Example: https://viem.sh/docs/utilities/fromHex
|
22
|
+
* - Docs: https://viem.sh/docs/utilities/fromHex
|
23
|
+
* - Example: https://viem.sh/docs/utilities/fromHex#usage
|
24
24
|
*
|
25
25
|
* @param hex Hex string to decode.
|
26
26
|
* @param toOrOpts Type to convert to or options.
|
@@ -55,7 +55,7 @@ export type HexToBigIntErrorType = AssertSizeErrorType | ErrorType;
|
|
55
55
|
/**
|
56
56
|
* Decodes a hex value into a bigint.
|
57
57
|
*
|
58
|
-
* - Docs: https://viem.sh/docs/utilities/fromHex
|
58
|
+
* - Docs: https://viem.sh/docs/utilities/fromHex#hextobigint
|
59
59
|
*
|
60
60
|
* @param hex Hex value to decode.
|
61
61
|
* @param opts Options.
|
@@ -80,7 +80,7 @@ export type HexToBoolErrorType = AssertSizeErrorType | InvalidHexBooleanErrorTyp
|
|
80
80
|
/**
|
81
81
|
* Decodes a hex value into a boolean.
|
82
82
|
*
|
83
|
-
* - Docs: https://viem.sh/docs/utilities/fromHex
|
83
|
+
* - Docs: https://viem.sh/docs/utilities/fromHex#hextobool
|
84
84
|
*
|
85
85
|
* @param hex Hex value to decode.
|
86
86
|
* @param opts Options.
|
@@ -102,7 +102,7 @@ export type HexToNumberErrorType = HexToBigIntErrorType | ErrorType;
|
|
102
102
|
/**
|
103
103
|
* Decodes a hex string into a number.
|
104
104
|
*
|
105
|
-
* - Docs: https://viem.sh/docs/utilities/fromHex
|
105
|
+
* - Docs: https://viem.sh/docs/utilities/fromHex#hextonumber
|
106
106
|
*
|
107
107
|
* @param hex Hex value to decode.
|
108
108
|
* @param opts Options.
|
@@ -127,7 +127,7 @@ export type HexToStringErrorType = AssertSizeErrorType | HexToBytesErrorType | T
|
|
127
127
|
/**
|
128
128
|
* Decodes a hex value into a UTF-8 string.
|
129
129
|
*
|
130
|
-
* - Docs: https://viem.sh/docs/utilities/fromHex
|
130
|
+
* - Docs: https://viem.sh/docs/utilities/fromHex#hextostring
|
131
131
|
*
|
132
132
|
* @param hex Hex value to decode.
|
133
133
|
* @param opts Options.
|
@@ -12,8 +12,8 @@ export type ToBytesErrorType = NumberToBytesErrorType | BoolToBytesErrorType | H
|
|
12
12
|
/**
|
13
13
|
* Encodes a UTF-8 string, hex value, bigint, number or boolean to a byte array.
|
14
14
|
*
|
15
|
-
* - Docs: https://viem.sh/docs/utilities/toBytes
|
16
|
-
* - Example: https://viem.sh/docs/utilities/toBytes
|
15
|
+
* - Docs: https://viem.sh/docs/utilities/toBytes
|
16
|
+
* - Example: https://viem.sh/docs/utilities/toBytes#usage
|
17
17
|
*
|
18
18
|
* @param value Value to encode.
|
19
19
|
* @param opts Options.
|
@@ -43,7 +43,7 @@ export type BoolToBytesErrorType = AssertSizeErrorType | PadErrorType | ErrorTyp
|
|
43
43
|
/**
|
44
44
|
* Encodes a boolean into a byte array.
|
45
45
|
*
|
46
|
-
* - Docs: https://viem.sh/docs/utilities/toBytes
|
46
|
+
* - Docs: https://viem.sh/docs/utilities/toBytes#booltobytes
|
47
47
|
*
|
48
48
|
* @param value Boolean value to encode.
|
49
49
|
* @param opts Options.
|
@@ -68,7 +68,7 @@ export type HexToBytesErrorType = AssertSizeErrorType | PadErrorType | ErrorType
|
|
68
68
|
/**
|
69
69
|
* Encodes a hex string into a byte array.
|
70
70
|
*
|
71
|
-
* - Docs: https://viem.sh/docs/utilities/toBytes
|
71
|
+
* - Docs: https://viem.sh/docs/utilities/toBytes#hextobytes
|
72
72
|
*
|
73
73
|
* @param hex Hex string to encode.
|
74
74
|
* @param opts Options.
|
@@ -89,7 +89,7 @@ export type NumberToBytesErrorType = NumberToHexErrorType | HexToBytesErrorType
|
|
89
89
|
/**
|
90
90
|
* Encodes a number into a byte array.
|
91
91
|
*
|
92
|
-
* - Docs: https://viem.sh/docs/utilities/toBytes
|
92
|
+
* - Docs: https://viem.sh/docs/utilities/toBytes#numbertobytes
|
93
93
|
*
|
94
94
|
* @param value Number to encode.
|
95
95
|
* @param opts Options.
|
@@ -114,7 +114,7 @@ export type StringToBytesErrorType = AssertSizeErrorType | PadErrorType | ErrorT
|
|
114
114
|
/**
|
115
115
|
* Encodes a UTF-8 string into a byte array.
|
116
116
|
*
|
117
|
-
* - Docs: https://viem.sh/docs/utilities/toBytes
|
117
|
+
* - Docs: https://viem.sh/docs/utilities/toBytes#stringtobytes
|
118
118
|
*
|
119
119
|
* @param value String to encode.
|
120
120
|
* @param opts Options.
|
@@ -11,8 +11,8 @@ export type ToHexErrorType = BoolToHexErrorType | BytesToHexErrorType | NumberTo
|
|
11
11
|
/**
|
12
12
|
* Encodes a string, number, bigint, or ByteArray into a hex string
|
13
13
|
*
|
14
|
-
* - Docs: https://viem.sh/docs/utilities/toHex
|
15
|
-
* - Example: https://viem.sh/docs/utilities/toHex
|
14
|
+
* - Docs: https://viem.sh/docs/utilities/toHex
|
15
|
+
* - Example: https://viem.sh/docs/utilities/toHex#usage
|
16
16
|
*
|
17
17
|
* @param value Value to encode.
|
18
18
|
* @param opts Options.
|
@@ -42,7 +42,7 @@ export type BoolToHexErrorType = AssertSizeErrorType | PadErrorType | ErrorType;
|
|
42
42
|
/**
|
43
43
|
* Encodes a boolean into a hex string
|
44
44
|
*
|
45
|
-
* - Docs: https://viem.sh/docs/utilities/toHex
|
45
|
+
* - Docs: https://viem.sh/docs/utilities/toHex#booltohex
|
46
46
|
*
|
47
47
|
* @param value Value to encode.
|
48
48
|
* @param opts Options.
|
@@ -72,7 +72,7 @@ export type BytesToHexErrorType = AssertSizeErrorType | PadErrorType | ErrorType
|
|
72
72
|
/**
|
73
73
|
* Encodes a bytes array into a hex string
|
74
74
|
*
|
75
|
-
* - Docs: https://viem.sh/docs/utilities/toHex
|
75
|
+
* - Docs: https://viem.sh/docs/utilities/toHex#bytestohex
|
76
76
|
*
|
77
77
|
* @param value Value to encode.
|
78
78
|
* @param opts Options.
|
@@ -103,7 +103,7 @@ export type NumberToHexErrorType = IntegerOutOfRangeErrorType | PadErrorType | E
|
|
103
103
|
/**
|
104
104
|
* Encodes a number or bigint into a hex string
|
105
105
|
*
|
106
|
-
* - Docs: https://viem.sh/docs/utilities/toHex
|
106
|
+
* - Docs: https://viem.sh/docs/utilities/toHex#numbertohex
|
107
107
|
*
|
108
108
|
* @param value Value to encode.
|
109
109
|
* @param opts Options.
|
@@ -128,7 +128,7 @@ export type StringToHexErrorType = BytesToHexErrorType | ErrorType;
|
|
128
128
|
/**
|
129
129
|
* Encodes a UTF-8 string into a hex string
|
130
130
|
*
|
131
|
-
* - Docs: https://viem.sh/docs/utilities/toHex
|
131
|
+
* - Docs: https://viem.sh/docs/utilities/toHex#stringtohex
|
132
132
|
*
|
133
133
|
* @param value Value to encode.
|
134
134
|
* @param opts Options.
|
@@ -7,7 +7,7 @@ export type LabelhashErrorType = BytesToHexErrorType | EncodedLabelToLabelhashEr
|
|
7
7
|
/**
|
8
8
|
* @description Hashes ENS label
|
9
9
|
*
|
10
|
-
* - Since ENS labels prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS labels](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `labelhash`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize
|
10
|
+
* - Since ENS labels prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS labels](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `labelhash`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this.
|
11
11
|
*
|
12
12
|
* @example
|
13
13
|
* labelhash('eth')
|