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
package/_cjs/utils/data/slice.js
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.slice = slice;
|
4
|
+
exports.sliceBytes = sliceBytes;
|
5
|
+
exports.sliceHex = sliceHex;
|
4
6
|
const data_js_1 = require("../../errors/data.js");
|
5
7
|
const isHex_js_1 = require("./isHex.js");
|
6
8
|
const size_js_1 = require("./size.js");
|
@@ -13,7 +15,6 @@ function slice(value, start, end, { strict } = {}) {
|
|
13
15
|
strict,
|
14
16
|
});
|
15
17
|
}
|
16
|
-
exports.slice = slice;
|
17
18
|
function assertStartOffset(value, start) {
|
18
19
|
if (typeof start === 'number' && start > 0 && start > (0, size_js_1.size)(value) - 1)
|
19
20
|
throw new data_js_1.SliceOffsetOutOfBoundsError({
|
@@ -40,7 +41,6 @@ function sliceBytes(value_, start, end, { strict } = {}) {
|
|
40
41
|
assertEndOffset(value, start, end);
|
41
42
|
return value;
|
42
43
|
}
|
43
|
-
exports.sliceBytes = sliceBytes;
|
44
44
|
function sliceHex(value_, start, end, { strict } = {}) {
|
45
45
|
assertStartOffset(value_, start);
|
46
46
|
const value = `0x${value_
|
@@ -50,5 +50,4 @@ function sliceHex(value_, start, end, { strict } = {}) {
|
|
50
50
|
assertEndOffset(value, start, end);
|
51
51
|
return value;
|
52
52
|
}
|
53
|
-
exports.sliceHex = sliceHex;
|
54
53
|
//# sourceMappingURL=slice.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"slice.js","sourceRoot":"","sources":["../../../utils/data/slice.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"slice.js","sourceRoot":"","sources":["../../../utils/data/slice.ts"],"names":[],"mappings":";;AA2BA,sBAaC;AAmDD,gCAUC;AAcD,4BAYC;AA/HD,kDAG6B;AAI7B,yCAAuD;AACvD,uCAAoD;AAmBpD,SAAgB,KAAK,CACnB,KAAa,EACb,KAA0B,EAC1B,GAAwB,EACxB,EAAE,MAAM,KAAuC,EAAE;IAEjD,IAAI,IAAA,gBAAK,EAAC,KAAK,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;QACjC,OAAO,QAAQ,CAAC,KAAY,EAAE,KAAK,EAAE,GAAG,EAAE;YACxC,MAAM;SACP,CAA4B,CAAA;IAC/B,OAAO,UAAU,CAAC,KAAkB,EAAE,KAAK,EAAE,GAAG,EAAE;QAChD,MAAM;KACP,CAA4B,CAAA;AAC/B,CAAC;AAOD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,EAAE,CAAC;SACjB,KAAK,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAW,CAAA;IACjE,IAAI,MAAM;QAAE,eAAe,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,CAAA;IAC9C,OAAO,KAAK,CAAA;AACd,CAAC"}
|
package/_cjs/utils/data/trim.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.trim =
|
3
|
+
exports.trim = trim;
|
4
4
|
function trim(hexOrBytes, { dir = 'left' } = {}) {
|
5
5
|
let data = typeof hexOrBytes === 'string' ? hexOrBytes.replace('0x', '') : hexOrBytes;
|
6
6
|
let sliceLength = 0;
|
@@ -21,5 +21,4 @@ function trim(hexOrBytes, { dir = 'left' } = {}) {
|
|
21
21
|
}
|
22
22
|
return data;
|
23
23
|
}
|
24
|
-
exports.trim = trim;
|
25
24
|
//# sourceMappingURL=trim.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"trim.js","sourceRoot":"","sources":["../../../utils/data/trim.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"trim.js","sourceRoot":"","sources":["../../../utils/data/trim.ts"],"names":[],"mappings":";;AAYA,oBAyBC;AAzBD,SAAgB,IAAI,CAClB,UAAkB,EAClB,EAAE,GAAG,GAAG,MAAM,KAAkB,EAAE;IAElC,IAAI,IAAI,GACN,OAAO,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAA;IAE5E,IAAI,WAAW,GAAG,CAAC,CAAA;IACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QACzC,IAAI,IAAI,CAAC,GAAG,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,GAAG;YACnE,WAAW,EAAE,CAAA;;YACV,MAAK;IACZ,CAAC;IACD,IAAI;QACF,GAAG,KAAK,MAAM;YACZ,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC;YACzB,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC,CAAA;IAE9C,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;QACnC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,GAAG,KAAK,OAAO;YAAE,IAAI,GAAG,GAAG,IAAI,GAAG,CAAA;QAC3D,OAAO,KACL,IAAI,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IACvC,EAA4B,CAAA;IAC9B,CAAC;IACD,OAAO,IAA8B,CAAA;AACvC,CAAC"}
|
@@ -1,6 +1,10 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.fromBytes = fromBytes;
|
4
|
+
exports.bytesToBigInt = bytesToBigInt;
|
5
|
+
exports.bytesToBool = bytesToBool;
|
6
|
+
exports.bytesToNumber = bytesToNumber;
|
7
|
+
exports.bytesToString = bytesToString;
|
4
8
|
const encoding_js_1 = require("../../errors/encoding.js");
|
5
9
|
const trim_js_1 = require("../data/trim.js");
|
6
10
|
const fromHex_js_1 = require("./fromHex.js");
|
@@ -18,14 +22,12 @@ function fromBytes(bytes, toOrOpts) {
|
|
18
22
|
return bytesToString(bytes, opts);
|
19
23
|
return (0, toHex_js_1.bytesToHex)(bytes, opts);
|
20
24
|
}
|
21
|
-
exports.fromBytes = fromBytes;
|
22
25
|
function bytesToBigInt(bytes, opts = {}) {
|
23
26
|
if (typeof opts.size !== 'undefined')
|
24
27
|
(0, fromHex_js_1.assertSize)(bytes, { size: opts.size });
|
25
28
|
const hex = (0, toHex_js_1.bytesToHex)(bytes, opts);
|
26
29
|
return (0, fromHex_js_1.hexToBigInt)(hex, opts);
|
27
30
|
}
|
28
|
-
exports.bytesToBigInt = bytesToBigInt;
|
29
31
|
function bytesToBool(bytes_, opts = {}) {
|
30
32
|
let bytes = bytes_;
|
31
33
|
if (typeof opts.size !== 'undefined') {
|
@@ -36,14 +38,12 @@ function bytesToBool(bytes_, opts = {}) {
|
|
36
38
|
throw new encoding_js_1.InvalidBytesBooleanError(bytes);
|
37
39
|
return Boolean(bytes[0]);
|
38
40
|
}
|
39
|
-
exports.bytesToBool = bytesToBool;
|
40
41
|
function bytesToNumber(bytes, opts = {}) {
|
41
42
|
if (typeof opts.size !== 'undefined')
|
42
43
|
(0, fromHex_js_1.assertSize)(bytes, { size: opts.size });
|
43
44
|
const hex = (0, toHex_js_1.bytesToHex)(bytes, opts);
|
44
45
|
return (0, fromHex_js_1.hexToNumber)(hex, opts);
|
45
46
|
}
|
46
|
-
exports.bytesToNumber = bytesToNumber;
|
47
47
|
function bytesToString(bytes_, opts = {}) {
|
48
48
|
let bytes = bytes_;
|
49
49
|
if (typeof opts.size !== 'undefined') {
|
@@ -52,5 +52,4 @@ function bytesToString(bytes_, opts = {}) {
|
|
52
52
|
}
|
53
53
|
return new TextDecoder().decode(bytes);
|
54
54
|
}
|
55
|
-
exports.bytesToString = bytesToString;
|
56
55
|
//# sourceMappingURL=fromBytes.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"fromBytes.js","sourceRoot":"","sources":["../../../utils/encoding/fromBytes.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"fromBytes.js","sourceRoot":"","sources":["../../../utils/encoding/fromBytes.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
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.assertSize = assertSize;
|
4
|
+
exports.fromHex = fromHex;
|
5
|
+
exports.hexToBigInt = hexToBigInt;
|
6
|
+
exports.hexToBool = hexToBool;
|
7
|
+
exports.hexToNumber = hexToNumber;
|
8
|
+
exports.hexToString = hexToString;
|
4
9
|
const encoding_js_1 = require("../../errors/encoding.js");
|
5
10
|
const size_js_1 = require("../data/size.js");
|
6
11
|
const trim_js_1 = require("../data/trim.js");
|
@@ -12,7 +17,6 @@ function assertSize(hexOrBytes, { size }) {
|
|
12
17
|
maxSize: size,
|
13
18
|
});
|
14
19
|
}
|
15
|
-
exports.assertSize = assertSize;
|
16
20
|
function fromHex(hex, toOrOpts) {
|
17
21
|
const opts = typeof toOrOpts === 'string' ? { to: toOrOpts } : toOrOpts;
|
18
22
|
const to = opts.to;
|
@@ -26,7 +30,6 @@ function fromHex(hex, toOrOpts) {
|
|
26
30
|
return hexToBool(hex, opts);
|
27
31
|
return (0, toBytes_js_1.hexToBytes)(hex, opts);
|
28
32
|
}
|
29
|
-
exports.fromHex = fromHex;
|
30
33
|
function hexToBigInt(hex, opts = {}) {
|
31
34
|
const { signed } = opts;
|
32
35
|
if (opts.size)
|
@@ -40,7 +43,6 @@ function hexToBigInt(hex, opts = {}) {
|
|
40
43
|
return value;
|
41
44
|
return value - BigInt(`0x${'f'.padStart(size * 2, 'f')}`) - 1n;
|
42
45
|
}
|
43
|
-
exports.hexToBigInt = hexToBigInt;
|
44
46
|
function hexToBool(hex_, opts = {}) {
|
45
47
|
let hex = hex_;
|
46
48
|
if (opts.size) {
|
@@ -53,11 +55,9 @@ function hexToBool(hex_, opts = {}) {
|
|
53
55
|
return true;
|
54
56
|
throw new encoding_js_1.InvalidHexBooleanError(hex);
|
55
57
|
}
|
56
|
-
exports.hexToBool = hexToBool;
|
57
58
|
function hexToNumber(hex, opts = {}) {
|
58
59
|
return Number(hexToBigInt(hex, opts));
|
59
60
|
}
|
60
|
-
exports.hexToNumber = hexToNumber;
|
61
61
|
function hexToString(hex, opts = {}) {
|
62
62
|
let bytes = (0, toBytes_js_1.hexToBytes)(hex);
|
63
63
|
if (opts.size) {
|
@@ -66,5 +66,4 @@ function hexToString(hex, opts = {}) {
|
|
66
66
|
}
|
67
67
|
return new TextDecoder().decode(bytes);
|
68
68
|
}
|
69
|
-
exports.hexToString = hexToString;
|
70
69
|
//# sourceMappingURL=fromHex.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"fromHex.js","sourceRoot":"","sources":["../../../utils/encoding/fromHex.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"fromHex.js","sourceRoot":"","sources":["../../../utils/encoding/fromHex.ts"],"names":[],"mappings":";;AAkBA,gCASC;AA6DD,0BAWC;AA8BD,kCAaC;AAgCD,8BASC;AAyBD,kCAEC;AAkCD,kCAOC;AA3PD,0DAKiC;AAGjC,6CAAmE;AACnE,6CAA0D;AAE1D,6CAAmE;AAOnE,SAAgB,UAAU,CACxB,UAA2B,EAC3B,EAAE,IAAI,EAAoB;IAE1B,IAAI,IAAA,cAAK,EAAC,UAAU,CAAC,GAAG,IAAI;QAC1B,MAAM,IAAI,+BAAiB,CAAC;YAC1B,SAAS,EAAE,IAAA,cAAK,EAAC,UAAU,CAAC;YAC5B,OAAO,EAAE,IAAI;SACd,CAAC,CAAA;AACN,CAAC;AA6DD,SAAgB,OAAO,CAErB,GAAQ,EAAE,QAAgC;IAC1C,MAAM,IAAI,GAAG,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAA;IACvE,MAAM,EAAE,GAAG,IAAI,CAAC,EAAE,CAAA;IAElB,IAAI,EAAE,KAAK,QAAQ;QAAE,OAAO,WAAW,CAAC,GAAG,EAAE,IAAI,CAA2B,CAAA;IAC5E,IAAI,EAAE,KAAK,Q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C,IAAI,EAAE,CAAC,CAAA;QACpC,GAAG,GAAG,IAAA,cAAI,EAAC,GAAG,CAAC,CAAA;IACjB,CAAC;IACD,IAAI,IAAA,cAAI,EAAC,GAAG,CAAC,KAAK,MAAM;QAAE,OAAO,KAAK,CAAA;IACtC,IAAI,IAAA,cAAI,EAAC,GAAG,CAAC,KAAK,MAAM;QAAE,OAAO,IAAI,CAAA;IACrC,MAAM,IAAI,oCAAsB,CAAC,GAAG,CAAC,CAAA;AACvC,CAAC;AAyBD,SAAgB,WAAW,CAAC,GAAQ,EAAE,OAAwB,EAAE;IAC9D,OAAO,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAA;AACvC,CAAC;AAkCD,SAAgB,WAAW,CAAC,GAAQ,EAAE,OAAwB,EAAE;IAC9D,IAAI,KAAK,GAAG,IAAA,uBAAU,EAAC,GAAG,CAAC,CAAA;IAC3B,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,UAAU,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA;QACtC,KAAK,GAAG,IAAA,cAAI,EAAC,KAAK,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAA;IACvC,CAAC;IACD,OAAO,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACxC,CAAC"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.fromRlp =
|
3
|
+
exports.fromRlp = fromRlp;
|
4
4
|
const base_js_1 = require("../../errors/base.js");
|
5
5
|
const encoding_js_1 = require("../../errors/encoding.js");
|
6
6
|
const cursor_js_1 = require("../cursor.js");
|
@@ -21,7 +21,6 @@ function fromRlp(value, to = 'hex') {
|
|
21
21
|
const result = fromRlpCursor(cursor, to);
|
22
22
|
return result;
|
23
23
|
}
|
24
|
-
exports.fromRlp = fromRlp;
|
25
24
|
function fromRlpCursor(cursor, to = 'hex') {
|
26
25
|
if (cursor.bytes.length === 0)
|
27
26
|
return (to === 'hex' ? (0, toHex_js_1.bytesToHex)(cursor.bytes) : cursor.bytes);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"fromRlp.js","sourceRoot":"","sources":["../../../utils/encoding/fromRlp.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"fromRlp.js","sourceRoot":"","sources":["../../../utils/encoding/fromRlp.ts"],"names":[],"mappings":";;AA8BA,0BAmBC;AAjDD,kDAAoE;AACpE,0DAGiC;AAGjC,4CAIqB;AACrB,6CAAmE;AACnE,yCAAiE;AAiBjE,SAAgB,OAAO,CACrB,KAAsB,EACtB,KAA0B,KAAK;IAE/B,MAAM,KAAK,GAAG,CAAC,GAAG,EAAE;QAClB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC;gBAC5C,MAAM,IAAI,kCAAoB,CAAC,KAAK,CAAC,CAAA;YACvC,OAAO,IAAA,uBAAU,EAAC,KAAK,CAAC,CAAA;QAC1B,CAAC;QACD,OAAO,KAAK,CAAA;IACd,CAAC,CAAC,EAAE,CAAA;IAEJ,MAAM,MAAM,GAAG,IAAA,wBAAY,EAAC,KAAK,EAAE;QACjC,kBAAkB,EAAE,MAAM,CAAC,iBAAiB;KAC7C,CAAC,CAAA;IACF,MAAM,MAAM,GAAG,aAAa,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;IAExC,OAAO,MAA+B,CAAA;AACxC,CAAC;AAQD,SAAS,aAAa,CACpB,MAAc,EACd,KAA0B,KAAK;IAE/B,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC;QAC3B,OAAO,CACL,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,IAAA,qBAAU,EAAC,MAAM,C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GAAG,CAAC;QAAE,OAAO,MAAM,CAAC,UAAU,EAAE,CAAA;IAC1D,MAAM,IAAI,mBAAS,CAAC,oBAAoB,CAAC,CAAA;AAC3C,CAAC;AAID,SAAS,QAAQ,CAAgB,MAAc,EAAE,MAAc,EAAE,EAAW;IAC1E,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAA;IAChC,MAAM,KAAK,GAA4B,EAAE,CAAA;IACzC,OAAO,MAAM,CAAC,QAAQ,GAAG,QAAQ,GAAG,MAAM;QACxC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAA;IACvC,OAAO,KAAK,CAAA;AACd,CAAC"}
|
@@ -1,6 +1,10 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.toBytes = toBytes;
|
4
|
+
exports.boolToBytes = boolToBytes;
|
5
|
+
exports.hexToBytes = hexToBytes;
|
6
|
+
exports.numberToBytes = numberToBytes;
|
7
|
+
exports.stringToBytes = stringToBytes;
|
4
8
|
const base_js_1 = require("../../errors/base.js");
|
5
9
|
const isHex_js_1 = require("../data/isHex.js");
|
6
10
|
const pad_js_1 = require("../data/pad.js");
|
@@ -16,7 +20,6 @@ function toBytes(value, opts = {}) {
|
|
16
20
|
return hexToBytes(value, opts);
|
17
21
|
return stringToBytes(value, opts);
|
18
22
|
}
|
19
|
-
exports.toBytes = toBytes;
|
20
23
|
function boolToBytes(value, opts = {}) {
|
21
24
|
const bytes = new Uint8Array(1);
|
22
25
|
bytes[0] = Number(value);
|
@@ -26,7 +29,6 @@ function boolToBytes(value, opts = {}) {
|
|
26
29
|
}
|
27
30
|
return bytes;
|
28
31
|
}
|
29
|
-
exports.boolToBytes = boolToBytes;
|
30
32
|
const charCodeMap = {
|
31
33
|
zero: 48,
|
32
34
|
nine: 57,
|
@@ -65,12 +67,10 @@ function hexToBytes(hex_, opts = {}) {
|
|
65
67
|
}
|
66
68
|
return bytes;
|
67
69
|
}
|
68
|
-
exports.hexToBytes = hexToBytes;
|
69
70
|
function numberToBytes(value, opts) {
|
70
71
|
const hex = (0, toHex_js_1.numberToHex)(value, opts);
|
71
72
|
return hexToBytes(hex);
|
72
73
|
}
|
73
|
-
exports.numberToBytes = numberToBytes;
|
74
74
|
function stringToBytes(value, opts = {}) {
|
75
75
|
const bytes = encoder.encode(value);
|
76
76
|
if (typeof opts.size === 'number') {
|
@@ -79,5 +79,4 @@ function stringToBytes(value, opts = {}) {
|
|
79
79
|
}
|
80
80
|
return bytes;
|
81
81
|
}
|
82
|
-
exports.stringToBytes = stringToBytes;
|
83
82
|
//# sourceMappingURL=toBytes.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"toBytes.js","sourceRoot":"","sources":["../../../utils/encoding/toBytes.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"toBytes.js","sourceRoot":"","sources":["../../../utils/encoding/toBytes.ts"],"names":[],"mappings":";;AAqDA,0BASC;AA+BD,kCAQC;AAgDD,gCAyBC;AA0BD,sCAMC;AA+BD,sCAUC;AAvPD,kDAAgD;AAGhD,+CAA6D;AAC7D,2CAAuD;AAEvD,6CAAmE;AACnE,yCAImB;AAEnB,MAAM,OAAO,GAAiB,IAAI,WAAW,EAAE,CAAA;AAwC/C,SAAgB,OAAO,CACrB,KAA+C,EAC/C,OAA0B,EAAE;IAE5B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ;QACxD,OAAO,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;IACnC,IAAI,OAAO,KAAK,KAAK,SAAS;QAAE,OAAO,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;IAC/D,IAAI,IAAA,gBAAK,EAAC,KAAK,CAAC;QAAE,OAAO,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;IAChD,OAAO,aAAa,CAAC,KAAK,EA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,aAAa,CAC3B,KAAsB,EACtB,IAAkC;IAElC,MAAM,GAAG,GAAG,IAAA,sBAAW,EAAC,KAAK,EAAE,IAAI,CAAC,CAAA;IACpC,OAAO,UAAU,CAAC,GAAG,CAAC,CAAA;AACxB,CAAC;AA+BD,SAAgB,aAAa,CAC3B,KAAa,EACb,OAA0B,EAAE;IAE5B,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IACnC,IAAI,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QAClC,IAAA,uBAAU,EAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA;QACtC,OAAO,IAAA,YAAG,EAAC,KAAK,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA;IACtD,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC"}
|
@@ -1,6 +1,10 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.toHex = toHex;
|
4
|
+
exports.boolToHex = boolToHex;
|
5
|
+
exports.bytesToHex = bytesToHex;
|
6
|
+
exports.numberToHex = numberToHex;
|
7
|
+
exports.stringToHex = stringToHex;
|
4
8
|
const encoding_js_1 = require("../../errors/encoding.js");
|
5
9
|
const pad_js_1 = require("../data/pad.js");
|
6
10
|
const fromHex_js_1 = require("./fromHex.js");
|
@@ -15,7 +19,6 @@ function toHex(value, opts = {}) {
|
|
15
19
|
return boolToHex(value, opts);
|
16
20
|
return bytesToHex(value, opts);
|
17
21
|
}
|
18
|
-
exports.toHex = toHex;
|
19
22
|
function boolToHex(value, opts = {}) {
|
20
23
|
const hex = `0x${Number(value)}`;
|
21
24
|
if (typeof opts.size === 'number') {
|
@@ -24,7 +27,6 @@ function boolToHex(value, opts = {}) {
|
|
24
27
|
}
|
25
28
|
return hex;
|
26
29
|
}
|
27
|
-
exports.boolToHex = boolToHex;
|
28
30
|
function bytesToHex(value, opts = {}) {
|
29
31
|
let string = '';
|
30
32
|
for (let i = 0; i < value.length; i++) {
|
@@ -37,7 +39,6 @@ function bytesToHex(value, opts = {}) {
|
|
37
39
|
}
|
38
40
|
return hex;
|
39
41
|
}
|
40
|
-
exports.bytesToHex = bytesToHex;
|
41
42
|
function numberToHex(value_, opts = {}) {
|
42
43
|
const { signed, size } = opts;
|
43
44
|
const value = BigInt(value_);
|
@@ -69,11 +70,9 @@ function numberToHex(value_, opts = {}) {
|
|
69
70
|
return (0, pad_js_1.pad)(hex, { size });
|
70
71
|
return hex;
|
71
72
|
}
|
72
|
-
exports.numberToHex = numberToHex;
|
73
73
|
const encoder = new TextEncoder();
|
74
74
|
function stringToHex(value_, opts = {}) {
|
75
75
|
const value = encoder.encode(value_);
|
76
76
|
return bytesToHex(value, opts);
|
77
77
|
}
|
78
|
-
exports.stringToHex = stringToHex;
|
79
78
|
//# sourceMappingURL=toHex.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"toHex.js","sourceRoot":"","sources":["../../../utils/encoding/toHex.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"toHex.js","sourceRoot":"","sources":["../../../utils/encoding/toHex.ts"],"names":[],"mappings":";;AAmDA,sBAWC;AAiCD,8BAOC;AA4BD,gCAYC;AAuCD,kCAmCC;AA8BD,kCAGC;AAzPD,0DAGiC;AAGjC,2CAAuD;AAEvD,6CAAmE;AAEnE,MAAM,KAAK,GAAiB,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,CAChE,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAChC,CAAA;AAuCD,SAAgB,KAAK,CACnB,KAAqD,EACrD,OAAwB,EAAE;IAE1B,IAA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GAAG,MAAM,EAAE,CAAC,CAAC,CAAC,SAAS;YAClD,GAAG,EAAE,GAAG,QAAQ,GAAG,MAAM,EAAE;YAC3B,MAAM;YACN,IAAI;YACJ,KAAK,EAAE,GAAG,MAAM,GAAG,MAAM,EAAE;SAC5B,CAAC,CAAA;IACJ,CAAC;IAED,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,IAAI,KAAK,GAAG,CAAC;QACnC,CAAC,CAAC,CAAC,EAAE,IAAI,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC;QAC1C,CAAC,CAAC,KAAK,CACR,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAS,CAAA;IACvB,IAAI,IAAI;QAAE,OAAO,IAAA,YAAG,EAAC,GAAG,EAAE,EAAE,IAAI,EAAE,CAAQ,CAAA;IAC1C,OAAO,GAAG,CAAA;AACZ,CAAC;AASD,MAAM,OAAO,GAAiB,IAAI,WAAW,EAAE,CAAA;AAqB/C,SAAgB,WAAW,CAAC,MAAc,EAAE,OAAwB,EAAE;IACpE,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IACpC,OAAO,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;AAChC,CAAC"}
|
@@ -1,6 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.toRlp = toRlp;
|
4
|
+
exports.bytesToRlp = bytesToRlp;
|
5
|
+
exports.hexToRlp = hexToRlp;
|
4
6
|
const base_js_1 = require("../../errors/base.js");
|
5
7
|
const cursor_js_1 = require("../cursor.js");
|
6
8
|
const toBytes_js_1 = require("./toBytes.js");
|
@@ -13,15 +15,12 @@ function toRlp(bytes, to = 'hex') {
|
|
13
15
|
return (0, toHex_js_1.bytesToHex)(cursor.bytes);
|
14
16
|
return cursor.bytes;
|
15
17
|
}
|
16
|
-
exports.toRlp = toRlp;
|
17
18
|
function bytesToRlp(bytes, to = 'bytes') {
|
18
19
|
return toRlp(bytes, to);
|
19
20
|
}
|
20
|
-
exports.bytesToRlp = bytesToRlp;
|
21
21
|
function hexToRlp(hex, to = 'hex') {
|
22
22
|
return toRlp(hex, to);
|
23
23
|
}
|
24
|
-
exports.hexToRlp = hexToRlp;
|
25
24
|
function getEncodable(bytes) {
|
26
25
|
if (Array.isArray(bytes))
|
27
26
|
return getEncodableList(bytes.map((x) => getEncodable(x)));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"toRlp.js","sourceRoot":"","sources":["../../../utils/encoding/toRlp.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"toRlp.js","sourceRoot":"","sources":["../../../utils/encoding/toRlp.ts"],"names":[],"mappings":";;AA+BA,sBAUC;AAID,gCAKC;AAID,4BAKC;AA3DD,kDAAgD;AAGhD,4CAIqB;AAErB,6CAAmE;AACnE,yCAAiE;AAqBjE,SAAgB,KAAK,CACnB,KAAsD,EACtD,KAA0B,KAAK;IAE/B,MAAM,SAAS,GAAG,YAAY,CAAC,KAAK,CAAC,CAAA;IACrC,MAAM,MAAM,GAAG,IAAA,wBAAY,EAAC,IAAI,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAA;IAC7D,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IAExB,IAAI,EAAE,KAAK,KAAK;QAAE,OAAO,IAAA,qBAAU,EAAC,MAAM,CAAC,KAAK,CAAwB,CAAA;IACxE,OAAO,MAAM,CAAC,KAA4B,CAAA;AAC5C,CAAC;AAID,SAAgB,UAAU,CACxB,KAAgC,EAChC,KAA0B,OAAO;IAEjC,OAAO,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;AACzB,CAAC;AAID,SAAgB,QAAQ,CACtB,GAAwB,EACxB,KAA0B,KAAK;IAE/B,OAAO,KAAK,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;AACvB,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I,iBAAiB,KAAK,CAAC;oBAAE,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;qBACtD,IAAI,iBAAiB,KAAK,CAAC;oBAAE,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;qBAC5D,IAAI,iBAAiB,KAAK,CAAC;oBAAE,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;;oBAC5D,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;gBACpC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;YACzB,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC;AAED,SAAS,eAAe,CAAC,MAAc;IACrC,IAAI,MAAM,GAAG,CAAC,IAAI,CAAC;QAAE,OAAO,CAAC,CAAA;IAC7B,IAAI,MAAM,GAAG,CAAC,IAAI,EAAE;QAAE,OAAO,CAAC,CAAA;IAC9B,IAAI,MAAM,GAAG,CAAC,IAAI,EAAE;QAAE,OAAO,CAAC,CAAA;IAC9B,IAAI,MAAM,GAAG,CAAC,IAAI,EAAE;QAAE,OAAO,CAAC,CAAA;IAC9B,MAAM,IAAI,mBAAS,CAAC,sBAAsB,CAAC,CAAA;AAC7C,CAAC"}
|
@@ -1,13 +1,12 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.parseAvatarRecord =
|
3
|
+
exports.parseAvatarRecord = parseAvatarRecord;
|
4
4
|
const utils_js_1 = require("./utils.js");
|
5
5
|
async function parseAvatarRecord(client, { gatewayUrls, record, }) {
|
6
6
|
if (/eip155:/i.test(record))
|
7
7
|
return parseNftAvatarUri(client, { gatewayUrls, record });
|
8
8
|
return (0, utils_js_1.parseAvatarUri)({ uri: record, gatewayUrls });
|
9
9
|
}
|
10
|
-
exports.parseAvatarRecord = parseAvatarRecord;
|
11
10
|
async function parseNftAvatarUri(client, { gatewayUrls, record, }) {
|
12
11
|
const nft = (0, utils_js_1.parseNftUri)(record);
|
13
12
|
const nftUri = await (0, utils_js_1.getNftTokenUri)(client, { nft });
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"parseAvatarRecord.js","sourceRoot":"","sources":["../../../../utils/ens/avatar/parseAvatarRecord.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"parseAvatarRecord.js","sourceRoot":"","sources":["../../../../utils/ens/avatar/parseAvatarRecord.ts"],"names":[],"mappings":";;AAoCA,8CAaC;AA3CD,yCAamB;AAiBZ,KAAK,UAAU,iBAAiB,CACrC,MAAiC,EACjC,EACE,WAAW,EACX,MAAM,GAIP;IAED,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC;QACzB,OAAO,iBAAiB,CAAC,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,CAAA;IAC3D,OAAO,IAAA,yBAAc,EAAC,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAA;AACrD,CAAC;AAWD,KAAK,UAAU,iBAAiB,CAC9B,MAAiC,EACjC,EACE,WAAW,EACX,MAAM,GAIP;IAGD,MAAM,GAAG,GAAG,IAAA,sBAAW,EAAC,MAAM,CAAC,CAAA;IAE/B,MAAM,MAAM,GAAG,MAAM,IAAA,yBAAc,EAAC,MAAM,EAAE,EAAE,GAAG,EAAE,CAAC,CAAA;IAEpD,MAAM,EACJ,GAAG,EAAE,cAAc,EACnB,SAAS,EACT,SAAS,GACV,GAAG,IAAA,2BAAgB,EAAC,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAA;IAGlD,IACE,SAAS;QACT,CAAC,cAAc,CAAC,QAAQ,CAAC,+BAA+B,CAAC;YACvD,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,EACjC,CAAC;QACD,MAAM,WAAW,GAAG,SAAS;YAC3B,CAAC;gBACC,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,+BAA+B,EAAE,EAAE,CAAC,CAAC;YACnE,CAAC;gBACC,cAAc,CAAA;QAElB,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAA;QACvC,OAAO,IAAA,yBAAc,EAAC,EAAE,GAAG,EAAE,IAAA,uBAAY,EAAC,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC,CAAA;IACpE,CAAC;IAED,IAAI,UAAU,GAAG,GAAG,CAAC,OAAO,CAAA;IAC5B,IAAI,GAAG,CAAC,SAAS,KAAK,SAAS;QAC7B,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,GAAG,CAAC,CAAA;IAE7D,OAAO,IAAA,+BAAoB,EAAC;QAC1B,WAAW;QACX,GAAG,EAAE,cAAc,CAAC,OAAO,CAAC,aAAa,EAAE,UAAU,CAAC;KACvD,CAAC,CAAA;AACJ,CAAC"}
|
@@ -1,6 +1,13 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.isImageUri = isImageUri;
|
4
|
+
exports.getGateway = getGateway;
|
5
|
+
exports.resolveAvatarUri = resolveAvatarUri;
|
6
|
+
exports.getJsonImage = getJsonImage;
|
7
|
+
exports.getMetadataAvatarUri = getMetadataAvatarUri;
|
8
|
+
exports.parseAvatarUri = parseAvatarUri;
|
9
|
+
exports.parseNftUri = parseNftUri;
|
10
|
+
exports.getNftTokenUri = getNftTokenUri;
|
4
11
|
const readContract_js_1 = require("../../../actions/public/readContract.js");
|
5
12
|
const ens_js_1 = require("../../../errors/ens.js");
|
6
13
|
const networkRegex = /(?<protocol>https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/;
|
@@ -34,7 +41,6 @@ async function isImageUri(uri) {
|
|
34
41
|
});
|
35
42
|
}
|
36
43
|
}
|
37
|
-
exports.isImageUri = isImageUri;
|
38
44
|
function getGateway(custom, defaultGateway) {
|
39
45
|
if (!custom)
|
40
46
|
return defaultGateway;
|
@@ -42,7 +48,6 @@ function getGateway(custom, defaultGateway) {
|
|
42
48
|
return custom.slice(0, -1);
|
43
49
|
return custom;
|
44
50
|
}
|
45
|
-
exports.getGateway = getGateway;
|
46
51
|
function resolveAvatarUri({ uri, gatewayUrls, }) {
|
47
52
|
const isEncoded = base64Regex.test(uri);
|
48
53
|
if (isEncoded)
|
@@ -86,7 +91,6 @@ function resolveAvatarUri({ uri, gatewayUrls, }) {
|
|
86
91
|
}
|
87
92
|
throw new ens_js_1.EnsAvatarUriResolutionError({ uri });
|
88
93
|
}
|
89
|
-
exports.resolveAvatarUri = resolveAvatarUri;
|
90
94
|
function getJsonImage(data) {
|
91
95
|
if (typeof data !== 'object' ||
|
92
96
|
(!('image' in data) && !('image_url' in data) && !('image_data' in data))) {
|
@@ -94,7 +98,6 @@ function getJsonImage(data) {
|
|
94
98
|
}
|
95
99
|
return data.image || data.image_url || data.image_data;
|
96
100
|
}
|
97
|
-
exports.getJsonImage = getJsonImage;
|
98
101
|
async function getMetadataAvatarUri({ gatewayUrls, uri, }) {
|
99
102
|
try {
|
100
103
|
const res = await fetch(uri).then((res) => res.json());
|
@@ -108,7 +111,6 @@ async function getMetadataAvatarUri({ gatewayUrls, uri, }) {
|
|
108
111
|
throw new ens_js_1.EnsAvatarUriResolutionError({ uri });
|
109
112
|
}
|
110
113
|
}
|
111
|
-
exports.getMetadataAvatarUri = getMetadataAvatarUri;
|
112
114
|
async function parseAvatarUri({ gatewayUrls, uri, }) {
|
113
115
|
const { uri: resolvedURI, isOnChain } = resolveAvatarUri({ uri, gatewayUrls });
|
114
116
|
if (isOnChain)
|
@@ -118,7 +120,6 @@ async function parseAvatarUri({ gatewayUrls, uri, }) {
|
|
118
120
|
return resolvedURI;
|
119
121
|
throw new ens_js_1.EnsAvatarUriResolutionError({ uri });
|
120
122
|
}
|
121
|
-
exports.parseAvatarUri = parseAvatarUri;
|
122
123
|
function parseNftUri(uri_) {
|
123
124
|
let uri = uri_;
|
124
125
|
if (uri.startsWith('did:nft:')) {
|
@@ -146,7 +147,6 @@ function parseNftUri(uri_) {
|
|
146
147
|
tokenID,
|
147
148
|
};
|
148
149
|
}
|
149
|
-
exports.parseNftUri = parseNftUri;
|
150
150
|
async function getNftTokenUri(client, { nft }) {
|
151
151
|
if (nft.namespace === 'erc721') {
|
152
152
|
return (0, readContract_js_1.readContract)(client, {
|
@@ -182,5 +182,4 @@ async function getNftTokenUri(client, { nft }) {
|
|
182
182
|
}
|
183
183
|
throw new ens_js_1.EnsAvatarUnsupportedNamespaceError({ namespace: nft.namespace });
|
184
184
|
}
|
185
|
-
exports.getNftTokenUri = getNftTokenUri;
|
186
185
|
//# sourceMappingURL=utils.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../utils/ens/avatar/utils.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../utils/ens/avatar/utils.ts"],"names":[],"mappings":";;AAsCA,gCA6BC;AAKD,gCAIC;AAOD,4CA+DC;AAMD,oCAUC;AAQD,oDAiBC;AAQD,wCAeC;AAWD,kCAgCC;AAOD,wCAqCC;AAvSD,6EAGgD;AAGhD,mDAS+B;AAW/B,MAAM,YAAY,GAChB,mIAAmI,CAAA;AACrI,MAAM,aAAa,GACjB,uJAAuJ,CAAA;AACzJ,MAAM,WAAW,GAAG,uCAAuC,CAAA;AAC3D,MAAM,YAAY,GAAG,6CAA6C,CAAA;AAK3D,KAAK,UAAU,UAAU,CAAC,GAAW;IAC1C,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;QAEhD,IAAI,GAAG,CAAC,MA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F;YACD,YAAY,EAAE,UAAU;YACxB,IAAI,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;SAC5B,CAAC,CAAA;IACJ,CAAC;IACD,IAAI,GAAG,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;QAChC,OAAO,IAAA,8BAAY,EAAC,MAAM,EAAE;YAC1B,OAAO,EAAE,GAAG,CAAC,eAAe;YAC5B,GAAG,EAAE;gBACH;oBACE,IAAI,EAAE,KAAK;oBACX,IAAI,EAAE,UAAU;oBAChB,eAAe,EAAE,MAAM;oBACvB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;oBAC1C,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;iBACxC;aACF;YACD,YAAY,EAAE,KAAK;YACnB,IAAI,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;SAC5B,CAAC,CAAA;IACJ,CAAC;IACD,MAAM,IAAI,2CAAkC,CAAC,EAAE,SAAS,EAAE,GAAG,CAAC,SAAS,EAAE,CAAC,CAAA;AAC5E,CAAC"}
|
@@ -1,8 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.encodeLabelhash =
|
3
|
+
exports.encodeLabelhash = encodeLabelhash;
|
4
4
|
function encodeLabelhash(hash) {
|
5
5
|
return `[${hash.slice(2)}]`;
|
6
6
|
}
|
7
|
-
exports.encodeLabelhash = encodeLabelhash;
|
8
7
|
//# sourceMappingURL=encodeLabelhash.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"encodeLabelhash.js","sourceRoot":"","sources":["../../../utils/ens/encodeLabelhash.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"encodeLabelhash.js","sourceRoot":"","sources":["../../../utils/ens/encodeLabelhash.ts"],"names":[],"mappings":";;AAKA,0CAEC;AAFD,SAAgB,eAAe,CAAC,IAAS;IACvC,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAA;AAC7B,CAAC"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.encodedLabelToLabelhash =
|
3
|
+
exports.encodedLabelToLabelhash = encodedLabelToLabelhash;
|
4
4
|
const isHex_js_1 = require("../data/isHex.js");
|
5
5
|
function encodedLabelToLabelhash(label) {
|
6
6
|
if (label.length !== 66)
|
@@ -14,5 +14,4 @@ function encodedLabelToLabelhash(label) {
|
|
14
14
|
return null;
|
15
15
|
return hash;
|
16
16
|
}
|
17
|
-
exports.encodedLabelToLabelhash = encodedLabelToLabelhash;
|
18
17
|
//# sourceMappingURL=encodedLabelToLabelhash.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"encodedLabelToLabelhash.js","sourceRoot":"","sources":["../../../utils/ens/encodedLabelToLabelhash.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"encodedLabelToLabelhash.js","sourceRoot":"","sources":["../../../utils/ens/encodedLabelToLabelhash.ts"],"names":[],"mappings":";;AAMA,0DAOC;AAXD,+CAA6D;AAI7D,SAAgB,uBAAuB,CAAC,KAAa;IACnD,IAAI,KAAK,CAAC,MAAM,KAAK,EAAE;QAAE,OAAO,IAAI,CAAA;IACpC,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAA;IACzC,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE;QAAE,OAAO,IAAI,CAAA;IAC1C,MAAM,IAAI,GAAG,KAAK,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAA;IACtC,IAAI,CAAC,IAAA,gBAAK,EAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAA;IAC7B,OAAO,IAAI,CAAA;AACb,CAAC"}
|
package/_cjs/utils/ens/errors.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.isNullUniversalResolverError =
|
3
|
+
exports.isNullUniversalResolverError = isNullUniversalResolverError;
|
4
4
|
const solidity_js_1 = require("../../constants/solidity.js");
|
5
5
|
const base_js_1 = require("../../errors/base.js");
|
6
6
|
const contract_js_1 = require("../../errors/contract.js");
|
@@ -26,5 +26,4 @@ function isNullUniversalResolverError(err, callType) {
|
|
26
26
|
return true;
|
27
27
|
return false;
|
28
28
|
}
|
29
|
-
exports.isNullUniversalResolverError = isNullUniversalResolverError;
|
30
29
|
//# sourceMappingURL=errors.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../utils/ens/errors.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../utils/ens/errors.ts"],"names":[],"mappings":";;AAWA,oEAsBC;AAjCD,6DAA0D;AAC1D,kDAAgD;AAChD,0DAAwE;AASxE,SAAgB,4BAA4B,CAC1C,GAAY,EACZ,QAA+B;IAE/B,IAAI,CAAC,CAAC,GAAG,YAAY,mBAAS,CAAC;QAAE,OAAO,KAAK,CAAA;IAC7C,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,YAAY,2CAA6B,CAAC,CAAA;IACzE,IAAI,CAAC,CAAC,KAAK,YAAY,2CAA6B,CAAC;QAAE,OAAO,KAAK,CAAA;IACnE,IAAI,KAAK,CAAC,IAAI,EAAE,SAAS,KAAK,kBAAkB;QAAE,OAAO,IAAI,CAAA;IAC7D,IAAI,KAAK,CAAC,IAAI,EAAE,SAAS,KAAK,8BAA8B;QAAE,OAAO,IAAI,CAAA;IACzE,IAAI,KAAK,CAAC,IAAI,EAAE,SAAS,KAAK,qBAAqB;QAAE,OAAO,IAAI,CAAA;IAChE,IAAI,KAAK,CAAC,IAAI,EAAE,SAAS,KAAK,eAAe;QAAE,OAAO,IAAI,CAAA;IAC1D,IAAI,KAAK,CAAC,IAAI,EAAE,SAAS,KAAK,WAAW;QAAE,OAAO,IAAI,CAAA;IAEtD,IACE,KAAK,CAAC,MAAM,EAAE,QAAQ,CACpB,qDAAqD,CACtD;QAED,OAAO,IAAI,CAAA;IAEb,IAAI,QAAQ,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,0BAAY,CAAC,EAAE,CAAC;QAAE,OAAO,IAAI,CAAA;IAC5E,OAAO,KAAK,CAAA;AACd,CAAC"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.labelhash =
|
3
|
+
exports.labelhash = labelhash;
|
4
4
|
const toBytes_js_1 = require("../encoding/toBytes.js");
|
5
5
|
const toHex_js_1 = require("../encoding/toHex.js");
|
6
6
|
const keccak256_js_1 = require("../hash/keccak256.js");
|
@@ -11,5 +11,4 @@ function labelhash(label) {
|
|
11
11
|
return (0, toHex_js_1.bytesToHex)(result);
|
12
12
|
return (0, encodedLabelToLabelhash_js_1.encodedLabelToLabelhash)(label) || (0, keccak256_js_1.keccak256)((0, toBytes_js_1.stringToBytes)(label));
|
13
13
|
}
|
14
|
-
exports.labelhash = labelhash;
|
15
14
|
//# sourceMappingURL=labelhash.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"labelhash.js","sourceRoot":"","sources":["../../../utils/ens/labelhash.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"labelhash.js","sourceRoot":"","sources":["../../../utils/ens/labelhash.ts"],"names":[],"mappings":";;AA4BA,8BAIC;AA/BD,uDAG+B;AAC/B,mDAA2E;AAC3E,uDAAyE;AACzE,6EAGqC;AAkBrC,SAAgB,SAAS,CAAC,KAAa;IACrC,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACzC,IAAI,CAAC,KAAK;QAAE,OAAO,IAAA,qBAAU,EAAC,MAAM,CAAC,CAAA;IACrC,OAAO,IAAA,oDAAuB,EAAC,KAAK,CAAC,IAAI,IAAA,wBAAS,EAAC,IAAA,0BAAa,EAAC,KAAK,CAAC,CAAC,CAAA;AAC1E,CAAC"}
|