viem 2.15.1 → 2.16.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +36 -0
- package/README.md +17 -11
- package/_cjs/accounts/generateMnemonic.js +1 -2
- package/_cjs/accounts/generateMnemonic.js.map +1 -1
- package/_cjs/accounts/generatePrivateKey.js +1 -2
- package/_cjs/accounts/generatePrivateKey.js.map +1 -1
- package/_cjs/accounts/hdKeyToAccount.js +1 -2
- package/_cjs/accounts/hdKeyToAccount.js.map +1 -1
- package/_cjs/accounts/mnemonicToAccount.js +1 -2
- package/_cjs/accounts/mnemonicToAccount.js.map +1 -1
- package/_cjs/accounts/privateKeyToAccount.js +1 -2
- package/_cjs/accounts/privateKeyToAccount.js.map +1 -1
- package/_cjs/accounts/toAccount.js +1 -2
- package/_cjs/accounts/toAccount.js.map +1 -1
- package/_cjs/accounts/utils/parseAccount.js +1 -2
- package/_cjs/accounts/utils/parseAccount.js.map +1 -1
- package/_cjs/accounts/utils/privateKeyToAddress.js +1 -2
- package/_cjs/accounts/utils/privateKeyToAddress.js.map +1 -1
- package/_cjs/accounts/utils/publicKeyToAddress.js +1 -2
- package/_cjs/accounts/utils/publicKeyToAddress.js.map +1 -1
- package/_cjs/accounts/utils/sign.js +1 -2
- package/_cjs/accounts/utils/sign.js.map +1 -1
- package/_cjs/accounts/utils/signMessage.js +1 -2
- package/_cjs/accounts/utils/signMessage.js.map +1 -1
- package/_cjs/accounts/utils/signTransaction.js +1 -2
- package/_cjs/accounts/utils/signTransaction.js.map +1 -1
- package/_cjs/accounts/utils/signTypedData.js +1 -2
- package/_cjs/accounts/utils/signTypedData.js.map +1 -1
- package/_cjs/actions/ens/getEnsAddress.js +1 -2
- package/_cjs/actions/ens/getEnsAddress.js.map +1 -1
- package/_cjs/actions/ens/getEnsAvatar.js +1 -2
- package/_cjs/actions/ens/getEnsAvatar.js.map +1 -1
- package/_cjs/actions/ens/getEnsName.js +1 -2
- package/_cjs/actions/ens/getEnsName.js.map +1 -1
- package/_cjs/actions/ens/getEnsResolver.js +1 -2
- package/_cjs/actions/ens/getEnsResolver.js.map +1 -1
- package/_cjs/actions/ens/getEnsText.js +1 -2
- package/_cjs/actions/ens/getEnsText.js.map +1 -1
- package/_cjs/actions/getContract.js +3 -4
- package/_cjs/actions/getContract.js.map +1 -1
- package/_cjs/actions/public/call.js +2 -3
- package/_cjs/actions/public/call.js.map +1 -1
- package/_cjs/actions/public/createBlockFilter.js +1 -2
- package/_cjs/actions/public/createBlockFilter.js.map +1 -1
- package/_cjs/actions/public/createContractEventFilter.js +1 -2
- package/_cjs/actions/public/createContractEventFilter.js.map +1 -1
- package/_cjs/actions/public/createEventFilter.js +7 -9
- package/_cjs/actions/public/createEventFilter.js.map +1 -1
- package/_cjs/actions/public/createPendingTransactionFilter.js +1 -2
- package/_cjs/actions/public/createPendingTransactionFilter.js.map +1 -1
- package/_cjs/actions/public/estimateContractGas.js +1 -2
- package/_cjs/actions/public/estimateContractGas.js.map +1 -1
- package/_cjs/actions/public/estimateFeesPerGas.js +2 -3
- package/_cjs/actions/public/estimateFeesPerGas.js.map +1 -1
- package/_cjs/actions/public/estimateGas.js +1 -2
- package/_cjs/actions/public/estimateGas.js.map +1 -1
- package/_cjs/actions/public/estimateMaxPriorityFeePerGas.js +2 -3
- package/_cjs/actions/public/estimateMaxPriorityFeePerGas.js.map +1 -1
- package/_cjs/actions/public/getBalance.js +1 -2
- package/_cjs/actions/public/getBalance.js.map +1 -1
- package/_cjs/actions/public/getBlobBaseFee.js +1 -2
- package/_cjs/actions/public/getBlobBaseFee.js.map +1 -1
- package/_cjs/actions/public/getBlock.js +1 -2
- package/_cjs/actions/public/getBlock.js.map +1 -1
- package/_cjs/actions/public/getBlockNumber.js +2 -3
- package/_cjs/actions/public/getBlockNumber.js.map +1 -1
- package/_cjs/actions/public/getBlockTransactionCount.js +1 -2
- package/_cjs/actions/public/getBlockTransactionCount.js.map +1 -1
- package/_cjs/actions/public/getChainId.js +1 -2
- package/_cjs/actions/public/getChainId.js.map +1 -1
- package/_cjs/actions/public/getCode.js +1 -2
- package/_cjs/actions/public/getCode.js.map +1 -1
- package/_cjs/actions/public/getContractEvents.js +1 -2
- package/_cjs/actions/public/getContractEvents.js.map +1 -1
- package/_cjs/actions/public/getEip712Domain.js +1 -2
- package/_cjs/actions/public/getEip712Domain.js.map +1 -1
- package/_cjs/actions/public/getFeeHistory.js +1 -2
- package/_cjs/actions/public/getFeeHistory.js.map +1 -1
- package/_cjs/actions/public/getFilterChanges.js +1 -2
- package/_cjs/actions/public/getFilterChanges.js.map +1 -1
- package/_cjs/actions/public/getFilterLogs.js +1 -2
- package/_cjs/actions/public/getFilterLogs.js.map +1 -1
- package/_cjs/actions/public/getGasPrice.js +1 -2
- package/_cjs/actions/public/getGasPrice.js.map +1 -1
- package/_cjs/actions/public/getLogs.js +7 -9
- package/_cjs/actions/public/getLogs.js.map +1 -1
- package/_cjs/actions/public/getProof.js +1 -2
- package/_cjs/actions/public/getProof.js.map +1 -1
- package/_cjs/actions/public/getStorageAt.js +1 -2
- package/_cjs/actions/public/getStorageAt.js.map +1 -1
- package/_cjs/actions/public/getTransaction.js +1 -2
- package/_cjs/actions/public/getTransaction.js.map +1 -1
- package/_cjs/actions/public/getTransactionConfirmations.js +1 -2
- package/_cjs/actions/public/getTransactionConfirmations.js.map +1 -1
- package/_cjs/actions/public/getTransactionCount.js +1 -2
- package/_cjs/actions/public/getTransactionCount.js.map +1 -1
- package/_cjs/actions/public/getTransactionReceipt.js +1 -2
- package/_cjs/actions/public/getTransactionReceipt.js.map +1 -1
- package/_cjs/actions/public/multicall.js +1 -2
- package/_cjs/actions/public/multicall.js.map +1 -1
- package/_cjs/actions/public/readContract.js +1 -2
- package/_cjs/actions/public/readContract.js.map +1 -1
- package/_cjs/actions/public/simulateContract.js +1 -2
- package/_cjs/actions/public/simulateContract.js.map +1 -1
- package/_cjs/actions/public/uninstallFilter.js +1 -2
- package/_cjs/actions/public/uninstallFilter.js.map +1 -1
- package/_cjs/actions/public/verifyHash.js +22 -5
- package/_cjs/actions/public/verifyHash.js.map +1 -1
- package/_cjs/actions/public/verifyMessage.js +4 -3
- package/_cjs/actions/public/verifyMessage.js.map +1 -1
- package/_cjs/actions/public/verifyTypedData.js +4 -3
- package/_cjs/actions/public/verifyTypedData.js.map +1 -1
- package/_cjs/actions/public/waitForTransactionReceipt.js +1 -2
- package/_cjs/actions/public/waitForTransactionReceipt.js.map +1 -1
- package/_cjs/actions/public/watchBlockNumber.js +1 -2
- package/_cjs/actions/public/watchBlockNumber.js.map +1 -1
- package/_cjs/actions/public/watchBlocks.js +1 -2
- package/_cjs/actions/public/watchBlocks.js.map +1 -1
- package/_cjs/actions/public/watchContractEvent.js +1 -2
- package/_cjs/actions/public/watchContractEvent.js.map +1 -1
- package/_cjs/actions/public/watchEvent.js +7 -9
- package/_cjs/actions/public/watchEvent.js.map +1 -1
- package/_cjs/actions/public/watchPendingTransactions.js +1 -2
- package/_cjs/actions/public/watchPendingTransactions.js.map +1 -1
- package/_cjs/actions/siwe/verifySiweMessage.js +1 -2
- package/_cjs/actions/siwe/verifySiweMessage.js.map +1 -1
- package/_cjs/actions/test/dropTransaction.js +1 -2
- package/_cjs/actions/test/dropTransaction.js.map +1 -1
- package/_cjs/actions/test/dumpState.js +1 -2
- package/_cjs/actions/test/dumpState.js.map +1 -1
- package/_cjs/actions/test/getAutomine.js +1 -2
- package/_cjs/actions/test/getAutomine.js.map +1 -1
- package/_cjs/actions/test/getTxpoolContent.js +1 -2
- package/_cjs/actions/test/getTxpoolContent.js.map +1 -1
- package/_cjs/actions/test/getTxpoolStatus.js +1 -2
- package/_cjs/actions/test/getTxpoolStatus.js.map +1 -1
- package/_cjs/actions/test/impersonateAccount.js +1 -2
- package/_cjs/actions/test/impersonateAccount.js.map +1 -1
- package/_cjs/actions/test/increaseTime.js +1 -2
- package/_cjs/actions/test/increaseTime.js.map +1 -1
- package/_cjs/actions/test/inspectTxpool.js +1 -2
- package/_cjs/actions/test/inspectTxpool.js.map +1 -1
- package/_cjs/actions/test/loadState.js +1 -2
- package/_cjs/actions/test/loadState.js.map +1 -1
- package/_cjs/actions/test/mine.js +1 -2
- package/_cjs/actions/test/mine.js.map +1 -1
- package/_cjs/actions/test/removeBlockTimestampInterval.js +1 -2
- package/_cjs/actions/test/removeBlockTimestampInterval.js.map +1 -1
- package/_cjs/actions/test/reset.js +1 -2
- package/_cjs/actions/test/reset.js.map +1 -1
- package/_cjs/actions/test/revert.js +1 -2
- package/_cjs/actions/test/revert.js.map +1 -1
- package/_cjs/actions/test/sendUnsignedTransaction.js +1 -2
- package/_cjs/actions/test/sendUnsignedTransaction.js.map +1 -1
- package/_cjs/actions/test/setAutomine.js +1 -2
- package/_cjs/actions/test/setAutomine.js.map +1 -1
- package/_cjs/actions/test/setBalance.js +1 -2
- package/_cjs/actions/test/setBalance.js.map +1 -1
- package/_cjs/actions/test/setBlockGasLimit.js +1 -2
- package/_cjs/actions/test/setBlockGasLimit.js.map +1 -1
- package/_cjs/actions/test/setBlockTimestampInterval.js +1 -2
- package/_cjs/actions/test/setBlockTimestampInterval.js.map +1 -1
- package/_cjs/actions/test/setCode.js +1 -2
- package/_cjs/actions/test/setCode.js.map +1 -1
- package/_cjs/actions/test/setCoinbase.js +1 -2
- package/_cjs/actions/test/setCoinbase.js.map +1 -1
- package/_cjs/actions/test/setIntervalMining.js +1 -2
- package/_cjs/actions/test/setIntervalMining.js.map +1 -1
- package/_cjs/actions/test/setLoggingEnabled.js +1 -2
- package/_cjs/actions/test/setLoggingEnabled.js.map +1 -1
- package/_cjs/actions/test/setMinGasPrice.js +1 -2
- package/_cjs/actions/test/setMinGasPrice.js.map +1 -1
- package/_cjs/actions/test/setNextBlockBaseFeePerGas.js +1 -2
- package/_cjs/actions/test/setNextBlockBaseFeePerGas.js.map +1 -1
- package/_cjs/actions/test/setNextBlockTimestamp.js +1 -2
- package/_cjs/actions/test/setNextBlockTimestamp.js.map +1 -1
- package/_cjs/actions/test/setNonce.js +1 -2
- package/_cjs/actions/test/setNonce.js.map +1 -1
- package/_cjs/actions/test/setRpcUrl.js +1 -2
- package/_cjs/actions/test/setRpcUrl.js.map +1 -1
- package/_cjs/actions/test/setStorageAt.js +1 -2
- package/_cjs/actions/test/setStorageAt.js.map +1 -1
- package/_cjs/actions/test/snapshot.js +1 -2
- package/_cjs/actions/test/snapshot.js.map +1 -1
- package/_cjs/actions/test/stopImpersonatingAccount.js +1 -2
- package/_cjs/actions/test/stopImpersonatingAccount.js.map +1 -1
- package/_cjs/actions/wallet/addChain.js +1 -2
- package/_cjs/actions/wallet/addChain.js.map +1 -1
- package/_cjs/actions/wallet/deployContract.js +1 -2
- package/_cjs/actions/wallet/deployContract.js.map +1 -1
- package/_cjs/actions/wallet/getAddresses.js +1 -2
- package/_cjs/actions/wallet/getAddresses.js.map +1 -1
- package/_cjs/actions/wallet/getPermissions.js +1 -2
- package/_cjs/actions/wallet/getPermissions.js.map +1 -1
- package/_cjs/actions/wallet/prepareTransactionRequest.js +2 -2
- package/_cjs/actions/wallet/prepareTransactionRequest.js.map +1 -1
- package/_cjs/actions/wallet/requestAddresses.js +1 -2
- package/_cjs/actions/wallet/requestAddresses.js.map +1 -1
- package/_cjs/actions/wallet/requestPermissions.js +1 -2
- package/_cjs/actions/wallet/requestPermissions.js.map +1 -1
- package/_cjs/actions/wallet/sendRawTransaction.js +1 -2
- package/_cjs/actions/wallet/sendRawTransaction.js.map +1 -1
- package/_cjs/actions/wallet/sendTransaction.js +2 -2
- package/_cjs/actions/wallet/sendTransaction.js.map +1 -1
- package/_cjs/actions/wallet/signMessage.js +1 -2
- package/_cjs/actions/wallet/signMessage.js.map +1 -1
- package/_cjs/actions/wallet/signTransaction.js +1 -2
- package/_cjs/actions/wallet/signTransaction.js.map +1 -1
- package/_cjs/actions/wallet/signTypedData.js +1 -2
- package/_cjs/actions/wallet/signTypedData.js.map +1 -1
- package/_cjs/actions/wallet/switchChain.js +1 -2
- package/_cjs/actions/wallet/switchChain.js.map +1 -1
- package/_cjs/actions/wallet/watchAsset.js +1 -2
- package/_cjs/actions/wallet/watchAsset.js.map +1 -1
- package/_cjs/actions/wallet/writeContract.js +1 -2
- package/_cjs/actions/wallet/writeContract.js.map +1 -1
- package/_cjs/celo/parsers.js +1 -2
- package/_cjs/celo/parsers.js.map +1 -1
- package/_cjs/celo/serializers.js +4 -4
- package/_cjs/celo/serializers.js.map +1 -1
- package/_cjs/celo/utils.js +4 -5
- package/_cjs/celo/utils.js.map +1 -1
- package/_cjs/chains/definitions/zetachain.js +6 -0
- package/_cjs/chains/definitions/zetachain.js.map +1 -1
- package/_cjs/chains/definitions/zetachainAthensTestnet.js +6 -0
- package/_cjs/chains/definitions/zetachainAthensTestnet.js.map +1 -1
- package/_cjs/chains/definitions/zircuitTestnet.js +27 -0
- package/_cjs/chains/definitions/zircuitTestnet.js.map +1 -0
- package/_cjs/chains/index.js +4 -2
- package/_cjs/chains/index.js.map +1 -1
- package/_cjs/clients/createClient.js +2 -3
- package/_cjs/clients/createClient.js.map +1 -1
- package/_cjs/clients/createPublicClient.js +1 -2
- package/_cjs/clients/createPublicClient.js.map +1 -1
- package/_cjs/clients/createTestClient.js +1 -2
- package/_cjs/clients/createTestClient.js.map +1 -1
- package/_cjs/clients/createWalletClient.js +1 -2
- package/_cjs/clients/createWalletClient.js.map +1 -1
- package/_cjs/clients/decorators/public.js +1 -2
- package/_cjs/clients/decorators/public.js.map +1 -1
- package/_cjs/clients/decorators/test.js +1 -2
- package/_cjs/clients/decorators/test.js.map +1 -1
- package/_cjs/clients/decorators/wallet.js +1 -2
- package/_cjs/clients/decorators/wallet.js.map +1 -1
- package/_cjs/clients/transports/createTransport.js +1 -2
- package/_cjs/clients/transports/createTransport.js.map +1 -1
- package/_cjs/clients/transports/custom.js +1 -2
- package/_cjs/clients/transports/custom.js.map +1 -1
- package/_cjs/clients/transports/fallback.js +2 -3
- package/_cjs/clients/transports/fallback.js.map +1 -1
- package/_cjs/clients/transports/http.js +1 -2
- package/_cjs/clients/transports/http.js.map +1 -1
- package/_cjs/clients/transports/ipc.js +1 -2
- package/_cjs/clients/transports/ipc.js.map +1 -1
- package/_cjs/clients/transports/webSocket.js +1 -2
- package/_cjs/clients/transports/webSocket.js.map +1 -1
- package/_cjs/errors/stateOverride.js +3 -3
- package/_cjs/errors/stateOverride.js.map +1 -1
- package/_cjs/errors/transaction.js +2 -2
- package/_cjs/errors/transaction.js.map +1 -1
- package/_cjs/errors/version.js +1 -1
- package/_cjs/experimental/eip5792/actions/getCallsStatus.js +1 -2
- package/_cjs/experimental/eip5792/actions/getCallsStatus.js.map +1 -1
- package/_cjs/experimental/eip5792/actions/getCapabilities.js +1 -2
- package/_cjs/experimental/eip5792/actions/getCapabilities.js.map +1 -1
- package/_cjs/experimental/eip5792/actions/sendCalls.js +1 -2
- package/_cjs/experimental/eip5792/actions/sendCalls.js.map +1 -1
- package/_cjs/experimental/eip5792/actions/showCallsStatus.js +1 -2
- package/_cjs/experimental/eip5792/actions/showCallsStatus.js.map +1 -1
- package/_cjs/experimental/eip5792/actions/writeContracts.js +1 -2
- package/_cjs/experimental/eip5792/actions/writeContracts.js.map +1 -1
- package/_cjs/experimental/eip5792/decorators/eip5792.js +1 -2
- package/_cjs/experimental/eip5792/decorators/eip5792.js.map +1 -1
- package/_cjs/experimental/erc7715/actions/issuePermissions.js +1 -2
- package/_cjs/experimental/erc7715/actions/issuePermissions.js.map +1 -1
- package/_cjs/experimental/erc7715/decorators/erc7715.js +1 -2
- package/_cjs/experimental/erc7715/decorators/erc7715.js.map +1 -1
- package/_cjs/experimental/index.js +6 -4
- package/_cjs/experimental/index.js.map +1 -1
- package/_cjs/experimental/solady/actions/signMessage.js +39 -0
- package/_cjs/experimental/solady/actions/signMessage.js.map +1 -0
- package/_cjs/experimental/solady/actions/signTypedData.js +62 -0
- package/_cjs/experimental/solady/actions/signTypedData.js.map +1 -0
- package/_cjs/experimental/solady/decorators/solady.js +15 -0
- package/_cjs/experimental/solady/decorators/solady.js.map +1 -0
- package/_cjs/experimental/solady/index.js +16 -0
- package/_cjs/experimental/solady/index.js.map +1 -0
- package/_cjs/experimental/solady/types.js +3 -0
- package/_cjs/experimental/solady/types.js.map +1 -0
- package/_cjs/experimental/solady/utils/hashMessage.js +19 -0
- package/_cjs/experimental/solady/utils/hashMessage.js.map +1 -0
- package/_cjs/experimental/solady/utils/hashTypedData.js +31 -0
- package/_cjs/experimental/solady/utils/hashTypedData.js.map +1 -0
- package/_cjs/experimental/solady/utils/wrapTypedDataSignature.js +44 -0
- package/_cjs/experimental/solady/utils/wrapTypedDataSignature.js.map +1 -0
- package/_cjs/index.js +11 -3
- package/_cjs/index.js.map +1 -1
- package/_cjs/op-stack/actions/buildDepositTransaction.js +1 -2
- package/_cjs/op-stack/actions/buildDepositTransaction.js.map +1 -1
- package/_cjs/op-stack/actions/buildInitiateWithdrawal.js +1 -2
- package/_cjs/op-stack/actions/buildInitiateWithdrawal.js.map +1 -1
- package/_cjs/op-stack/actions/buildProveWithdrawal.js +2 -3
- package/_cjs/op-stack/actions/buildProveWithdrawal.js.map +1 -1
- package/_cjs/op-stack/actions/depositTransaction.js +1 -2
- package/_cjs/op-stack/actions/depositTransaction.js.map +1 -1
- package/_cjs/op-stack/actions/estimateContractL1Fee.js +1 -2
- package/_cjs/op-stack/actions/estimateContractL1Fee.js.map +1 -1
- package/_cjs/op-stack/actions/estimateContractL1Gas.js +1 -2
- package/_cjs/op-stack/actions/estimateContractL1Gas.js.map +1 -1
- package/_cjs/op-stack/actions/estimateContractTotalFee.js +1 -2
- package/_cjs/op-stack/actions/estimateContractTotalFee.js.map +1 -1
- package/_cjs/op-stack/actions/estimateContractTotalGas.js +1 -2
- package/_cjs/op-stack/actions/estimateContractTotalGas.js.map +1 -1
- package/_cjs/op-stack/actions/estimateDepositTransactionGas.js +1 -2
- package/_cjs/op-stack/actions/estimateDepositTransactionGas.js.map +1 -1
- package/_cjs/op-stack/actions/estimateFinalizeWithdrawalGas.js +1 -2
- package/_cjs/op-stack/actions/estimateFinalizeWithdrawalGas.js.map +1 -1
- package/_cjs/op-stack/actions/estimateInitiateWithdrawalGas.js +1 -2
- package/_cjs/op-stack/actions/estimateInitiateWithdrawalGas.js.map +1 -1
- package/_cjs/op-stack/actions/estimateL1Fee.js +1 -2
- package/_cjs/op-stack/actions/estimateL1Fee.js.map +1 -1
- package/_cjs/op-stack/actions/estimateL1Gas.js +1 -2
- package/_cjs/op-stack/actions/estimateL1Gas.js.map +1 -1
- package/_cjs/op-stack/actions/estimateProveWithdrawalGas.js +1 -2
- package/_cjs/op-stack/actions/estimateProveWithdrawalGas.js.map +1 -1
- package/_cjs/op-stack/actions/estimateTotalFee.js +1 -2
- package/_cjs/op-stack/actions/estimateTotalFee.js.map +1 -1
- package/_cjs/op-stack/actions/estimateTotalGas.js +1 -2
- package/_cjs/op-stack/actions/estimateTotalGas.js.map +1 -1
- package/_cjs/op-stack/actions/finalizeWithdrawal.js +1 -2
- package/_cjs/op-stack/actions/finalizeWithdrawal.js.map +1 -1
- package/_cjs/op-stack/actions/getGame.js +1 -2
- package/_cjs/op-stack/actions/getGame.js.map +1 -1
- package/_cjs/op-stack/actions/getGames.js +1 -2
- package/_cjs/op-stack/actions/getGames.js.map +1 -1
- package/_cjs/op-stack/actions/getL1BaseFee.js +1 -2
- package/_cjs/op-stack/actions/getL1BaseFee.js.map +1 -1
- package/_cjs/op-stack/actions/getL2Output.js +1 -2
- package/_cjs/op-stack/actions/getL2Output.js.map +1 -1
- package/_cjs/op-stack/actions/getPortalVersion.js +1 -2
- package/_cjs/op-stack/actions/getPortalVersion.js.map +1 -1
- package/_cjs/op-stack/actions/getTimeToFinalize.js +1 -2
- package/_cjs/op-stack/actions/getTimeToFinalize.js.map +1 -1
- package/_cjs/op-stack/actions/getTimeToNextGame.js +1 -2
- package/_cjs/op-stack/actions/getTimeToNextGame.js.map +1 -1
- package/_cjs/op-stack/actions/getTimeToNextL2Output.js +1 -2
- package/_cjs/op-stack/actions/getTimeToNextL2Output.js.map +1 -1
- package/_cjs/op-stack/actions/getTimeToProve.js +1 -2
- package/_cjs/op-stack/actions/getTimeToProve.js.map +1 -1
- package/_cjs/op-stack/actions/getWithdrawalStatus.js +1 -2
- package/_cjs/op-stack/actions/getWithdrawalStatus.js.map +1 -1
- package/_cjs/op-stack/actions/initiateWithdrawal.js +1 -2
- package/_cjs/op-stack/actions/initiateWithdrawal.js.map +1 -1
- package/_cjs/op-stack/actions/proveWithdrawal.js +1 -2
- package/_cjs/op-stack/actions/proveWithdrawal.js.map +1 -1
- package/_cjs/op-stack/actions/waitForNextGame.js +1 -2
- package/_cjs/op-stack/actions/waitForNextGame.js.map +1 -1
- package/_cjs/op-stack/actions/waitForNextL2Output.js +1 -2
- package/_cjs/op-stack/actions/waitForNextL2Output.js.map +1 -1
- package/_cjs/op-stack/actions/waitToFinalize.js +1 -2
- package/_cjs/op-stack/actions/waitToFinalize.js.map +1 -1
- package/_cjs/op-stack/actions/waitToProve.js +1 -2
- package/_cjs/op-stack/actions/waitToProve.js.map +1 -1
- package/_cjs/op-stack/decorators/publicL1.js +1 -2
- package/_cjs/op-stack/decorators/publicL1.js.map +1 -1
- package/_cjs/op-stack/decorators/publicL2.js +1 -2
- package/_cjs/op-stack/decorators/publicL2.js.map +1 -1
- package/_cjs/op-stack/decorators/walletL1.js +1 -2
- package/_cjs/op-stack/decorators/walletL1.js.map +1 -1
- package/_cjs/op-stack/decorators/walletL2.js +1 -2
- package/_cjs/op-stack/decorators/walletL2.js.map +1 -1
- package/_cjs/op-stack/parsers.js +1 -2
- package/_cjs/op-stack/parsers.js.map +1 -1
- package/_cjs/op-stack/serializers.js +3 -3
- package/_cjs/op-stack/serializers.js.map +1 -1
- package/_cjs/op-stack/utils/extractTransactionDepositedLogs.js +1 -2
- package/_cjs/op-stack/utils/extractTransactionDepositedLogs.js.map +1 -1
- package/_cjs/op-stack/utils/extractWithdrawalMessageLogs.js +1 -2
- package/_cjs/op-stack/utils/extractWithdrawalMessageLogs.js.map +1 -1
- package/_cjs/op-stack/utils/getL2TransactionHash.js +1 -2
- package/_cjs/op-stack/utils/getL2TransactionHash.js.map +1 -1
- package/_cjs/op-stack/utils/getL2TransactionHashes.js +1 -2
- package/_cjs/op-stack/utils/getL2TransactionHashes.js.map +1 -1
- package/_cjs/op-stack/utils/getSourceHash.js +1 -2
- package/_cjs/op-stack/utils/getSourceHash.js.map +1 -1
- package/_cjs/op-stack/utils/getWithdrawalHashStorageSlot.js +1 -2
- package/_cjs/op-stack/utils/getWithdrawalHashStorageSlot.js.map +1 -1
- package/_cjs/op-stack/utils/getWithdrawals.js +1 -2
- package/_cjs/op-stack/utils/getWithdrawals.js.map +1 -1
- package/_cjs/op-stack/utils/opaqueDataToDepositData.js +1 -2
- package/_cjs/op-stack/utils/opaqueDataToDepositData.js.map +1 -1
- package/_cjs/utils/abi/decodeAbiParameters.js +1 -2
- package/_cjs/utils/abi/decodeAbiParameters.js.map +1 -1
- package/_cjs/utils/abi/decodeDeployData.js +1 -2
- package/_cjs/utils/abi/decodeDeployData.js.map +1 -1
- package/_cjs/utils/abi/decodeErrorResult.js +1 -2
- package/_cjs/utils/abi/decodeErrorResult.js.map +1 -1
- package/_cjs/utils/abi/decodeEventLog.js +1 -2
- package/_cjs/utils/abi/decodeEventLog.js.map +1 -1
- package/_cjs/utils/abi/decodeFunctionData.js +1 -2
- package/_cjs/utils/abi/decodeFunctionData.js.map +1 -1
- package/_cjs/utils/abi/decodeFunctionResult.js +1 -2
- package/_cjs/utils/abi/decodeFunctionResult.js.map +1 -1
- package/_cjs/utils/abi/encodeAbiParameters.js +2 -3
- package/_cjs/utils/abi/encodeAbiParameters.js.map +1 -1
- package/_cjs/utils/abi/encodeDeployData.js +1 -2
- package/_cjs/utils/abi/encodeDeployData.js.map +1 -1
- package/_cjs/utils/abi/encodeErrorResult.js +1 -2
- package/_cjs/utils/abi/encodeErrorResult.js.map +1 -1
- package/_cjs/utils/abi/encodeEventTopics.js +6 -7
- package/_cjs/utils/abi/encodeEventTopics.js.map +1 -1
- package/_cjs/utils/abi/encodeFunctionData.js +1 -2
- package/_cjs/utils/abi/encodeFunctionData.js.map +1 -1
- package/_cjs/utils/abi/encodeFunctionResult.js +1 -2
- package/_cjs/utils/abi/encodeFunctionResult.js.map +1 -1
- package/_cjs/utils/abi/encodePacked.js +1 -2
- package/_cjs/utils/abi/encodePacked.js.map +1 -1
- package/_cjs/utils/abi/formatAbiItem.js +2 -3
- package/_cjs/utils/abi/formatAbiItem.js.map +1 -1
- package/_cjs/utils/abi/formatAbiItemWithArgs.js +1 -2
- package/_cjs/utils/abi/formatAbiItemWithArgs.js.map +1 -1
- package/_cjs/utils/abi/getAbiItem.js +3 -4
- package/_cjs/utils/abi/getAbiItem.js.map +1 -1
- package/_cjs/utils/abi/parseEventLogs.js +1 -2
- package/_cjs/utils/abi/parseEventLogs.js.map +1 -1
- package/_cjs/utils/abi/prepareEncodeFunctionData.js +1 -2
- package/_cjs/utils/abi/prepareEncodeFunctionData.js.map +1 -1
- package/_cjs/utils/address/getAddress.js +2 -3
- package/_cjs/utils/address/getAddress.js.map +1 -1
- package/_cjs/utils/address/getContractAddress.js +3 -4
- package/_cjs/utils/address/getContractAddress.js.map +1 -1
- package/_cjs/utils/address/isAddress.js +2 -2
- package/_cjs/utils/address/isAddress.js.map +1 -1
- package/_cjs/utils/address/isAddressEqual.js +1 -2
- package/_cjs/utils/address/isAddressEqual.js.map +1 -1
- package/_cjs/utils/blob/blobsToCommitments.js +1 -2
- package/_cjs/utils/blob/blobsToCommitments.js.map +1 -1
- package/_cjs/utils/blob/blobsToProofs.js +1 -2
- package/_cjs/utils/blob/blobsToProofs.js.map +1 -1
- package/_cjs/utils/blob/commitmentToVersionedHash.js +1 -2
- package/_cjs/utils/blob/commitmentToVersionedHash.js.map +1 -1
- package/_cjs/utils/blob/commitmentsToVersionedHashes.js +1 -2
- package/_cjs/utils/blob/commitmentsToVersionedHashes.js.map +1 -1
- package/_cjs/utils/blob/fromBlobs.js +1 -2
- package/_cjs/utils/blob/fromBlobs.js.map +1 -1
- package/_cjs/utils/blob/sidecarsToVersionedHashes.js +1 -2
- package/_cjs/utils/blob/sidecarsToVersionedHashes.js.map +1 -1
- package/_cjs/utils/blob/toBlobSidecars.js +1 -2
- package/_cjs/utils/blob/toBlobSidecars.js.map +1 -1
- package/_cjs/utils/blob/toBlobs.js +1 -2
- package/_cjs/utils/blob/toBlobs.js.map +1 -1
- package/_cjs/utils/buildRequest.js +2 -3
- package/_cjs/utils/buildRequest.js.map +1 -1
- package/_cjs/utils/ccip.js +3 -3
- package/_cjs/utils/ccip.js.map +1 -1
- package/_cjs/utils/chain/assertCurrentChain.js +1 -2
- package/_cjs/utils/chain/assertCurrentChain.js.map +1 -1
- package/_cjs/utils/chain/defineChain.js +1 -2
- package/_cjs/utils/chain/defineChain.js.map +1 -1
- package/_cjs/utils/chain/extractChain.js +1 -2
- package/_cjs/utils/chain/extractChain.js.map +1 -1
- package/_cjs/utils/chain/getChainContractAddress.js +1 -2
- package/_cjs/utils/chain/getChainContractAddress.js.map +1 -1
- package/_cjs/utils/cursor.js +1 -2
- package/_cjs/utils/cursor.js.map +1 -1
- package/_cjs/utils/data/concat.js +3 -4
- package/_cjs/utils/data/concat.js.map +1 -1
- package/_cjs/utils/data/isBytes.js +1 -2
- package/_cjs/utils/data/isBytes.js.map +1 -1
- package/_cjs/utils/data/isBytesEqual.js +1 -2
- package/_cjs/utils/data/isBytesEqual.js.map +1 -1
- package/_cjs/utils/data/isHex.js +1 -2
- package/_cjs/utils/data/isHex.js.map +1 -1
- package/_cjs/utils/data/pad.js +3 -4
- package/_cjs/utils/data/pad.js.map +1 -1
- package/_cjs/utils/data/size.js +1 -2
- package/_cjs/utils/data/size.js.map +1 -1
- package/_cjs/utils/data/slice.js +3 -4
- package/_cjs/utils/data/slice.js.map +1 -1
- package/_cjs/utils/data/trim.js +1 -2
- package/_cjs/utils/data/trim.js.map +1 -1
- package/_cjs/utils/encoding/fromBytes.js +5 -6
- package/_cjs/utils/encoding/fromBytes.js.map +1 -1
- package/_cjs/utils/encoding/fromHex.js +6 -7
- package/_cjs/utils/encoding/fromHex.js.map +1 -1
- package/_cjs/utils/encoding/fromRlp.js +1 -2
- package/_cjs/utils/encoding/fromRlp.js.map +1 -1
- package/_cjs/utils/encoding/toBytes.js +5 -6
- package/_cjs/utils/encoding/toBytes.js.map +1 -1
- package/_cjs/utils/encoding/toHex.js +5 -6
- package/_cjs/utils/encoding/toHex.js.map +1 -1
- package/_cjs/utils/encoding/toRlp.js +3 -4
- package/_cjs/utils/encoding/toRlp.js.map +1 -1
- package/_cjs/utils/ens/avatar/parseAvatarRecord.js +1 -2
- package/_cjs/utils/ens/avatar/parseAvatarRecord.js.map +1 -1
- package/_cjs/utils/ens/avatar/utils.js +8 -9
- package/_cjs/utils/ens/avatar/utils.js.map +1 -1
- package/_cjs/utils/ens/encodeLabelhash.js +1 -2
- package/_cjs/utils/ens/encodeLabelhash.js.map +1 -1
- package/_cjs/utils/ens/encodedLabelToLabelhash.js +1 -2
- package/_cjs/utils/ens/encodedLabelToLabelhash.js.map +1 -1
- package/_cjs/utils/ens/errors.js +1 -2
- package/_cjs/utils/ens/errors.js.map +1 -1
- package/_cjs/utils/ens/labelhash.js +1 -2
- package/_cjs/utils/ens/labelhash.js.map +1 -1
- package/_cjs/utils/ens/namehash.js +1 -2
- package/_cjs/utils/ens/namehash.js.map +1 -1
- package/_cjs/utils/ens/normalize.js +1 -2
- package/_cjs/utils/ens/normalize.js.map +1 -1
- package/_cjs/utils/ens/packetToBytes.js +1 -2
- package/_cjs/utils/ens/packetToBytes.js.map +1 -1
- package/_cjs/utils/errors/getCallError.js +1 -2
- package/_cjs/utils/errors/getCallError.js.map +1 -1
- package/_cjs/utils/errors/getContractError.js +1 -2
- package/_cjs/utils/errors/getContractError.js.map +1 -1
- package/_cjs/utils/errors/getEstimateGasError.js +1 -2
- package/_cjs/utils/errors/getEstimateGasError.js.map +1 -1
- package/_cjs/utils/errors/getNodeError.js +2 -3
- package/_cjs/utils/errors/getNodeError.js.map +1 -1
- package/_cjs/utils/errors/getTransactionError.js +1 -2
- package/_cjs/utils/errors/getTransactionError.js.map +1 -1
- package/_cjs/utils/filters/createFilterRequestScope.js +1 -2
- package/_cjs/utils/filters/createFilterRequestScope.js.map +1 -1
- package/_cjs/utils/formatters/block.js +2 -2
- package/_cjs/utils/formatters/block.js.map +1 -1
- package/_cjs/utils/formatters/extract.js +1 -2
- package/_cjs/utils/formatters/extract.js.map +1 -1
- package/_cjs/utils/formatters/feeHistory.js +1 -2
- package/_cjs/utils/formatters/feeHistory.js.map +1 -1
- package/_cjs/utils/formatters/formatter.js +1 -2
- package/_cjs/utils/formatters/formatter.js.map +1 -1
- package/_cjs/utils/formatters/log.js +1 -2
- package/_cjs/utils/formatters/log.js.map +1 -1
- package/_cjs/utils/formatters/proof.js +1 -2
- package/_cjs/utils/formatters/proof.js.map +1 -1
- package/_cjs/utils/formatters/transaction.js +2 -2
- package/_cjs/utils/formatters/transaction.js.map +1 -1
- package/_cjs/utils/formatters/transactionReceipt.js +2 -2
- package/_cjs/utils/formatters/transactionReceipt.js.map +1 -1
- package/_cjs/utils/formatters/transactionRequest.js +2 -2
- package/_cjs/utils/formatters/transactionRequest.js.map +1 -1
- package/_cjs/utils/getAction.js +9 -6
- package/_cjs/utils/getAction.js.map +1 -1
- package/_cjs/utils/hash/hashSignature.js +1 -2
- package/_cjs/utils/hash/hashSignature.js.map +1 -1
- package/_cjs/utils/hash/isHash.js +1 -2
- package/_cjs/utils/hash/isHash.js.map +1 -1
- package/_cjs/utils/hash/keccak256.js +1 -2
- package/_cjs/utils/hash/keccak256.js.map +1 -1
- package/_cjs/utils/hash/normalizeSignature.js +1 -2
- package/_cjs/utils/hash/normalizeSignature.js.map +1 -1
- package/_cjs/utils/hash/ripemd160.js +1 -2
- package/_cjs/utils/hash/ripemd160.js.map +1 -1
- package/_cjs/utils/hash/sha256.js +1 -2
- package/_cjs/utils/hash/sha256.js.map +1 -1
- package/_cjs/utils/hash/toSignatureHash.js +1 -2
- package/_cjs/utils/hash/toSignatureHash.js.map +1 -1
- package/_cjs/utils/index.js +7 -1
- package/_cjs/utils/index.js.map +1 -1
- package/_cjs/utils/kzg/defineKzg.js +1 -2
- package/_cjs/utils/kzg/defineKzg.js.map +1 -1
- package/_cjs/utils/kzg/setupKzg.js +1 -2
- package/_cjs/utils/kzg/setupKzg.js.map +1 -1
- package/_cjs/utils/nonceManager.js +3 -3
- package/_cjs/utils/nonceManager.js.map +1 -1
- package/_cjs/utils/observe.js +2 -2
- package/_cjs/utils/observe.js.map +1 -1
- package/_cjs/utils/poll.js +1 -2
- package/_cjs/utils/poll.js.map +1 -1
- package/_cjs/utils/promise/createBatchScheduler.js +1 -2
- package/_cjs/utils/promise/createBatchScheduler.js.map +1 -1
- package/_cjs/utils/promise/withCache.js +3 -3
- package/_cjs/utils/promise/withCache.js.map +1 -1
- package/_cjs/utils/promise/withDedupe.js +2 -2
- package/_cjs/utils/promise/withDedupe.js.map +1 -1
- package/_cjs/utils/promise/withRetry.js +1 -2
- package/_cjs/utils/promise/withRetry.js.map +1 -1
- package/_cjs/utils/promise/withTimeout.js +1 -2
- package/_cjs/utils/promise/withTimeout.js.map +1 -1
- package/_cjs/utils/rpc/compat.js +2 -2
- package/_cjs/utils/rpc/compat.js.map +1 -1
- package/_cjs/utils/rpc/http.js +1 -2
- package/_cjs/utils/rpc/http.js.map +1 -1
- package/_cjs/utils/rpc/ipc.js +2 -3
- package/_cjs/utils/rpc/ipc.js.map +1 -1
- package/_cjs/utils/rpc/socket.js +2 -2
- package/_cjs/utils/rpc/socket.js.map +1 -1
- package/_cjs/utils/rpc/webSocket.js +1 -2
- package/_cjs/utils/rpc/webSocket.js.map +1 -1
- package/_cjs/utils/signature/compactSignatureToSignature.js +1 -2
- package/_cjs/utils/signature/compactSignatureToSignature.js.map +1 -1
- package/_cjs/utils/signature/hashMessage.js +3 -14
- package/_cjs/utils/signature/hashMessage.js.map +1 -1
- package/_cjs/utils/signature/hashTypedData.js +4 -3
- package/_cjs/utils/signature/hashTypedData.js.map +1 -1
- package/_cjs/{experimental/erc6492 → utils/signature}/isErc6492Signature.js +2 -3
- package/_cjs/utils/signature/isErc6492Signature.js.map +1 -0
- package/_cjs/utils/signature/parseCompactSignature.js +1 -2
- package/_cjs/utils/signature/parseCompactSignature.js.map +1 -1
- package/_cjs/{experimental/erc6492 → utils/signature}/parseErc6492Signature.js +2 -3
- package/_cjs/utils/signature/parseErc6492Signature.js.map +1 -0
- package/_cjs/utils/signature/parseSignature.js +1 -2
- package/_cjs/utils/signature/parseSignature.js.map +1 -1
- package/_cjs/utils/signature/recoverAddress.js +1 -2
- package/_cjs/utils/signature/recoverAddress.js.map +1 -1
- package/_cjs/utils/signature/recoverMessageAddress.js +1 -2
- package/_cjs/utils/signature/recoverMessageAddress.js.map +1 -1
- package/_cjs/utils/signature/recoverPublicKey.js +1 -2
- package/_cjs/utils/signature/recoverPublicKey.js.map +1 -1
- package/_cjs/utils/signature/recoverTransactionAddress.js +1 -2
- package/_cjs/utils/signature/recoverTransactionAddress.js.map +1 -1
- package/_cjs/utils/signature/recoverTypedDataAddress.js +1 -2
- package/_cjs/utils/signature/recoverTypedDataAddress.js.map +1 -1
- package/_cjs/utils/signature/serializeCompactSignature.js +1 -2
- package/_cjs/utils/signature/serializeCompactSignature.js.map +1 -1
- package/_cjs/{experimental/erc6492 → utils/signature}/serializeErc6492Signature.js +3 -4
- package/_cjs/utils/signature/serializeErc6492Signature.js.map +1 -0
- package/_cjs/utils/signature/serializeSignature.js +1 -2
- package/_cjs/utils/signature/serializeSignature.js.map +1 -1
- package/_cjs/utils/signature/signatureToCompactSignature.js +1 -2
- package/_cjs/utils/signature/signatureToCompactSignature.js.map +1 -1
- package/_cjs/utils/signature/toPrefixedMessage.js +19 -0
- package/_cjs/utils/signature/toPrefixedMessage.js.map +1 -0
- package/_cjs/utils/signature/verifyMessage.js +1 -2
- package/_cjs/utils/signature/verifyMessage.js.map +1 -1
- package/_cjs/utils/signature/verifyTypedData.js +1 -2
- package/_cjs/utils/signature/verifyTypedData.js.map +1 -1
- package/_cjs/utils/siwe/createSiweMessage.js +1 -2
- package/_cjs/utils/siwe/createSiweMessage.js.map +1 -1
- package/_cjs/utils/siwe/generateSiweNonce.js +1 -2
- package/_cjs/utils/siwe/generateSiweNonce.js.map +1 -1
- package/_cjs/utils/siwe/parseSiweMessage.js +1 -2
- package/_cjs/utils/siwe/parseSiweMessage.js.map +1 -1
- package/_cjs/utils/siwe/utils.js +1 -2
- package/_cjs/utils/siwe/utils.js.map +1 -1
- package/_cjs/utils/siwe/validateSiweMessage.js +1 -2
- package/_cjs/utils/siwe/validateSiweMessage.js.map +1 -1
- package/_cjs/utils/stateOverride.js +3 -4
- package/_cjs/utils/stateOverride.js.map +1 -1
- package/_cjs/utils/transaction/assertRequest.js +1 -2
- package/_cjs/utils/transaction/assertRequest.js.map +1 -1
- package/_cjs/utils/transaction/assertTransaction.js +4 -5
- package/_cjs/utils/transaction/assertTransaction.js.map +1 -1
- package/_cjs/utils/transaction/getSerializedTransactionType.js +1 -2
- package/_cjs/utils/transaction/getSerializedTransactionType.js.map +1 -1
- package/_cjs/utils/transaction/getTransactionType.js +1 -2
- package/_cjs/utils/transaction/getTransactionType.js.map +1 -1
- package/_cjs/utils/transaction/parseTransaction.js +3 -4
- package/_cjs/utils/transaction/parseTransaction.js.map +1 -1
- package/_cjs/utils/transaction/serializeAccessList.js +1 -2
- package/_cjs/utils/transaction/serializeAccessList.js.map +1 -1
- package/_cjs/utils/transaction/serializeTransaction.js +2 -3
- package/_cjs/utils/transaction/serializeTransaction.js.map +1 -1
- package/_cjs/utils/typedData.js +4 -5
- package/_cjs/utils/typedData.js.map +1 -1
- package/_cjs/utils/uid.js +1 -2
- package/_cjs/utils/uid.js.map +1 -1
- package/_cjs/utils/unit/formatEther.js +1 -2
- package/_cjs/utils/unit/formatEther.js.map +1 -1
- package/_cjs/utils/unit/formatGwei.js +1 -2
- package/_cjs/utils/unit/formatGwei.js.map +1 -1
- package/_cjs/utils/unit/formatUnits.js +1 -2
- package/_cjs/utils/unit/formatUnits.js.map +1 -1
- package/_cjs/utils/unit/parseEther.js +1 -2
- package/_cjs/utils/unit/parseEther.js.map +1 -1
- package/_cjs/utils/unit/parseGwei.js +1 -2
- package/_cjs/utils/unit/parseGwei.js.map +1 -1
- package/_cjs/utils/unit/parseUnits.js +1 -2
- package/_cjs/utils/unit/parseUnits.js.map +1 -1
- package/_cjs/utils/wait.js +1 -2
- package/_cjs/utils/wait.js.map +1 -1
- package/_cjs/zksync/actions/deployContract.js +1 -2
- package/_cjs/zksync/actions/deployContract.js.map +1 -1
- package/_cjs/zksync/actions/estimateFee.js +1 -2
- package/_cjs/zksync/actions/estimateFee.js.map +1 -1
- package/_cjs/zksync/actions/estimateGasL1ToL2.js +1 -2
- package/_cjs/zksync/actions/estimateGasL1ToL2.js.map +1 -1
- package/_cjs/zksync/actions/getAllBalances.js +1 -2
- package/_cjs/zksync/actions/getAllBalances.js.map +1 -1
- package/_cjs/zksync/actions/getBaseTokenL1Address.js +1 -2
- package/_cjs/zksync/actions/getBaseTokenL1Address.js.map +1 -1
- package/_cjs/zksync/actions/getBlockDetails.js +1 -2
- package/_cjs/zksync/actions/getBlockDetails.js.map +1 -1
- package/_cjs/zksync/actions/getBridgehubContractAddress.js +1 -2
- package/_cjs/zksync/actions/getBridgehubContractAddress.js.map +1 -1
- package/_cjs/zksync/actions/getDefaultBridgeAddresses.js +1 -2
- package/_cjs/zksync/actions/getDefaultBridgeAddresses.js.map +1 -1
- package/_cjs/zksync/actions/getL1Allowance.js +1 -2
- package/_cjs/zksync/actions/getL1Allowance.js.map +1 -1
- package/_cjs/zksync/actions/getL1Balance.js +1 -2
- package/_cjs/zksync/actions/getL1Balance.js.map +1 -1
- package/_cjs/zksync/actions/getL1BatchBlockRange.js +1 -2
- package/_cjs/zksync/actions/getL1BatchBlockRange.js.map +1 -1
- package/_cjs/zksync/actions/getL1BatchDetails.js +1 -2
- package/_cjs/zksync/actions/getL1BatchDetails.js.map +1 -1
- package/_cjs/zksync/actions/getL1BatchNumber.js +1 -2
- package/_cjs/zksync/actions/getL1BatchNumber.js.map +1 -1
- package/_cjs/zksync/actions/getL1ChainId.js +1 -2
- package/_cjs/zksync/actions/getL1ChainId.js.map +1 -1
- package/_cjs/zksync/actions/getL1TokenBalance.js +1 -2
- package/_cjs/zksync/actions/getL1TokenBalance.js.map +1 -1
- package/_cjs/zksync/actions/getLogProof.js +1 -2
- package/_cjs/zksync/actions/getLogProof.js.map +1 -1
- package/_cjs/zksync/actions/getMainContractAddress.js +1 -2
- package/_cjs/zksync/actions/getMainContractAddress.js.map +1 -1
- package/_cjs/zksync/actions/getRawBlockTransactions.js +1 -2
- package/_cjs/zksync/actions/getRawBlockTransactions.js.map +1 -1
- package/_cjs/zksync/actions/getTestnetPaymasterAddress.js +1 -2
- package/_cjs/zksync/actions/getTestnetPaymasterAddress.js.map +1 -1
- package/_cjs/zksync/actions/getTransactionDetails.js +1 -2
- package/_cjs/zksync/actions/getTransactionDetails.js.map +1 -1
- package/_cjs/zksync/actions/sendEip712Transaction.js +1 -2
- package/_cjs/zksync/actions/sendEip712Transaction.js.map +1 -1
- package/_cjs/zksync/actions/sendTransaction.js +1 -2
- package/_cjs/zksync/actions/sendTransaction.js.map +1 -1
- package/_cjs/zksync/actions/signEip712Transaction.js +1 -2
- package/_cjs/zksync/actions/signEip712Transaction.js.map +1 -1
- package/_cjs/zksync/actions/signTransaction.js +1 -2
- package/_cjs/zksync/actions/signTransaction.js.map +1 -1
- package/_cjs/zksync/decorators/eip712.js +1 -2
- package/_cjs/zksync/decorators/eip712.js.map +1 -1
- package/_cjs/zksync/decorators/publicL1.js +1 -2
- package/_cjs/zksync/decorators/publicL1.js.map +1 -1
- package/_cjs/zksync/decorators/publicL2.js +1 -2
- package/_cjs/zksync/decorators/publicL2.js.map +1 -1
- package/_cjs/zksync/serializers.js +2 -2
- package/_cjs/zksync/serializers.js.map +1 -1
- package/_cjs/zksync/utils/abi/encodeDeployData.js +1 -2
- package/_cjs/zksync/utils/abi/encodeDeployData.js.map +1 -1
- package/_cjs/zksync/utils/assertEip712Request.js +1 -2
- package/_cjs/zksync/utils/assertEip712Request.js.map +1 -1
- package/_cjs/zksync/utils/assertEip712Transaction.js +1 -2
- package/_cjs/zksync/utils/assertEip712Transaction.js.map +1 -1
- package/_cjs/zksync/utils/camelCaseKeys.js +1 -2
- package/_cjs/zksync/utils/camelCaseKeys.js.map +1 -1
- package/_cjs/zksync/utils/hashBytecode.js +1 -2
- package/_cjs/zksync/utils/hashBytecode.js.map +1 -1
- package/_cjs/zksync/utils/isEip712Transaction.js +1 -2
- package/_cjs/zksync/utils/isEip712Transaction.js.map +1 -1
- package/_cjs/zksync/utils/isEth.js +1 -2
- package/_cjs/zksync/utils/isEth.js.map +1 -1
- package/_cjs/zksync/utils/paymaster/getApprovalBasedPaymasterInput.js +1 -2
- package/_cjs/zksync/utils/paymaster/getApprovalBasedPaymasterInput.js.map +1 -1
- package/_cjs/zksync/utils/paymaster/getGeneralPaymasterInput.js +1 -2
- package/_cjs/zksync/utils/paymaster/getGeneralPaymasterInput.js.map +1 -1
- package/_esm/actions/public/createEventFilter.js +7 -7
- package/_esm/actions/public/createEventFilter.js.map +1 -1
- package/_esm/actions/public/getLogs.js +7 -7
- package/_esm/actions/public/getLogs.js.map +1 -1
- package/_esm/actions/public/getTransactionCount.js +1 -1
- package/_esm/actions/public/verifyHash.js +27 -3
- package/_esm/actions/public/verifyHash.js.map +1 -1
- package/_esm/actions/public/verifyMessage.js +3 -1
- package/_esm/actions/public/verifyMessage.js.map +1 -1
- package/_esm/actions/public/verifyTypedData.js +3 -1
- package/_esm/actions/public/verifyTypedData.js.map +1 -1
- package/_esm/actions/public/watchEvent.js +7 -7
- package/_esm/actions/public/watchEvent.js.map +1 -1
- package/_esm/actions/wallet/sendTransaction.js +1 -0
- package/_esm/actions/wallet/sendTransaction.js.map +1 -1
- package/_esm/chains/definitions/zetachain.js +6 -0
- package/_esm/chains/definitions/zetachain.js.map +1 -1
- package/_esm/chains/definitions/zetachainAthensTestnet.js +6 -0
- package/_esm/chains/definitions/zetachainAthensTestnet.js.map +1 -1
- package/_esm/chains/definitions/zircuitTestnet.js +24 -0
- package/_esm/chains/definitions/zircuitTestnet.js.map +1 -0
- package/_esm/chains/index.js +1 -0
- package/_esm/chains/index.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_esm/experimental/index.js +10 -3
- package/_esm/experimental/index.js.map +1 -1
- package/_esm/experimental/solady/actions/signMessage.js +84 -0
- package/_esm/experimental/solady/actions/signMessage.js.map +1 -0
- package/_esm/experimental/solady/actions/signTypedData.js +160 -0
- package/_esm/experimental/solady/actions/signTypedData.js.map +1 -0
- package/_esm/experimental/solady/decorators/solady.js +27 -0
- package/_esm/experimental/solady/decorators/solady.js.map +1 -0
- package/_esm/experimental/solady/index.js +8 -0
- package/_esm/experimental/solady/index.js.map +1 -0
- package/_esm/experimental/solady/types.js +2 -0
- package/_esm/experimental/solady/types.js.map +1 -0
- package/_esm/experimental/solady/utils/hashMessage.js +32 -0
- package/_esm/experimental/solady/utils/hashMessage.js.map +1 -0
- package/_esm/experimental/solady/utils/hashTypedData.js +72 -0
- package/_esm/experimental/solady/utils/hashTypedData.js.map +1 -0
- package/_esm/experimental/solady/utils/wrapTypedDataSignature.js +82 -0
- package/_esm/experimental/solady/utils/wrapTypedDataSignature.js.map +1 -0
- package/_esm/index.js +4 -0
- package/_esm/index.js.map +1 -1
- package/_esm/utils/abi/encodeEventTopics.js +5 -5
- package/_esm/utils/abi/encodeEventTopics.js.map +1 -1
- package/_esm/utils/getAction.js +11 -7
- package/_esm/utils/getAction.js.map +1 -1
- package/_esm/utils/index.js +3 -0
- package/_esm/utils/index.js.map +1 -1
- package/_esm/utils/signature/hashMessage.js +2 -12
- package/_esm/utils/signature/hashMessage.js.map +1 -1
- package/_esm/utils/signature/hashTypedData.js +2 -2
- package/_esm/utils/signature/hashTypedData.js.map +1 -1
- package/_esm/{experimental/erc6492 → utils/signature}/isErc6492Signature.js +1 -1
- package/_esm/utils/signature/isErc6492Signature.js.map +1 -0
- package/_esm/{experimental/erc6492 → utils/signature}/parseErc6492Signature.js +1 -1
- package/_esm/utils/signature/parseErc6492Signature.js.map +1 -0
- package/_esm/{experimental/erc6492 → utils/signature}/serializeErc6492Signature.js +2 -2
- package/_esm/utils/signature/serializeErc6492Signature.js.map +1 -0
- package/_esm/utils/signature/toPrefixedMessage.js +16 -0
- package/_esm/utils/signature/toPrefixedMessage.js.map +1 -0
- package/_types/actions/public/getTransactionCount.d.ts +1 -1
- package/_types/actions/public/verifyHash.d.ts +6 -2
- package/_types/actions/public/verifyHash.d.ts.map +1 -1
- package/_types/actions/public/verifyMessage.d.ts +1 -1
- package/_types/actions/public/verifyMessage.d.ts.map +1 -1
- package/_types/actions/public/verifyTypedData.d.ts.map +1 -1
- package/_types/actions/wallet/sendTransaction.d.ts.map +1 -1
- package/_types/celo/chainConfig.d.ts +1086 -1086
- package/_types/celo/formatters.d.ts +543 -543
- package/_types/celo/formatters.d.ts.map +1 -1
- package/_types/chains/definitions/ancient8.d.ts +260 -260
- package/_types/chains/definitions/ancient8Sepolia.d.ts +260 -260
- package/_types/chains/definitions/base.d.ts +260 -260
- package/_types/chains/definitions/baseGoerli.d.ts +260 -260
- package/_types/chains/definitions/baseSepolia.d.ts +260 -260
- package/_types/chains/definitions/celo.d.ts +1086 -1086
- package/_types/chains/definitions/celoAlfajores.d.ts +1086 -1086
- package/_types/chains/definitions/fraxtal.d.ts +260 -260
- package/_types/chains/definitions/fraxtalTestnet.d.ts +260 -260
- package/_types/chains/definitions/funkiSepolia.d.ts +260 -260
- package/_types/chains/definitions/lisk.d.ts +315 -315
- package/_types/chains/definitions/liskSepolia.d.ts +260 -260
- package/_types/chains/definitions/metalL2.d.ts +260 -260
- package/_types/chains/definitions/optimism.d.ts +260 -260
- package/_types/chains/definitions/optimismGoerli.d.ts +260 -260
- package/_types/chains/definitions/optimismSepolia.d.ts +260 -260
- package/_types/chains/definitions/pgn.d.ts +260 -260
- package/_types/chains/definitions/pgnTestnet.d.ts +260 -260
- package/_types/chains/definitions/playfiAlbireo.d.ts +315 -315
- package/_types/chains/definitions/rss3.d.ts +260 -260
- package/_types/chains/definitions/rss3Sepolia.d.ts +260 -260
- package/_types/chains/definitions/zetachain.d.ts +6 -8
- package/_types/chains/definitions/zetachain.d.ts.map +1 -1
- package/_types/chains/definitions/zetachainAthensTestnet.d.ts +6 -8
- package/_types/chains/definitions/zetachainAthensTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/zircuitTestnet.d.ts +33 -0
- package/_types/chains/definitions/zircuitTestnet.d.ts.map +1 -0
- package/_types/chains/definitions/zkSync.d.ts +315 -315
- package/_types/chains/definitions/zkSyncInMemoryNode.d.ts +315 -315
- package/_types/chains/definitions/zkSyncLocalNode.d.ts +315 -315
- package/_types/chains/definitions/zkSyncSepoliaTestnet.d.ts +315 -315
- package/_types/chains/definitions/zkSyncTestnet.d.ts +315 -315
- package/_types/chains/definitions/zora.d.ts +260 -260
- package/_types/chains/definitions/zoraSepolia.d.ts +260 -260
- package/_types/chains/definitions/zoraTestnet.d.ts +260 -260
- package/_types/chains/index.d.ts +1 -0
- package/_types/chains/index.d.ts.map +1 -1
- package/_types/errors/version.d.ts +1 -1
- package/_types/experimental/eip5792/decorators/eip5792.d.ts.map +1 -1
- package/_types/experimental/erc7715/decorators/erc7715.d.ts.map +1 -1
- package/_types/experimental/index.d.ts +28 -3
- package/_types/experimental/index.d.ts.map +1 -1
- package/_types/experimental/solady/actions/signMessage.d.ts +71 -0
- package/_types/experimental/solady/actions/signMessage.d.ts.map +1 -0
- package/_types/experimental/solady/actions/signTypedData.d.ts +125 -0
- package/_types/experimental/solady/actions/signTypedData.d.ts.map +1 -0
- package/_types/experimental/solady/decorators/solady.d.ts +183 -0
- package/_types/experimental/solady/decorators/solady.d.ts.map +1 -0
- package/_types/experimental/solady/index.d.ts +7 -0
- package/_types/experimental/solady/index.d.ts.map +1 -0
- package/_types/experimental/solady/types.d.ts +7 -0
- package/_types/experimental/solady/types.d.ts.map +1 -0
- package/_types/experimental/solady/utils/hashMessage.d.ts +30 -0
- package/_types/experimental/solady/utils/hashMessage.d.ts.map +1 -0
- package/_types/experimental/solady/utils/hashTypedData.d.ts +59 -0
- package/_types/experimental/solady/utils/hashTypedData.d.ts.map +1 -0
- package/_types/experimental/solady/utils/wrapTypedDataSignature.d.ts +50 -0
- package/_types/experimental/solady/utils/wrapTypedDataSignature.d.ts.map +1 -0
- package/_types/index.d.ts +5 -1
- package/_types/index.d.ts.map +1 -1
- package/_types/op-stack/chainConfig.d.ts +260 -260
- package/_types/op-stack/decorators/publicL1.d.ts.map +1 -1
- package/_types/op-stack/decorators/publicL2.d.ts.map +1 -1
- package/_types/op-stack/decorators/walletL1.d.ts.map +1 -1
- package/_types/op-stack/decorators/walletL2.d.ts.map +1 -1
- package/_types/op-stack/formatters.d.ts +260 -260
- package/_types/op-stack/formatters.d.ts.map +1 -1
- package/_types/utils/abi/decodeFunctionData.d.ts +1 -1
- package/_types/utils/abi/decodeFunctionData.d.ts.map +1 -1
- package/_types/utils/abi/encodeEventTopics.d.ts +3 -1
- package/_types/utils/abi/encodeEventTopics.d.ts.map +1 -1
- package/_types/utils/formatters/block.d.ts.map +1 -1
- package/_types/utils/formatters/formatter.d.ts +2 -2
- package/_types/utils/formatters/formatter.d.ts.map +1 -1
- package/_types/utils/formatters/log.d.ts.map +1 -1
- package/_types/utils/formatters/proof.d.ts.map +1 -1
- package/_types/utils/formatters/transaction.d.ts +127 -126
- package/_types/utils/formatters/transaction.d.ts.map +1 -1
- package/_types/utils/formatters/transactionRequest.d.ts +67 -66
- package/_types/utils/formatters/transactionRequest.d.ts.map +1 -1
- package/_types/utils/getAction.d.ts +9 -1
- package/_types/utils/getAction.d.ts.map +1 -1
- package/_types/utils/index.d.ts +4 -1
- package/_types/utils/index.d.ts.map +1 -1
- package/_types/utils/rpc/compat.d.ts.map +1 -1
- package/_types/utils/rpc/ipc.d.ts +0 -2
- package/_types/utils/rpc/ipc.d.ts.map +1 -1
- package/_types/utils/signature/hashMessage.d.ts +1 -3
- package/_types/utils/signature/hashMessage.d.ts.map +1 -1
- package/_types/utils/signature/hashTypedData.d.ts +9 -0
- package/_types/utils/signature/hashTypedData.d.ts.map +1 -1
- package/_types/{experimental/erc6492 → utils/signature}/isErc6492Signature.d.ts +1 -1
- package/_types/utils/signature/isErc6492Signature.d.ts.map +1 -0
- package/_types/{experimental/erc6492 → utils/signature}/parseErc6492Signature.d.ts +1 -1
- package/_types/utils/signature/parseErc6492Signature.d.ts.map +1 -0
- package/_types/utils/signature/serializeErc6492Signature.d.ts.map +1 -0
- package/_types/utils/signature/toPrefixedMessage.d.ts +7 -0
- package/_types/utils/signature/toPrefixedMessage.d.ts.map +1 -0
- package/_types/zksync/chainConfig.d.ts +315 -315
- package/_types/zksync/decorators/eip712.d.ts.map +1 -1
- package/_types/zksync/decorators/publicL1.d.ts.map +1 -1
- package/_types/zksync/decorators/publicL2.d.ts.map +1 -1
- package/_types/zksync/formatters.d.ts +315 -315
- package/_types/zksync/formatters.d.ts.map +1 -1
- package/actions/public/createEventFilter.ts +9 -9
- package/actions/public/getLogs.ts +9 -9
- package/actions/public/getTransactionCount.ts +1 -1
- package/actions/public/verifyHash.ts +31 -4
- package/actions/public/verifyMessage.ts +10 -1
- package/actions/public/verifyTypedData.ts +4 -0
- package/actions/public/watchEvent.ts +9 -9
- package/actions/wallet/sendTransaction.ts +1 -0
- package/chains/definitions/zetachain.ts +6 -0
- package/chains/definitions/zetachainAthensTestnet.ts +6 -0
- package/chains/definitions/zircuitTestnet.ts +24 -0
- package/chains/index.ts +1 -0
- package/errors/version.ts +1 -1
- package/experimental/index.ts +21 -3
- package/experimental/solady/actions/signMessage.ts +151 -0
- package/experimental/solady/actions/signTypedData.ts +251 -0
- package/experimental/solady/decorators/solady.ts +232 -0
- package/experimental/solady/index.ts +36 -0
- package/experimental/solady/types.ts +7 -0
- package/experimental/solady/utils/hashMessage.ts +60 -0
- package/experimental/solady/utils/hashTypedData.ts +112 -0
- package/experimental/solady/utils/wrapTypedDataSignature.ts +108 -0
- package/index.ts +23 -0
- package/package.json +10 -2
- package/utils/abi/encodeEventTopics.ts +13 -11
- package/utils/getAction.ts +31 -15
- package/utils/index.ts +19 -0
- package/utils/signature/hashMessage.ts +3 -23
- package/utils/signature/hashTypedData.ts +2 -2
- package/{experimental/erc6492 → utils/signature}/isErc6492Signature.ts +1 -1
- package/{experimental/erc6492 → utils/signature}/parseErc6492Signature.ts +1 -1
- package/{experimental/erc6492 → utils/signature}/serializeErc6492Signature.ts +2 -2
- package/utils/signature/toPrefixedMessage.ts +27 -0
- package/_cjs/experimental/erc6492/isErc6492Signature.js.map +0 -1
- package/_cjs/experimental/erc6492/parseErc6492Signature.js.map +0 -1
- package/_cjs/experimental/erc6492/serializeErc6492Signature.js.map +0 -1
- package/_esm/experimental/erc6492/isErc6492Signature.js.map +0 -1
- package/_esm/experimental/erc6492/parseErc6492Signature.js.map +0 -1
- package/_esm/experimental/erc6492/serializeErc6492Signature.js.map +0 -1
- package/_types/experimental/erc6492/isErc6492Signature.d.ts.map +0 -1
- package/_types/experimental/erc6492/parseErc6492Signature.d.ts.map +0 -1
- package/_types/experimental/erc6492/serializeErc6492Signature.d.ts.map +0 -1
- /package/_types/{experimental/erc6492 → utils/signature}/serializeErc6492Signature.d.ts +0 -0
@@ -0,0 +1,160 @@
|
|
1
|
+
import { parseAccount } from '../../../accounts/utils/parseAccount.js';
|
2
|
+
import { getEip712Domain, } from '../../../actions/public/getEip712Domain.js';
|
3
|
+
import { signTypedData as signTypedData_ } from '../../../actions/wallet/signTypedData.js';
|
4
|
+
import { AccountNotFoundError } from '../../../errors/account.js';
|
5
|
+
import { getAction } from '../../../utils/getAction.js';
|
6
|
+
import { wrapTypedDataSignature } from '../utils/wrapTypedDataSignature.js';
|
7
|
+
/**
|
8
|
+
* Signs an [EIP-712](https://eips.ethereum.org/EIPS/eip-712) typed data message via Solady's [ERC1271 `TypedDataSign` format](https://github.com/Vectorized/solady/blob/678c9163550810b08f0ffb09624c9f7532392303/src/accounts/ERC1271.sol#L130-L151).
|
9
|
+
*
|
10
|
+
* This Action is suitable to sign messages for Smart Accounts that implement (or conform to) Solady's [ERC1271.sol](https://github.com/Vectorized/solady/blob/main/src/accounts/ERC1271.sol).
|
11
|
+
*
|
12
|
+
* - Docs: https://viem.sh/experimental/solady/signTypedData
|
13
|
+
*
|
14
|
+
* @param client - Client to use
|
15
|
+
* @param parameters - {@link SignTypedDataParameters}
|
16
|
+
* @returns The signed data. {@link SignTypedDataReturnType}
|
17
|
+
*
|
18
|
+
* @example
|
19
|
+
* import { createWalletClient, custom } from 'viem'
|
20
|
+
* import { mainnet } from 'viem/chains'
|
21
|
+
* import { signTypedData } from 'viem/experimental/solady'
|
22
|
+
*
|
23
|
+
* const client = createWalletClient({
|
24
|
+
* chain: mainnet,
|
25
|
+
* transport: custom(window.ethereum),
|
26
|
+
* })
|
27
|
+
* const signature = await signTypedData(client, {
|
28
|
+
* account: '0xE8Df82fA4E10e6A12a9Dab552bceA2acd26De9bb',
|
29
|
+
* domain: {
|
30
|
+
* name: 'Ether Mail',
|
31
|
+
* version: '1',
|
32
|
+
* chainId: 1,
|
33
|
+
* verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC',
|
34
|
+
* },
|
35
|
+
* types: {
|
36
|
+
* Person: [
|
37
|
+
* { name: 'name', type: 'string' },
|
38
|
+
* { name: 'wallet', type: 'address' },
|
39
|
+
* ],
|
40
|
+
* Mail: [
|
41
|
+
* { name: 'from', type: 'Person' },
|
42
|
+
* { name: 'to', type: 'Person' },
|
43
|
+
* { name: 'contents', type: 'string' },
|
44
|
+
* ],
|
45
|
+
* },
|
46
|
+
* primaryType: 'Mail',
|
47
|
+
* message: {
|
48
|
+
* from: {
|
49
|
+
* name: 'Cow',
|
50
|
+
* wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826',
|
51
|
+
* },
|
52
|
+
* to: {
|
53
|
+
* name: 'Bob',
|
54
|
+
* wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB',
|
55
|
+
* },
|
56
|
+
* contents: 'Hello, Bob!',
|
57
|
+
* },
|
58
|
+
* verifier: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
|
59
|
+
* })
|
60
|
+
*
|
61
|
+
* @example
|
62
|
+
* // Account Hoisting
|
63
|
+
* import { createWalletClient, http } from 'viem'
|
64
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
65
|
+
* import { mainnet } from 'viem/chains'
|
66
|
+
* import { signTypedData } from 'viem/experimental/solady'
|
67
|
+
*
|
68
|
+
* const client = createWalletClient({
|
69
|
+
* account: '0xE8Df82fA4E10e6A12a9Dab552bceA2acd26De9bb'
|
70
|
+
* chain: mainnet,
|
71
|
+
* transport: http(),
|
72
|
+
* })
|
73
|
+
* const signature = await signTypedData(client, {
|
74
|
+
* domain: {
|
75
|
+
* name: 'Ether Mail',
|
76
|
+
* version: '1',
|
77
|
+
* chainId: 1,
|
78
|
+
* verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC',
|
79
|
+
* },
|
80
|
+
* types: {
|
81
|
+
* Person: [
|
82
|
+
* { name: 'name', type: 'string' },
|
83
|
+
* { name: 'wallet', type: 'address' },
|
84
|
+
* ],
|
85
|
+
* Mail: [
|
86
|
+
* { name: 'from', type: 'Person' },
|
87
|
+
* { name: 'to', type: 'Person' },
|
88
|
+
* { name: 'contents', type: 'string' },
|
89
|
+
* ],
|
90
|
+
* },
|
91
|
+
* primaryType: 'Mail',
|
92
|
+
* message: {
|
93
|
+
* from: {
|
94
|
+
* name: 'Cow',
|
95
|
+
* wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826',
|
96
|
+
* },
|
97
|
+
* to: {
|
98
|
+
* name: 'Bob',
|
99
|
+
* wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB',
|
100
|
+
* },
|
101
|
+
* contents: 'Hello, Bob!',
|
102
|
+
* },
|
103
|
+
* verifier: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
|
104
|
+
* })
|
105
|
+
*/
|
106
|
+
export async function signTypedData(client, parameters) {
|
107
|
+
const { account: account_ = client.account, domain, factory, factoryData, message, primaryType, types, verifier, } = parameters;
|
108
|
+
if (!account_)
|
109
|
+
throw new AccountNotFoundError({
|
110
|
+
docsPath: '/experimental/solady/signTypedData',
|
111
|
+
});
|
112
|
+
const account = parseAccount(account_);
|
113
|
+
// Retrieve account EIP712 domain.
|
114
|
+
const { domain: verifierDomain, fields, extensions, } = await (async () => {
|
115
|
+
if (parameters.verifierDomain && parameters.fields && parameters.extensions)
|
116
|
+
return {
|
117
|
+
domain: parameters.verifierDomain,
|
118
|
+
fields: parameters.fields,
|
119
|
+
extensions: parameters.extensions,
|
120
|
+
};
|
121
|
+
return getAction(client, getEip712Domain, 'getEip712Domain')({
|
122
|
+
address: verifier,
|
123
|
+
factory,
|
124
|
+
factoryData,
|
125
|
+
});
|
126
|
+
})();
|
127
|
+
// Sign with typed data wrapper.
|
128
|
+
const signature = await getAction(client, signTypedData_, 'signTypedData')({
|
129
|
+
account,
|
130
|
+
domain,
|
131
|
+
types: {
|
132
|
+
...types,
|
133
|
+
TypedDataSign: [
|
134
|
+
{ name: 'contents', type: primaryType },
|
135
|
+
{ name: 'fields', type: 'bytes1' },
|
136
|
+
{ name: 'name', type: 'string' },
|
137
|
+
{ name: 'version', type: 'string' },
|
138
|
+
{ name: 'chainId', type: 'uint256' },
|
139
|
+
{ name: 'verifyingContract', type: 'address' },
|
140
|
+
{ name: 'salt', type: 'bytes32' },
|
141
|
+
{ name: 'extensions', type: 'uint256[]' },
|
142
|
+
],
|
143
|
+
},
|
144
|
+
primaryType: 'TypedDataSign',
|
145
|
+
message: {
|
146
|
+
contents: message,
|
147
|
+
fields,
|
148
|
+
extensions,
|
149
|
+
...verifierDomain,
|
150
|
+
},
|
151
|
+
});
|
152
|
+
return wrapTypedDataSignature({
|
153
|
+
domain,
|
154
|
+
message,
|
155
|
+
primaryType,
|
156
|
+
signature,
|
157
|
+
types,
|
158
|
+
});
|
159
|
+
}
|
160
|
+
//# sourceMappingURL=signTypedData.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"signTypedData.js","sourceRoot":"","sources":["../../../../experimental/solady/actions/signTypedData.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAA;AACtE,OAAO,EAEL,eAAe,GAChB,MAAM,4CAA4C,CAAA;AACnD,OAAO,EAAE,aAAa,IAAI,cAAc,EAAE,MAAM,0CAA0C,CAAA;AAG1F,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAOjE,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAA;AAEvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAA;AAuC3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkGG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAOjC,MAAyC,EACzC,UAKC;IAED,MAAM,EACJ,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAClC,MAAM,EACN,OAAO,EACP,WAAW,EACX,OAAO,EACP,WAAW,EACX,KAAK,EACL,QAAQ,GACT,GAAG,UAAgD,CAAA;IAEpD,IAAI,CAAC,QAAQ;QACX,MAAM,IAAI,oBAAoB,CAAC;YAC7B,QAAQ,EAAE,oCAAoC;SAC/C,CAAC,CAAA;IACJ,MAAM,OAAO,GAAG,YAAY,CAAC,QAAS,CAAC,CAAA;IAEvC,kCAAkC;IAClC,MAAM,EACJ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I,cAAsB;SAC3B;KACF,CAAC,CAAA;IAEF,OAAO,sBAAsB,CAAC;QAC5B,MAAM;QACN,OAAO;QACP,WAAW;QACX,SAAS;QACT,KAAK;KACN,CAAC,CAAA;AACJ,CAAC"}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { signMessage, } from '../actions/signMessage.js';
|
2
|
+
import { signTypedData, } from '../actions/signTypedData.js';
|
3
|
+
/**
|
4
|
+
* A suite of Actions based on [Solady contracts](https://github.com/Vectorized/solady).
|
5
|
+
*
|
6
|
+
* @example
|
7
|
+
* import { createPublicClient, createWalletClient, http } from 'viem'
|
8
|
+
* import { mainnet } from 'viem/chains'
|
9
|
+
* import { soladyActions } from 'viem/experimental'
|
10
|
+
*
|
11
|
+
* const walletClient = createWalletClient({
|
12
|
+
* chain: mainnet,
|
13
|
+
* transport: http(),
|
14
|
+
* }).extend(soladyActions())
|
15
|
+
*
|
16
|
+
* const result = await walletClient.signMessage({...})
|
17
|
+
*/
|
18
|
+
export function soladyActions(parameters = {}) {
|
19
|
+
const { verifier } = parameters;
|
20
|
+
return (client) => {
|
21
|
+
return {
|
22
|
+
signMessage: (parameters) => signMessage(client, { verifier, ...parameters }),
|
23
|
+
signTypedData: (parameters) => signTypedData(client, { verifier, ...parameters }),
|
24
|
+
};
|
25
|
+
};
|
26
|
+
}
|
27
|
+
//# sourceMappingURL=solady.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"solady.js","sourceRoot":"","sources":["../../../../experimental/solady/decorators/solady.ts"],"names":[],"mappings":"AAKA,OAAO,EAGL,WAAW,GACZ,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAGL,aAAa,GACd,MAAM,6BAA6B,CAAA;AAwLpC;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,aAAa,CAC3B,aAAgD,EAAE;IAElD,MAAM,EAAE,QAAQ,EAAE,GAAG,UAAU,CAAA;IAC/B,OAAO,CAKL,MAAyC,EACP,EAAE;QACpC,OAAO;YACL,WAAW,EAAE,CAAC,UAAU,EAAE,EAAE,CAC1B,WAAW,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,CAAC;YAClD,aAAa,EAAE,CAAC,UAAU,EAAE,EAAE,CAC5B,aAAa,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,GAAI,UAAkB,EAAE,CAAC;SAC9D,CAAA;IACH,CAAC,CAAA;AACH,CAAC"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
// biome-ignore lint/performance/noBarrelFile: entrypoint
|
2
|
+
export { signMessage, } from './actions/signMessage.js';
|
3
|
+
export { signTypedData, } from './actions/signTypedData.js';
|
4
|
+
export { soladyActions, } from './decorators/solady.js';
|
5
|
+
export { hashMessage, } from './utils/hashMessage.js';
|
6
|
+
export { hashTypedData, } from './utils/hashTypedData.js';
|
7
|
+
export { wrapTypedDataSignature, } from './utils/wrapTypedDataSignature.js';
|
8
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../experimental/solady/index.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,OAAO,EAIL,WAAW,GACZ,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAIL,aAAa,GACd,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAGL,aAAa,GACd,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAIL,WAAW,GACZ,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAIL,aAAa,GACd,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAIL,sBAAsB,GACvB,MAAM,mCAAmC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../experimental/solady/types.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { hashTypedData } from '../../../utils/index.js';
|
2
|
+
import { toPrefixedMessage, } from '../../../utils/signature/toPrefixedMessage.js';
|
3
|
+
/**
|
4
|
+
* Generates a signable hash for a Solady ERC-1271 personal sign message.
|
5
|
+
*
|
6
|
+
* @example
|
7
|
+
* ```ts
|
8
|
+
* const hash = hashMessage({
|
9
|
+
* message: 'hello world',
|
10
|
+
* verifierDomain: {
|
11
|
+
* name: 'Smart Account',
|
12
|
+
* version: '1',
|
13
|
+
* verifyingContract: '0x1234567890abcdef1234567890abcdef12345678',
|
14
|
+
* chainId: 1,
|
15
|
+
* },
|
16
|
+
* })
|
17
|
+
* ```
|
18
|
+
*/
|
19
|
+
export function hashMessage(parameters) {
|
20
|
+
const { message, verifierDomain: { salt, ...domain }, } = parameters;
|
21
|
+
return hashTypedData({
|
22
|
+
domain,
|
23
|
+
types: {
|
24
|
+
PersonalSign: [{ name: 'prefixed', type: 'bytes' }],
|
25
|
+
},
|
26
|
+
primaryType: 'PersonalSign',
|
27
|
+
message: {
|
28
|
+
prefixed: toPrefixedMessage(message),
|
29
|
+
},
|
30
|
+
});
|
31
|
+
}
|
32
|
+
//# sourceMappingURL=hashMessage.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"hashMessage.js","sourceRoot":"","sources":["../../../../experimental/solady/utils/hashMessage.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAEvD,OAAO,EAEL,iBAAiB,GAClB,MAAM,+CAA+C,CAAA;AAiBtD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,WAAW,CACzB,UAAiC;IAEjC,MAAM,EACJ,OAAO,EACP,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,MAAM,EAAE,GACpC,GAAG,UAAU,CAAA;IACd,OAAO,aAAa,CAAC;QACnB,MAAM;QACN,KAAK,EAAE;YACL,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;SACpD;QACD,WAAW,EAAE,cAAc;QAC3B,OAAO,EAAE;YACP,QAAQ,EAAE,iBAAiB,CAAC,OAAO,CAAC;SACrC;KACF,CAAC,CAAA;AACJ,CAAC"}
|
@@ -0,0 +1,72 @@
|
|
1
|
+
import { hashTypedData as hashTypedData_, } from '../../../utils/signature/hashTypedData.js';
|
2
|
+
/**
|
3
|
+
* Generates a signable hash for Solady ERC-1271 typed data.
|
4
|
+
*
|
5
|
+
* @example
|
6
|
+
* ```ts
|
7
|
+
* const hash = hashTypedData({
|
8
|
+
* domain: {
|
9
|
+
* name: 'Ether Mail',
|
10
|
+
* version: '1',
|
11
|
+
* chainId: 1,
|
12
|
+
* verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC',
|
13
|
+
* },
|
14
|
+
* types: {
|
15
|
+
* Person: [
|
16
|
+
* { name: 'name', type: 'string' },
|
17
|
+
* { name: 'wallet', type: 'address' },
|
18
|
+
* ],
|
19
|
+
* Mail: [
|
20
|
+
* { name: 'from', type: 'Person' },
|
21
|
+
* { name: 'to', type: 'Person' },
|
22
|
+
* { name: 'contents', type: 'string' },
|
23
|
+
* ],
|
24
|
+
* },
|
25
|
+
* primaryType: 'Mail',
|
26
|
+
* message: {
|
27
|
+
* from: {
|
28
|
+
* name: 'Cow',
|
29
|
+
* wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826',
|
30
|
+
* },
|
31
|
+
* to: {
|
32
|
+
* name: 'Bob',
|
33
|
+
* wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB',
|
34
|
+
* },
|
35
|
+
* contents: 'Hello, Bob!',
|
36
|
+
* },
|
37
|
+
* verifierDomain: {
|
38
|
+
* name: 'Smart Account',
|
39
|
+
* version: '1',
|
40
|
+
* verifyingContract: '0x1234567890abcdef1234567890abcdef12345678',
|
41
|
+
* chainId: 1,
|
42
|
+
* },
|
43
|
+
* })
|
44
|
+
* ```
|
45
|
+
*/
|
46
|
+
export function hashTypedData(parameters) {
|
47
|
+
const { domain, extensions, fields, message, primaryType, types, verifierDomain, } = parameters;
|
48
|
+
return hashTypedData_({
|
49
|
+
domain: domain,
|
50
|
+
types: {
|
51
|
+
...types,
|
52
|
+
TypedDataSign: [
|
53
|
+
{ name: 'contents', type: primaryType },
|
54
|
+
{ name: 'fields', type: 'bytes1' },
|
55
|
+
{ name: 'name', type: 'string' },
|
56
|
+
{ name: 'version', type: 'string' },
|
57
|
+
{ name: 'chainId', type: 'uint256' },
|
58
|
+
{ name: 'verifyingContract', type: 'address' },
|
59
|
+
{ name: 'salt', type: 'bytes32' },
|
60
|
+
{ name: 'extensions', type: 'uint256[]' },
|
61
|
+
],
|
62
|
+
},
|
63
|
+
primaryType: 'TypedDataSign',
|
64
|
+
message: {
|
65
|
+
contents: message,
|
66
|
+
fields,
|
67
|
+
extensions,
|
68
|
+
...verifierDomain,
|
69
|
+
},
|
70
|
+
});
|
71
|
+
}
|
72
|
+
//# sourceMappingURL=hashTypedData.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"hashTypedData.js","sourceRoot":"","sources":["../../../../experimental/solady/utils/hashTypedData.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,aAAa,IAAI,cAAc,GAChC,MAAM,2CAA2C,CAAA;AAoBlD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,MAAM,UAAU,aAAa,CAI3B,UAA2D;IAE3D,MAAM,EACJ,MAAM,EACN,UAAU,EACV,MAAM,EACN,OAAO,EACP,WAAW,EACX,KAAK,EACL,cAAc,GACf,GAAG,UAAU,CAAA;IAEd,OAAO,cAAc,CAAC;QACpB,MAAM,EAAE,MAAa;QACrB,KAAK,EAAE;YACL,GAAG,KAAK;YACR,aAAa,EAAE;gBACb,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,EAAE;gBACvC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE;gBAClC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;gBAChC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACnC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;gBACpC,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,SAAS,EAAE;gBAC9C,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE;gBACjC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,WAAW,EAAE;aAC1C;SACF;QACD,WAAW,EAAE,eAAe;QAC5B,OAAO,EAAE;YACP,QAAQ,EAAE,OAAc;YACxB,MAAM;YACN,UAAU;YACV,GAAI,cAAsB;SAC3B;KACF,CAAC,CAAA;AACJ,CAAC"}
|
@@ -0,0 +1,82 @@
|
|
1
|
+
import { serializeSignature } from '../../../accounts/index.js';
|
2
|
+
import { encodePacked } from '../../../utils/abi/encodePacked.js';
|
3
|
+
import { isHex } from '../../../utils/data/isHex.js';
|
4
|
+
import { size } from '../../../utils/data/size.js';
|
5
|
+
import { bytesToHex, stringToHex } from '../../../utils/encoding/toHex.js';
|
6
|
+
import { encodeType, hashStruct, } from '../../../utils/signature/hashTypedData.js';
|
7
|
+
import { getTypesForEIP712Domain } from '../../../utils/typedData.js';
|
8
|
+
/**
|
9
|
+
* Wraps a typed data signature for Solady's ERC-1271 implementation.
|
10
|
+
*
|
11
|
+
* @example
|
12
|
+
* ```ts
|
13
|
+
* const signature = wrapTypedDataSignature({
|
14
|
+
* domain: {
|
15
|
+
* name: 'Ether Mail',
|
16
|
+
* version: '1',
|
17
|
+
* chainId: 1,
|
18
|
+
* verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC',
|
19
|
+
* },
|
20
|
+
* types: {
|
21
|
+
* Person: [
|
22
|
+
* { name: 'name', type: 'string' },
|
23
|
+
* { name: 'wallet', type: 'address' },
|
24
|
+
* ],
|
25
|
+
* Mail: [
|
26
|
+
* { name: 'from', type: 'Person' },
|
27
|
+
* { name: 'to', type: 'Person' },
|
28
|
+
* { name: 'contents', type: 'string' },
|
29
|
+
* ],
|
30
|
+
* },
|
31
|
+
* primaryType: 'Mail',
|
32
|
+
* message: {
|
33
|
+
* from: {
|
34
|
+
* name: 'Cow',
|
35
|
+
* wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826',
|
36
|
+
* },
|
37
|
+
* to: {
|
38
|
+
* name: 'Bob',
|
39
|
+
* wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB',
|
40
|
+
* },
|
41
|
+
* contents: 'Hello, Bob!',
|
42
|
+
* },
|
43
|
+
* signature: '0x...',
|
44
|
+
* })
|
45
|
+
* ```
|
46
|
+
*/
|
47
|
+
export function wrapTypedDataSignature(parameters) {
|
48
|
+
const { domain, message, primaryType, signature, types } = parameters;
|
49
|
+
const signatureHex = (() => {
|
50
|
+
if (isHex(signature))
|
51
|
+
return signature;
|
52
|
+
if (typeof signature === 'object' && 'r' in signature && 's' in signature)
|
53
|
+
return serializeSignature(signature);
|
54
|
+
return bytesToHex(signature);
|
55
|
+
})();
|
56
|
+
// Compute dependencies for wrapped signature.
|
57
|
+
const hashedDomain = hashStruct({
|
58
|
+
data: domain ?? {},
|
59
|
+
types: {
|
60
|
+
EIP712Domain: getTypesForEIP712Domain({ domain }),
|
61
|
+
},
|
62
|
+
primaryType: 'EIP712Domain',
|
63
|
+
});
|
64
|
+
const hashedContents = hashStruct({
|
65
|
+
data: message,
|
66
|
+
types: types,
|
67
|
+
primaryType,
|
68
|
+
});
|
69
|
+
const encodedType = encodeType({
|
70
|
+
primaryType,
|
71
|
+
types: types,
|
72
|
+
});
|
73
|
+
// Construct wrapped signature.
|
74
|
+
return encodePacked(['bytes', 'bytes32', 'bytes32', 'bytes', 'uint16'], [
|
75
|
+
signatureHex,
|
76
|
+
hashedDomain,
|
77
|
+
hashedContents,
|
78
|
+
stringToHex(encodedType),
|
79
|
+
size(stringToHex(encodedType)),
|
80
|
+
]);
|
81
|
+
}
|
82
|
+
//# sourceMappingURL=wrapTypedDataSignature.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"wrapTypedDataSignature.js","sourceRoot":"","sources":["../../../../experimental/solady/utils/wrapTypedDataSignature.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAG/D,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAA;AACjE,OAAO,EAAuB,KAAK,EAAE,MAAM,8BAA8B,CAAA;AACzE,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAC1E,OAAO,EACL,UAAU,EACV,UAAU,GACX,MAAM,2CAA2C,CAAA;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AAerE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAM,UAAU,sBAAsB,CACpC,UAA4C;IAE5C,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,UAAU,CAAA;IAErE,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE;QACzB,IAAI,KAAK,CAAC,SAAS,CAAC;YAAE,OAAO,SAAS,CAAA;QACtC,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,GAAG,IAAI,SAAS,IAAI,GAAG,IAAI,SAAS;YACvE,OAAO,kBAAkB,CAAC,SAAS,CAAC,CAAA;QACtC,OAAO,UAAU,CAAC,SAAS,CAAC,CAAA;IAC9B,CAAC,CAAC,EAAE,CAAA;IAEJ,8CAA8C;IAC9C,MAAM,YAAY,GAAG,UAAU,CAAC;QAC9B,IAAI,EAAE,MAAM,IAAI,EAAE;QAClB,KAAK,EAAE;YACL,YAAY,EAAE,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAC;SAClD;QACD,WAAW,EAAE,cAAc;KAC5B,CAAC,CAAA;IACF,MAAM,cAAc,GAAG,UAAU,CAAC;QAChC,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,KAAY;QACnB,WAAW;KACZ,CAAC,CAAA;IACF,MAAM,WAAW,GAAG,UAAU,CAAC;QAC7B,WAAW;QACX,KAAK,EAAE,KAAY;KACpB,CAAC,CAAA;IAEF,+BAA+B;IAC/B,OAAO,YAAY,CACjB,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC,EAClD;QACE,YAAY;QACZ,YAAY;QACZ,cAAc;QACd,WAAW,CAAC,WAAW,CAAC;QACxB,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;KAC/B,CACF,CAAA;AACH,CAAC"}
|
package/_esm/index.js
CHANGED
@@ -90,6 +90,9 @@ serializeSignature as signatureToHex, serializeSignature, } from './utils/signat
|
|
90
90
|
export { bytesToRlp, hexToRlp, toRlp, } from './utils/encoding/toRlp.js';
|
91
91
|
export { verifyMessage, } from './utils/signature/verifyMessage.js';
|
92
92
|
export { verifyTypedData, } from './utils/signature/verifyTypedData.js';
|
93
|
+
export { parseErc6492Signature, } from './utils/signature/parseErc6492Signature.js';
|
94
|
+
export { isErc6492Signature, } from './utils/signature/isErc6492Signature.js';
|
95
|
+
export { serializeErc6492Signature, } from './utils/signature/serializeErc6492Signature.js';
|
93
96
|
export { assertRequest, } from './utils/transaction/assertRequest.js';
|
94
97
|
export { assertTransactionEIP1559, assertTransactionEIP2930, assertTransactionLegacy, } from './utils/transaction/assertTransaction.js';
|
95
98
|
export { boolToBytes, hexToBytes, numberToBytes, stringToBytes, toBytes, } from './utils/encoding/toBytes.js';
|
@@ -138,6 +141,7 @@ toFunctionSignature as getFunctionSignature, } from './utils/hash/toFunctionSign
|
|
138
141
|
export { toEventHash, } from './utils/hash/toEventHash.js';
|
139
142
|
export { toFunctionHash, } from './utils/hash/toFunctionHash.js';
|
140
143
|
export { hashMessage, } from './utils/signature/hashMessage.js';
|
144
|
+
export { toPrefixedMessage, } from './utils/signature/toPrefixedMessage.js';
|
141
145
|
export { isAddress, } from './utils/address/isAddress.js';
|
142
146
|
export { isAddressEqual, } from './utils/address/isAddressEqual.js';
|
143
147
|
export { isBytes } from './utils/data/isBytes.js';
|
package/_esm/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,OAAO,EAkBL,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,EACzB,mBAAmB,EACnB,4BAA4B,EAC5B,4BAA4B,EAC5B,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,2BAA2B,EAC3B,6BAA6B,EAC7B,gBAAgB,EAChB,qBAAqB,EACrB,QAAQ,EACR,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,SAAS,CAAA;AAEhB,OAAO,EACL,WAAW,GAIZ,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAIN,MAAM,uCAAuC,CAAA;AAC9C,OAAO,EAIN,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAGN,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAIN,MAAM,0BAA0B,CAAA;AAoajC,OAAO,EAKL,YAAY,EACZ,SAAS,GACV,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAIL,MAAM,GACP,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAIL,QAAQ,GACT,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAIL,IAAI,GACL,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAIL,kBAAkB,GACnB,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAIL,gBAAgB,GACjB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAEL,aAAa,GACd,MAAM,g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11 +30,11 @@ export function encodeEventTopics(parameters) {
|
|
30
30
|
: [];
|
31
31
|
if (args_.length > 0) {
|
32
32
|
topics =
|
33
|
-
indexedInputs?.map((param, i) =>
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
33
|
+
indexedInputs?.map((param, i) => {
|
34
|
+
if (Array.isArray(args_[i]))
|
35
|
+
return args_[i].map((_, j) => encodeArg({ param, value: args_[i][j] }));
|
36
|
+
return args_[i] ? encodeArg({ param, value: args_[i] }) : null;
|
37
|
+
}) ?? [];
|
38
38
|
}
|
39
39
|
}
|
40
40
|
return [signature, ...topics];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"encodeEventTopics.js","sourceRoot":"","sources":["../../../utils/abi/encodeEventTopics.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,qBAAqB,GAEtB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,2BAA2B,GAE5B,MAAM,qBAAqB,CAAA;AAS5B,OAAO,EAAyB,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACvE,OAAO,EAA2B,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACzE,OAAO,EAEL,eAAe,GAChB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAEL,mBAAmB,GACpB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAA+B,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAC/E,OAAO,EAA4B,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEtE,MAAM,QAAQ,GAAG,kCAAkC,CAAA;
|
1
|
+
{"version":3,"file":"encodeEventTopics.js","sourceRoot":"","sources":["../../../utils/abi/encodeEventTopics.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,qBAAqB,GAEtB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,2BAA2B,GAE5B,MAAM,qBAAqB,CAAA;AAS5B,OAAO,EAAyB,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACvE,OAAO,EAA2B,SAAS,EAAE,M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AC,kBAAkB,CAAC;QAChE,MAAM,IAAI,2BAA2B,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACnD,OAAO,mBAAmB,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAA;AAC9C,CAAC"}
|
package/_esm/utils/getAction.js
CHANGED
@@ -5,13 +5,17 @@
|
|
5
5
|
* Useful for extracting overridden actions from a client (ie. if a consumer
|
6
6
|
* wants to override the `sendTransaction` implementation).
|
7
7
|
*/
|
8
|
-
export function getAction(client,
|
9
|
-
// Some minifiers drop `Function.prototype.name
|
10
|
-
//
|
11
|
-
//
|
8
|
+
export function getAction(client, actionFn,
|
9
|
+
// Some minifiers drop `Function.prototype.name`, or replace it with short letters,
|
10
|
+
// meaning that `actionFn.name` will not always work. For that case, the consumer
|
11
|
+
// needs to pass the name explicitly.
|
12
12
|
name) {
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
const action_implicit = client[actionFn.name];
|
14
|
+
if (typeof action_implicit === 'function')
|
15
|
+
return action_implicit;
|
16
|
+
const action_explicit = client[name];
|
17
|
+
if (typeof action_explicit === 'function')
|
18
|
+
return action_explicit;
|
19
|
+
return (params) => actionFn(client, params);
|
16
20
|
}
|
17
21
|
//# sourceMappingURL=getAction.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getAction.js","sourceRoot":"","sources":["../../utils/getAction.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"getAction.js","sourceRoot":"","sources":["../../utils/getAction.ts"],"names":[],"mappings":"AAQA;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAUvB,MAAc,EACd,QAAwD;AACxD,mFAAmF;AACnF,iFAAiF;AACjF,qCAAqC;AACrC,IAA+D;IAE/D,MAAM,eAAe,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;IAC7C,IAAI,OAAO,eAAe,KAAK,UAAU;QACvC,OAAO,eAAqD,CAAA;IAE9D,MAAM,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;IACpC,IAAI,OAAO,eAAe,KAAK,UAAU;QACvC,OAAO,eAAqD,CAAA;IAE9D,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAC7C,CAAC"}
|
package/_esm/utils/index.js
CHANGED
@@ -89,6 +89,9 @@ export { recoverTypedDataAddress, } from './signature/recoverTypedDataAddress.js
|
|
89
89
|
export { verifyMessage, } from './signature/verifyMessage.js';
|
90
90
|
export { verifyTypedData, } from './signature/verifyTypedData.js';
|
91
91
|
export { hashMessage, } from './signature/hashMessage.js';
|
92
|
+
export { parseErc6492Signature, } from './signature/parseErc6492Signature.js';
|
93
|
+
export { isErc6492Signature, } from './signature/isErc6492Signature.js';
|
94
|
+
export { serializeErc6492Signature, } from './signature/serializeErc6492Signature.js';
|
92
95
|
export { getSerializedTransactionType, } from './transaction/getSerializedTransactionType.js';
|
93
96
|
export { getTransactionType, } from './transaction/getTransactionType.js';
|
94
97
|
export { assertRequest, } from './transaction/assertRequest.js';
|
package/_esm/utils/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../utils/index.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,OAAO,EAEL,YAAY,GACb,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EAEL,WAAW;AACX,qCAAqC;AACrC,WAAW,IAAI,SAAS,EACxB,cAAc,EACd,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,WAAW,CAAA;AAElB,OAAO,EAGL,kBAAkB,GACnB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAIL,YAAY,GACb,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAEL,uBAAuB,GACxB,MAAM,oCAAoC,CAAA;AAE3C,OAAO,EAAE,UAAU,EAAE,UAAU,EAA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3C,OAAO,EAEL,gBAAgB,GACjB,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EACL,oBAAoB,GAGrB,MAAM,uCAAuC,CAAA;AAC9C,OAAO,EAEL,mBAAmB,GACpB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EAA6B,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAC9E,OAAO,EAA4B,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAC3E,OAAO,EAA6B,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAC9E,OAAO,EAA4B,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAC3E,OAAO,EAA4B,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAC3E,OAAO,EAA2B,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACxE,OAAO,EAIL,kBAAkB,EAClB,YAAY,GACb,MAAM,mBAAmB,CAAA"}
|
@@ -1,16 +1,6 @@
|
|
1
|
-
import { presignMessagePrefix } from '../../constants/strings.js';
|
2
|
-
import { concat } from '../data/concat.js';
|
3
|
-
import { stringToBytes, toBytes, } from '../encoding/toBytes.js';
|
4
1
|
import { keccak256 } from '../hash/keccak256.js';
|
2
|
+
import { toPrefixedMessage } from './toPrefixedMessage.js';
|
5
3
|
export function hashMessage(message, to_) {
|
6
|
-
|
7
|
-
if (typeof message === 'string')
|
8
|
-
return stringToBytes(message);
|
9
|
-
if (message.raw instanceof Uint8Array)
|
10
|
-
return message.raw;
|
11
|
-
return toBytes(message.raw);
|
12
|
-
})();
|
13
|
-
const prefixBytes = stringToBytes(`${presignMessagePrefix}${messageBytes.length}`);
|
14
|
-
return keccak256(concat([prefixBytes, messageBytes]), to_);
|
4
|
+
return keccak256(toPrefixedMessage(message), to_);
|
15
5
|
}
|
16
6
|
//# sourceMappingURL=hashMessage.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"hashMessage.js","sourceRoot":"","sources":["../../../utils/signature/hashMessage.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"hashMessage.js","sourceRoot":"","sources":["../../../utils/signature/hashMessage.ts"],"names":[],"mappings":"AAEA,OAAO,EAA2B,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAU1D,MAAM,UAAU,WAAW,CACzB,OAAwB,EACxB,GAAqB;IAErB,OAAO,SAAS,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,CAAA;AACnD,CAAC"}
|