viem 2.0.0-beta.4 → 2.0.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/_cjs/accounts/generateMnemonic.js +9 -0
- package/_cjs/accounts/generateMnemonic.js.map +1 -0
- package/_cjs/accounts/generatePrivateKey.js +10 -0
- package/_cjs/accounts/generatePrivateKey.js.map +1 -0
- package/_cjs/accounts/hdKeyToAccount.js +16 -0
- package/_cjs/accounts/hdKeyToAccount.js.map +1 -0
- package/_cjs/accounts/index.js +52 -0
- package/_cjs/accounts/index.js.map +1 -0
- package/_cjs/accounts/mnemonicToAccount.js +12 -0
- package/_cjs/accounts/mnemonicToAccount.js.map +1 -0
- package/_cjs/accounts/privateKeyToAccount.js +33 -0
- package/_cjs/accounts/privateKeyToAccount.js.map +1 -0
- package/_cjs/accounts/toAccount.js +27 -0
- package/_cjs/accounts/toAccount.js.map +1 -0
- package/_cjs/accounts/types.js +3 -0
- package/_cjs/accounts/types.js.map +1 -0
- package/_cjs/accounts/utils/parseAccount.js +10 -0
- package/_cjs/accounts/utils/parseAccount.js.map +1 -0
- package/_cjs/accounts/utils/privateKeyToAddress.js +12 -0
- package/_cjs/accounts/utils/privateKeyToAddress.js.map +1 -0
- package/_cjs/accounts/utils/publicKeyToAddress.js +11 -0
- package/_cjs/accounts/utils/publicKeyToAddress.js.map +1 -0
- package/_cjs/accounts/utils/sign.js +15 -0
- package/_cjs/accounts/utils/sign.js.map +1 -0
- package/_cjs/accounts/utils/signMessage.js +12 -0
- package/_cjs/accounts/utils/signMessage.js.map +1 -0
- package/_cjs/accounts/utils/signTransaction.js +15 -0
- package/_cjs/accounts/utils/signTransaction.js.map +1 -0
- package/_cjs/accounts/utils/signTypedData.js +16 -0
- package/_cjs/accounts/utils/signTypedData.js.map +1 -0
- package/_cjs/actions/ens/getEnsAddress.js +63 -0
- package/_cjs/actions/ens/getEnsAddress.js.map +1 -0
- package/_cjs/actions/ens/getEnsAvatar.js +25 -0
- package/_cjs/actions/ens/getEnsAvatar.js.map +1 -0
- package/_cjs/actions/ens/getEnsName.js +41 -0
- package/_cjs/actions/ens/getEnsName.js.map +1 -0
- package/_cjs/actions/ens/getEnsResolver.js +39 -0
- package/_cjs/actions/ens/getEnsResolver.js.map +1 -0
- package/_cjs/actions/ens/getEnsText.js +57 -0
- package/_cjs/actions/ens/getEnsText.js.map +1 -0
- package/_cjs/actions/getContract.js +184 -0
- package/_cjs/actions/getContract.js.map +1 -0
- package/_cjs/actions/index.js +167 -0
- package/_cjs/actions/index.js.map +1 -0
- package/_cjs/actions/public/call.js +156 -0
- package/_cjs/actions/public/call.js.map +1 -0
- package/_cjs/actions/public/createBlockFilter.js +15 -0
- package/_cjs/actions/public/createBlockFilter.js.map +1 -0
- package/_cjs/actions/public/createContractEventFilter.js +41 -0
- package/_cjs/actions/public/createContractEventFilter.js.map +1 -0
- package/_cjs/actions/public/createEventFilter.js +48 -0
- package/_cjs/actions/public/createEventFilter.js.map +1 -0
- package/_cjs/actions/public/createPendingTransactionFilter.js +15 -0
- package/_cjs/actions/public/createPendingTransactionFilter.js.map +1 -0
- package/_cjs/actions/public/estimateContractGas.js +37 -0
- package/_cjs/actions/public/estimateContractGas.js.map +1 -0
- package/_cjs/actions/public/estimateFeesPerGas.js +62 -0
- package/_cjs/actions/public/estimateFeesPerGas.js.map +1 -0
- package/_cjs/actions/public/estimateGas.js +56 -0
- package/_cjs/actions/public/estimateGas.js.map +1 -0
- package/_cjs/actions/public/estimateMaxPriorityFeePerGas.js +45 -0
- package/_cjs/actions/public/estimateMaxPriorityFeePerGas.js.map +1 -0
- package/_cjs/actions/public/getBalance.js +14 -0
- package/_cjs/actions/public/getBalance.js.map +1 -0
- package/_cjs/actions/public/getBlock.js +30 -0
- package/_cjs/actions/public/getBlock.js.map +1 -0
- package/_cjs/actions/public/getBlockNumber.js +17 -0
- package/_cjs/actions/public/getBlockNumber.js.map +1 -0
- package/_cjs/actions/public/getBlockTransactionCount.js +24 -0
- package/_cjs/actions/public/getBlockTransactionCount.js.map +1 -0
- package/_cjs/actions/public/getBytecode.js +16 -0
- package/_cjs/actions/public/getBytecode.js.map +1 -0
- package/_cjs/actions/public/getChainId.js +12 -0
- package/_cjs/actions/public/getChainId.js.map +1 -0
- package/_cjs/actions/public/getContractEvents.js +27 -0
- package/_cjs/actions/public/getContractEvents.js.map +1 -0
- package/_cjs/actions/public/getFeeHistory.js +19 -0
- package/_cjs/actions/public/getFeeHistory.js.map +1 -0
- package/_cjs/actions/public/getFilterChanges.js +44 -0
- package/_cjs/actions/public/getFilterChanges.js.map +1 -0
- package/_cjs/actions/public/getFilterLogs.js +42 -0
- package/_cjs/actions/public/getFilterLogs.js.map +1 -0
- package/_cjs/actions/public/getGasPrice.js +11 -0
- package/_cjs/actions/public/getGasPrice.js.map +1 -0
- package/_cjs/actions/public/getLogs.js +73 -0
- package/_cjs/actions/public/getLogs.js.map +1 -0
- package/_cjs/actions/public/getProof.js +16 -0
- package/_cjs/actions/public/getProof.js.map +1 -0
- package/_cjs/actions/public/getStorageAt.js +14 -0
- package/_cjs/actions/public/getStorageAt.js.map +1 -0
- package/_cjs/actions/public/getTransaction.js +41 -0
- package/_cjs/actions/public/getTransaction.js.map +1 -0
- package/_cjs/actions/public/getTransactionConfirmations.js +18 -0
- package/_cjs/actions/public/getTransactionConfirmations.js.map +1 -0
- package/_cjs/actions/public/getTransactionCount.js +14 -0
- package/_cjs/actions/public/getTransactionCount.js.map +1 -0
- package/_cjs/actions/public/getTransactionReceipt.js +18 -0
- package/_cjs/actions/public/getTransactionReceipt.js.map +1 -0
- package/_cjs/actions/public/multicall.js +135 -0
- package/_cjs/actions/public/multicall.js.map +1 -0
- package/_cjs/actions/public/readContract.js +40 -0
- package/_cjs/actions/public/readContract.js.map +1 -0
- package/_cjs/actions/public/simulateContract.js +56 -0
- package/_cjs/actions/public/simulateContract.js.map +1 -0
- package/_cjs/actions/public/uninstallFilter.js +11 -0
- package/_cjs/actions/public/uninstallFilter.js.map +1 -0
- package/_cjs/actions/public/verifyHash.js +32 -0
- package/_cjs/actions/public/verifyHash.js.map +1 -0
- package/_cjs/actions/public/verifyMessage.js +16 -0
- package/_cjs/actions/public/verifyMessage.js.map +1 -0
- package/_cjs/actions/public/verifyTypedData.js +16 -0
- package/_cjs/actions/public/verifyTypedData.js.map +1 -0
- package/_cjs/actions/public/waitForTransactionReceipt.js +119 -0
- package/_cjs/actions/public/waitForTransactionReceipt.js.map +1 -0
- package/_cjs/actions/public/watchBlockNumber.js +78 -0
- package/_cjs/actions/public/watchBlockNumber.js.map +1 -0
- package/_cjs/actions/public/watchBlocks.js +90 -0
- package/_cjs/actions/public/watchBlocks.js.map +1 -0
- package/_cjs/actions/public/watchContractEvent.js +162 -0
- package/_cjs/actions/public/watchContractEvent.js.map +1 -0
- package/_cjs/actions/public/watchEvent.js +161 -0
- package/_cjs/actions/public/watchEvent.js.map +1 -0
- package/_cjs/actions/public/watchPendingTransactions.js +88 -0
- package/_cjs/actions/public/watchPendingTransactions.js.map +1 -0
- package/_cjs/actions/test/dropTransaction.js +11 -0
- package/_cjs/actions/test/dropTransaction.js.map +1 -0
- package/_cjs/actions/test/dumpState.js +10 -0
- package/_cjs/actions/test/dumpState.js.map +1 -0
- package/_cjs/actions/test/getAutomine.js +14 -0
- package/_cjs/actions/test/getAutomine.js.map +1 -0
- package/_cjs/actions/test/getTxpoolContent.js +10 -0
- package/_cjs/actions/test/getTxpoolContent.js.map +1 -0
- package/_cjs/actions/test/getTxpoolStatus.js +15 -0
- package/_cjs/actions/test/getTxpoolStatus.js.map +1 -0
- package/_cjs/actions/test/impersonateAccount.js +11 -0
- package/_cjs/actions/test/impersonateAccount.js.map +1 -0
- package/_cjs/actions/test/increaseTime.js +12 -0
- package/_cjs/actions/test/increaseTime.js.map +1 -0
- package/_cjs/actions/test/inspectTxpool.js +10 -0
- package/_cjs/actions/test/inspectTxpool.js.map +1 -0
- package/_cjs/actions/test/loadState.js +11 -0
- package/_cjs/actions/test/loadState.js.map +1 -0
- package/_cjs/actions/test/mine.js +18 -0
- package/_cjs/actions/test/mine.js.map +1 -0
- package/_cjs/actions/test/removeBlockTimestampInterval.js +10 -0
- package/_cjs/actions/test/removeBlockTimestampInterval.js.map +1 -0
- package/_cjs/actions/test/reset.js +11 -0
- package/_cjs/actions/test/reset.js.map +1 -0
- package/_cjs/actions/test/revert.js +11 -0
- package/_cjs/actions/test/revert.js.map +1 -0
- package/_cjs/actions/test/sendUnsignedTransaction.js +30 -0
- package/_cjs/actions/test/sendUnsignedTransaction.js.map +1 -0
- package/_cjs/actions/test/setAutomine.js +18 -0
- package/_cjs/actions/test/setAutomine.js.map +1 -0
- package/_cjs/actions/test/setBalance.js +18 -0
- package/_cjs/actions/test/setBalance.js.map +1 -0
- package/_cjs/actions/test/setBlockGasLimit.js +12 -0
- package/_cjs/actions/test/setBlockGasLimit.js.map +1 -0
- package/_cjs/actions/test/setBlockTimestampInterval.js +16 -0
- package/_cjs/actions/test/setBlockTimestampInterval.js.map +1 -0
- package/_cjs/actions/test/setCode.js +11 -0
- package/_cjs/actions/test/setCode.js.map +1 -0
- package/_cjs/actions/test/setCoinbase.js +11 -0
- package/_cjs/actions/test/setCoinbase.js.map +1 -0
- package/_cjs/actions/test/setIntervalMining.js +16 -0
- package/_cjs/actions/test/setIntervalMining.js.map +1 -0
- package/_cjs/actions/test/setLoggingEnabled.js +11 -0
- package/_cjs/actions/test/setLoggingEnabled.js.map +1 -0
- package/_cjs/actions/test/setMinGasPrice.js +12 -0
- package/_cjs/actions/test/setMinGasPrice.js.map +1 -0
- package/_cjs/actions/test/setNextBlockBaseFeePerGas.js +12 -0
- package/_cjs/actions/test/setNextBlockBaseFeePerGas.js.map +1 -0
- package/_cjs/actions/test/setNextBlockTimestamp.js +12 -0
- package/_cjs/actions/test/setNextBlockTimestamp.js.map +1 -0
- package/_cjs/actions/test/setNonce.js +12 -0
- package/_cjs/actions/test/setNonce.js.map +1 -0
- package/_cjs/actions/test/setRpcUrl.js +11 -0
- package/_cjs/actions/test/setRpcUrl.js.map +1 -0
- package/_cjs/actions/test/setStorageAt.js +16 -0
- package/_cjs/actions/test/setStorageAt.js.map +1 -0
- package/_cjs/actions/test/snapshot.js +10 -0
- package/_cjs/actions/test/snapshot.js.map +1 -0
- package/_cjs/actions/test/stopImpersonatingAccount.js +11 -0
- package/_cjs/actions/test/stopImpersonatingAccount.js.map +1 -0
- package/_cjs/actions/wallet/addChain.js +23 -0
- package/_cjs/actions/wallet/addChain.js.map +1 -0
- package/_cjs/actions/wallet/deployContract.js +15 -0
- package/_cjs/actions/wallet/deployContract.js.map +1 -0
- package/_cjs/actions/wallet/getAddresses.js +12 -0
- package/_cjs/actions/wallet/getAddresses.js.map +1 -0
- package/_cjs/actions/wallet/getPermissions.js +9 -0
- package/_cjs/actions/wallet/getPermissions.js.map +1 -0
- package/_cjs/actions/wallet/prepareTransactionRequest.js +71 -0
- package/_cjs/actions/wallet/prepareTransactionRequest.js.map +1 -0
- package/_cjs/actions/wallet/requestAddresses.js +10 -0
- package/_cjs/actions/wallet/requestAddresses.js.map +1 -0
- package/_cjs/actions/wallet/requestPermissions.js +11 -0
- package/_cjs/actions/wallet/requestPermissions.js.map +1 -0
- package/_cjs/actions/wallet/sendRawTransaction.js +11 -0
- package/_cjs/actions/wallet/sendRawTransaction.js.map +1 -0
- package/_cjs/actions/wallet/sendTransaction.js +87 -0
- package/_cjs/actions/wallet/sendTransaction.js.map +1 -0
- package/_cjs/actions/wallet/signMessage.js +28 -0
- package/_cjs/actions/wallet/signMessage.js.map +1 -0
- package/_cjs/actions/wallet/signTransaction.js +48 -0
- package/_cjs/actions/wallet/signTransaction.js.map +1 -0
- package/_cjs/actions/wallet/signTypedData.js +30 -0
- package/_cjs/actions/wallet/signTypedData.js.map +1 -0
- package/_cjs/actions/wallet/switchChain.js +16 -0
- package/_cjs/actions/wallet/switchChain.js.map +1 -0
- package/_cjs/actions/wallet/watchAsset.js +12 -0
- package/_cjs/actions/wallet/watchAsset.js.map +1 -0
- package/_cjs/actions/wallet/writeContract.js +18 -0
- package/_cjs/actions/wallet/writeContract.js.map +1 -0
- package/_cjs/chains/celo/chainConfig.js +10 -0
- package/_cjs/chains/celo/chainConfig.js.map +1 -0
- package/_cjs/chains/celo/formatters.js +82 -0
- package/_cjs/chains/celo/formatters.js.map +1 -0
- package/_cjs/chains/celo/index.js +10 -0
- package/_cjs/chains/celo/index.js.map +1 -0
- package/_cjs/chains/celo/parsers.js +131 -0
- package/_cjs/chains/celo/parsers.js.map +1 -0
- package/_cjs/chains/celo/serializers.js +131 -0
- package/_cjs/chains/celo/serializers.js.map +1 -0
- package/_cjs/chains/celo/types.js +3 -0
- package/_cjs/chains/celo/types.js.map +1 -0
- package/_cjs/chains/celo/utils.js +44 -0
- package/_cjs/chains/celo/utils.js.map +1 -0
- package/_cjs/chains/definitions/arbitrum.js +24 -0
- package/_cjs/chains/definitions/arbitrum.js.map +1 -0
- package/_cjs/chains/definitions/arbitrumGoerli.js +30 -0
- package/_cjs/chains/definitions/arbitrumGoerli.js.map +1 -0
- package/_cjs/chains/definitions/arbitrumNova.js +24 -0
- package/_cjs/chains/definitions/arbitrumNova.js.map +1 -0
- package/_cjs/chains/definitions/arbitrumSepolia.js +32 -0
- package/_cjs/chains/definitions/arbitrumSepolia.js.map +1 -0
- package/_cjs/chains/definitions/astar.js +29 -0
- package/_cjs/chains/definitions/astar.js.map +1 -0
- package/_cjs/chains/definitions/astarZkatana.js +42 -0
- package/_cjs/chains/definitions/astarZkatana.js.map +1 -0
- package/_cjs/chains/definitions/aurora.js +20 -0
- package/_cjs/chains/definitions/aurora.js.map +1 -0
- package/_cjs/chains/definitions/auroraTestnet.js +21 -0
- package/_cjs/chains/definitions/auroraTestnet.js.map +1 -0
- package/_cjs/chains/definitions/avalanche.js +26 -0
- package/_cjs/chains/definitions/avalanche.js.map +1 -0
- package/_cjs/chains/definitions/avalancheFuji.js +27 -0
- package/_cjs/chains/definitions/avalancheFuji.js.map +1 -0
- package/_cjs/chains/definitions/base.js +30 -0
- package/_cjs/chains/definitions/base.js.map +1 -0
- package/_cjs/chains/definitions/baseGoerli.js +30 -0
- package/_cjs/chains/definitions/baseGoerli.js.map +1 -0
- package/_cjs/chains/definitions/baseSepolia.js +34 -0
- package/_cjs/chains/definitions/baseSepolia.js.map +1 -0
- package/_cjs/chains/definitions/bearNetworkChainMainnet.js +20 -0
- package/_cjs/chains/definitions/bearNetworkChainMainnet.js.map +1 -0
- package/_cjs/chains/definitions/bearNetworkChainTestnet.js +24 -0
- package/_cjs/chains/definitions/bearNetworkChainTestnet.js.map +1 -0
- package/_cjs/chains/definitions/boba.js +26 -0
- package/_cjs/chains/definitions/boba.js.map +1 -0
- package/_cjs/chains/definitions/bronos.js +20 -0
- package/_cjs/chains/definitions/bronos.js.map +1 -0
- package/_cjs/chains/definitions/bronosTestnet.js +21 -0
- package/_cjs/chains/definitions/bronosTestnet.js.map +1 -0
- package/_cjs/chains/definitions/bsc.js +26 -0
- package/_cjs/chains/definitions/bsc.js.map +1 -0
- package/_cjs/chains/definitions/bscTestnet.js +27 -0
- package/_cjs/chains/definitions/bscTestnet.js.map +1 -0
- package/_cjs/chains/definitions/bxn.js +21 -0
- package/_cjs/chains/definitions/bxn.js.map +1 -0
- package/_cjs/chains/definitions/bxnTestnet.js +25 -0
- package/_cjs/chains/definitions/bxnTestnet.js.map +1 -0
- package/_cjs/chains/definitions/canto.js +29 -0
- package/_cjs/chains/definitions/canto.js.map +1 -0
- package/_cjs/chains/definitions/celo.js +32 -0
- package/_cjs/chains/definitions/celo.js.map +1 -0
- package/_cjs/chains/definitions/celoAlfajores.js +34 -0
- package/_cjs/chains/definitions/celoAlfajores.js.map +1 -0
- package/_cjs/chains/definitions/celoCannoli.js +34 -0
- package/_cjs/chains/definitions/celoCannoli.js.map +1 -0
- package/_cjs/chains/definitions/chiliz.js +26 -0
- package/_cjs/chains/definitions/chiliz.js.map +1 -0
- package/_cjs/chains/definitions/classic.js +23 -0
- package/_cjs/chains/definitions/classic.js.map +1 -0
- package/_cjs/chains/definitions/confluxESpace.js +27 -0
- package/_cjs/chains/definitions/confluxESpace.js.map +1 -0
- package/_cjs/chains/definitions/coreDao.js +27 -0
- package/_cjs/chains/definitions/coreDao.js.map +1 -0
- package/_cjs/chains/definitions/cronos.js +26 -0
- package/_cjs/chains/definitions/cronos.js.map +1 -0
- package/_cjs/chains/definitions/cronosTestnet.js +30 -0
- package/_cjs/chains/definitions/cronosTestnet.js.map +1 -0
- package/_cjs/chains/definitions/crossbell.js +28 -0
- package/_cjs/chains/definitions/crossbell.js.map +1 -0
- package/_cjs/chains/definitions/dfk.js +25 -0
- package/_cjs/chains/definitions/dfk.js.map +1 -0
- package/_cjs/chains/definitions/dogechain.js +23 -0
- package/_cjs/chains/definitions/dogechain.js.map +1 -0
- package/_cjs/chains/definitions/edgeware.js +26 -0
- package/_cjs/chains/definitions/edgeware.js.map +1 -0
- package/_cjs/chains/definitions/edgewareTestnet.js +23 -0
- package/_cjs/chains/definitions/edgewareTestnet.js.map +1 -0
- package/_cjs/chains/definitions/ekta.js +20 -0
- package/_cjs/chains/definitions/ekta.js.map +1 -0
- package/_cjs/chains/definitions/ektaTestnet.js +21 -0
- package/_cjs/chains/definitions/ektaTestnet.js.map +1 -0
- package/_cjs/chains/definitions/eon.js +24 -0
- package/_cjs/chains/definitions/eon.js.map +1 -0
- package/_cjs/chains/definitions/eos.js +29 -0
- package/_cjs/chains/definitions/eos.js.map +1 -0
- package/_cjs/chains/definitions/eosTestnet.js +30 -0
- package/_cjs/chains/definitions/eosTestnet.js.map +1 -0
- package/_cjs/chains/definitions/evmos.js +20 -0
- package/_cjs/chains/definitions/evmos.js.map +1 -0
- package/_cjs/chains/definitions/evmosTestnet.js +23 -0
- package/_cjs/chains/definitions/evmosTestnet.js.map +1 -0
- package/_cjs/chains/definitions/fantom.js +26 -0
- package/_cjs/chains/definitions/fantom.js.map +1 -0
- package/_cjs/chains/definitions/fantomTestnet.js +26 -0
- package/_cjs/chains/definitions/fantomTestnet.js.map +1 -0
- package/_cjs/chains/definitions/fibo.js +20 -0
- package/_cjs/chains/definitions/fibo.js.map +1 -0
- package/_cjs/chains/definitions/filecoin.js +20 -0
- package/_cjs/chains/definitions/filecoin.js.map +1 -0
- package/_cjs/chains/definitions/filecoinCalibration.js +20 -0
- package/_cjs/chains/definitions/filecoinCalibration.js.map +1 -0
- package/_cjs/chains/definitions/filecoinHyperspace.js +20 -0
- package/_cjs/chains/definitions/filecoinHyperspace.js.map +1 -0
- package/_cjs/chains/definitions/flare.js +23 -0
- package/_cjs/chains/definitions/flare.js.map +1 -0
- package/_cjs/chains/definitions/flareTestnet.js +24 -0
- package/_cjs/chains/definitions/flareTestnet.js.map +1 -0
- package/_cjs/chains/definitions/foundry.js +20 -0
- package/_cjs/chains/definitions/foundry.js.map +1 -0
- package/_cjs/chains/definitions/fuse.js +22 -0
- package/_cjs/chains/definitions/fuse.js.map +1 -0
- package/_cjs/chains/definitions/fuseSparknet.js +19 -0
- package/_cjs/chains/definitions/fuseSparknet.js.map +1 -0
- package/_cjs/chains/definitions/gnosis.js +32 -0
- package/_cjs/chains/definitions/gnosis.js.map +1 -0
- package/_cjs/chains/definitions/gnosisChiado.js +33 -0
- package/_cjs/chains/definitions/gnosisChiado.js.map +1 -0
- package/_cjs/chains/definitions/gobi.js +22 -0
- package/_cjs/chains/definitions/gobi.js.map +1 -0
- package/_cjs/chains/definitions/goerli.js +35 -0
- package/_cjs/chains/definitions/goerli.js.map +1 -0
- package/_cjs/chains/definitions/haqqMainnet.js +25 -0
- package/_cjs/chains/definitions/haqqMainnet.js.map +1 -0
- package/_cjs/chains/definitions/haqqTestedge2.js +25 -0
- package/_cjs/chains/definitions/haqqTestedge2.js.map +1 -0
- package/_cjs/chains/definitions/hardhat.js +17 -0
- package/_cjs/chains/definitions/hardhat.js.map +1 -0
- package/_cjs/chains/definitions/harmonyOne.js +26 -0
- package/_cjs/chains/definitions/harmonyOne.js.map +1 -0
- package/_cjs/chains/definitions/holesky.js +22 -0
- package/_cjs/chains/definitions/holesky.js.map +1 -0
- package/_cjs/chains/definitions/iotex.js +23 -0
- package/_cjs/chains/definitions/iotex.js.map +1 -0
- package/_cjs/chains/definitions/iotexTestnet.js +23 -0
- package/_cjs/chains/definitions/iotexTestnet.js.map +1 -0
- package/_cjs/chains/definitions/kava.js +29 -0
- package/_cjs/chains/definitions/kava.js.map +1 -0
- package/_cjs/chains/definitions/kavaTestnet.js +32 -0
- package/_cjs/chains/definitions/kavaTestnet.js.map +1 -0
- package/_cjs/chains/definitions/klaytn.js +20 -0
- package/_cjs/chains/definitions/klaytn.js.map +1 -0
- package/_cjs/chains/definitions/kroma.js +22 -0
- package/_cjs/chains/definitions/kroma.js.map +1 -0
- package/_cjs/chains/definitions/kromaSepolia.js +22 -0
- package/_cjs/chains/definitions/kromaSepolia.js.map +1 -0
- package/_cjs/chains/definitions/linea.js +29 -0
- package/_cjs/chains/definitions/linea.js.map +1 -0
- package/_cjs/chains/definitions/lineaTestnet.js +29 -0
- package/_cjs/chains/definitions/lineaTestnet.js.map +1 -0
- package/_cjs/chains/definitions/localhost.js +17 -0
- package/_cjs/chains/definitions/localhost.js.map +1 -0
- package/_cjs/chains/definitions/lukso.js +31 -0
- package/_cjs/chains/definitions/lukso.js.map +1 -0
- package/_cjs/chains/definitions/mainnet.js +34 -0
- package/_cjs/chains/definitions/mainnet.js.map +1 -0
- package/_cjs/chains/definitions/manta.js +35 -0
- package/_cjs/chains/definitions/manta.js.map +1 -0
- package/_cjs/chains/definitions/mantaTestnet.js +36 -0
- package/_cjs/chains/definitions/mantaTestnet.js.map +1 -0
- package/_cjs/chains/definitions/mantle.js +29 -0
- package/_cjs/chains/definitions/mantle.js.map +1 -0
- package/_cjs/chains/definitions/mantleTestnet.js +24 -0
- package/_cjs/chains/definitions/mantleTestnet.js.map +1 -0
- package/_cjs/chains/definitions/meter.js +20 -0
- package/_cjs/chains/definitions/meter.js.map +1 -0
- package/_cjs/chains/definitions/meterTestnet.js +23 -0
- package/_cjs/chains/definitions/meterTestnet.js.map +1 -0
- package/_cjs/chains/definitions/metis.js +29 -0
- package/_cjs/chains/definitions/metis.js.map +1 -0
- package/_cjs/chains/definitions/metisGoerli.js +29 -0
- package/_cjs/chains/definitions/metisGoerli.js.map +1 -0
- package/_cjs/chains/definitions/mev.js +31 -0
- package/_cjs/chains/definitions/mev.js.map +1 -0
- package/_cjs/chains/definitions/mevTestnet.js +32 -0
- package/_cjs/chains/definitions/mevTestnet.js.map +1 -0
- package/_cjs/chains/definitions/modeTestnet.js +28 -0
- package/_cjs/chains/definitions/modeTestnet.js.map +1 -0
- package/_cjs/chains/definitions/moonbaseAlpha.js +33 -0
- package/_cjs/chains/definitions/moonbaseAlpha.js.map +1 -0
- package/_cjs/chains/definitions/moonbeam.js +33 -0
- package/_cjs/chains/definitions/moonbeam.js.map +1 -0
- package/_cjs/chains/definitions/moonbeamDev.js +20 -0
- package/_cjs/chains/definitions/moonbeamDev.js.map +1 -0
- package/_cjs/chains/definitions/moonriver.js +33 -0
- package/_cjs/chains/definitions/moonriver.js.map +1 -0
- package/_cjs/chains/definitions/neonDevnet.js +28 -0
- package/_cjs/chains/definitions/neonDevnet.js.map +1 -0
- package/_cjs/chains/definitions/neonMainnet.js +27 -0
- package/_cjs/chains/definitions/neonMainnet.js.map +1 -0
- package/_cjs/chains/definitions/nexi.js +27 -0
- package/_cjs/chains/definitions/nexi.js.map +1 -0
- package/_cjs/chains/definitions/nexilix.js +26 -0
- package/_cjs/chains/definitions/nexilix.js.map +1 -0
- package/_cjs/chains/definitions/oasys.js +21 -0
- package/_cjs/chains/definitions/oasys.js.map +1 -0
- package/_cjs/chains/definitions/okc.js +26 -0
- package/_cjs/chains/definitions/okc.js.map +1 -0
- package/_cjs/chains/definitions/opBNB.js +26 -0
- package/_cjs/chains/definitions/opBNB.js.map +1 -0
- package/_cjs/chains/definitions/opBNBTestnet.js +27 -0
- package/_cjs/chains/definitions/opBNBTestnet.js.map +1 -0
- package/_cjs/chains/definitions/optimism.js +30 -0
- package/_cjs/chains/definitions/optimism.js.map +1 -0
- package/_cjs/chains/definitions/optimismGoerli.js +31 -0
- package/_cjs/chains/definitions/optimismGoerli.js.map +1 -0
- package/_cjs/chains/definitions/optimismSepolia.js +31 -0
- package/_cjs/chains/definitions/optimismSepolia.js.map +1 -0
- package/_cjs/chains/definitions/plinga.js +27 -0
- package/_cjs/chains/definitions/plinga.js.map +1 -0
- package/_cjs/chains/definitions/polygon.js +27 -0
- package/_cjs/chains/definitions/polygon.js.map +1 -0
- package/_cjs/chains/definitions/polygonMumbai.js +28 -0
- package/_cjs/chains/definitions/polygonMumbai.js.map +1 -0
- package/_cjs/chains/definitions/polygonZkEvm.js +27 -0
- package/_cjs/chains/definitions/polygonZkEvm.js.map +1 -0
- package/_cjs/chains/definitions/polygonZkEvmTestnet.js +28 -0
- package/_cjs/chains/definitions/polygonZkEvmTestnet.js.map +1 -0
- package/_cjs/chains/definitions/pulsechain.js +32 -0
- package/_cjs/chains/definitions/pulsechain.js.map +1 -0
- package/_cjs/chains/definitions/pulsechainV4.js +32 -0
- package/_cjs/chains/definitions/pulsechainV4.js.map +1 -0
- package/_cjs/chains/definitions/qMainnet.js +23 -0
- package/_cjs/chains/definitions/qMainnet.js.map +1 -0
- package/_cjs/chains/definitions/qTestnet.js +24 -0
- package/_cjs/chains/definitions/qTestnet.js.map +1 -0
- package/_cjs/chains/definitions/rollux.js +29 -0
- package/_cjs/chains/definitions/rollux.js.map +1 -0
- package/_cjs/chains/definitions/rolluxTestnet.js +32 -0
- package/_cjs/chains/definitions/rolluxTestnet.js.map +1 -0
- package/_cjs/chains/definitions/ronin.js +24 -0
- package/_cjs/chains/definitions/ronin.js.map +1 -0
- package/_cjs/chains/definitions/saigon.js +28 -0
- package/_cjs/chains/definitions/saigon.js.map +1 -0
- package/_cjs/chains/definitions/scroll.js +29 -0
- package/_cjs/chains/definitions/scroll.js.map +1 -0
- package/_cjs/chains/definitions/scrollSepolia.js +28 -0
- package/_cjs/chains/definitions/scrollSepolia.js.map +1 -0
- package/_cjs/chains/definitions/scrollTestnet.js +23 -0
- package/_cjs/chains/definitions/scrollTestnet.js.map +1 -0
- package/_cjs/chains/definitions/sepolia.js +33 -0
- package/_cjs/chains/definitions/sepolia.js.map +1 -0
- package/_cjs/chains/definitions/shardeumSphinx.js +22 -0
- package/_cjs/chains/definitions/shardeumSphinx.js.map +1 -0
- package/_cjs/chains/definitions/skale/brawl.js +23 -0
- package/_cjs/chains/definitions/skale/brawl.js.map +1 -0
- package/_cjs/chains/definitions/skale/calypso.js +30 -0
- package/_cjs/chains/definitions/skale/calypso.js.map +1 -0
- package/_cjs/chains/definitions/skale/calypsoTestnet.js +33 -0
- package/_cjs/chains/definitions/skale/calypsoTestnet.js.map +1 -0
- package/_cjs/chains/definitions/skale/chaosTestnet.js +33 -0
- package/_cjs/chains/definitions/skale/chaosTestnet.js.map +1 -0
- package/_cjs/chains/definitions/skale/cryptoBlades.js +25 -0
- package/_cjs/chains/definitions/skale/cryptoBlades.js.map +1 -0
- package/_cjs/chains/definitions/skale/cryptoColosseum.js +23 -0
- package/_cjs/chains/definitions/skale/cryptoColosseum.js.map +1 -0
- package/_cjs/chains/definitions/skale/europa.js +28 -0
- package/_cjs/chains/definitions/skale/europa.js.map +1 -0
- package/_cjs/chains/definitions/skale/europaTestnet.js +31 -0
- package/_cjs/chains/definitions/skale/europaTestnet.js.map +1 -0
- package/_cjs/chains/definitions/skale/exorde.js +23 -0
- package/_cjs/chains/definitions/skale/exorde.js.map +1 -0
- package/_cjs/chains/definitions/skale/humanProtocol.js +23 -0
- package/_cjs/chains/definitions/skale/humanProtocol.js.map +1 -0
- package/_cjs/chains/definitions/skale/nebula.js +28 -0
- package/_cjs/chains/definitions/skale/nebula.js.map +1 -0
- package/_cjs/chains/definitions/skale/nebulaTestnet.js +31 -0
- package/_cjs/chains/definitions/skale/nebulaTestnet.js.map +1 -0
- package/_cjs/chains/definitions/skale/razor.js +23 -0
- package/_cjs/chains/definitions/skale/razor.js.map +1 -0
- package/_cjs/chains/definitions/skale/titan.js +28 -0
- package/_cjs/chains/definitions/skale/titan.js.map +1 -0
- package/_cjs/chains/definitions/skale/titanTestnet.js +33 -0
- package/_cjs/chains/definitions/skale/titanTestnet.js.map +1 -0
- package/_cjs/chains/definitions/songbird.js +23 -0
- package/_cjs/chains/definitions/songbird.js.map +1 -0
- package/_cjs/chains/definitions/songbirdTestnet.js +24 -0
- package/_cjs/chains/definitions/songbirdTestnet.js.map +1 -0
- package/_cjs/chains/definitions/spicy.js +34 -0
- package/_cjs/chains/definitions/spicy.js.map +1 -0
- package/_cjs/chains/definitions/syscoin.js +29 -0
- package/_cjs/chains/definitions/syscoin.js.map +1 -0
- package/_cjs/chains/definitions/syscoinTestnet.js +29 -0
- package/_cjs/chains/definitions/syscoinTestnet.js.map +1 -0
- package/_cjs/chains/definitions/taikoJolnir.js +21 -0
- package/_cjs/chains/definitions/taikoJolnir.js.map +1 -0
- package/_cjs/chains/definitions/taikoTestnetSepolia.js +21 -0
- package/_cjs/chains/definitions/taikoTestnetSepolia.js.map +1 -0
- package/_cjs/chains/definitions/taraxa.js +21 -0
- package/_cjs/chains/definitions/taraxa.js.map +1 -0
- package/_cjs/chains/definitions/taraxaTestnet.js +22 -0
- package/_cjs/chains/definitions/taraxaTestnet.js.map +1 -0
- package/_cjs/chains/definitions/telos.js +29 -0
- package/_cjs/chains/definitions/telos.js.map +1 -0
- package/_cjs/chains/definitions/telosTestnet.js +24 -0
- package/_cjs/chains/definitions/telosTestnet.js.map +1 -0
- package/_cjs/chains/definitions/tenet.js +23 -0
- package/_cjs/chains/definitions/tenet.js.map +1 -0
- package/_cjs/chains/definitions/thunderTestnet.js +22 -0
- package/_cjs/chains/definitions/thunderTestnet.js.map +1 -0
- package/_cjs/chains/definitions/vechain.js +25 -0
- package/_cjs/chains/definitions/vechain.js.map +1 -0
- package/_cjs/chains/definitions/wanchain.js +30 -0
- package/_cjs/chains/definitions/wanchain.js.map +1 -0
- package/_cjs/chains/definitions/wanchainTestnet.js +28 -0
- package/_cjs/chains/definitions/wanchainTestnet.js.map +1 -0
- package/_cjs/chains/definitions/xdc.js +21 -0
- package/_cjs/chains/definitions/xdc.js.map +1 -0
- package/_cjs/chains/definitions/xdcTestnet.js +21 -0
- package/_cjs/chains/definitions/xdcTestnet.js.map +1 -0
- package/_cjs/chains/definitions/zetachainAthensTestnet.js +26 -0
- package/_cjs/chains/definitions/zetachainAthensTestnet.js.map +1 -0
- package/_cjs/chains/definitions/zhejiang.js +22 -0
- package/_cjs/chains/definitions/zhejiang.js.map +1 -0
- package/_cjs/chains/definitions/zkSync.js +34 -0
- package/_cjs/chains/definitions/zkSync.js.map +1 -0
- package/_cjs/chains/definitions/zkSyncTestnet.js +31 -0
- package/_cjs/chains/definitions/zkSyncTestnet.js.map +1 -0
- package/_cjs/chains/definitions/zora.js +32 -0
- package/_cjs/chains/definitions/zora.js.map +1 -0
- package/_cjs/chains/definitions/zoraSepolia.js +41 -0
- package/_cjs/chains/definitions/zoraSepolia.js.map +1 -0
- package/_cjs/chains/definitions/zoraTestnet.js +36 -0
- package/_cjs/chains/definitions/zoraTestnet.js.map +1 -0
- package/_cjs/chains/index.js +325 -0
- package/_cjs/chains/index.js.map +1 -0
- package/_cjs/chains/opStack/abis.js +77 -0
- package/_cjs/chains/opStack/abis.js.map +1 -0
- package/_cjs/chains/opStack/actions/estimateContractL1Fee.js +36 -0
- package/_cjs/chains/opStack/actions/estimateContractL1Fee.js.map +1 -0
- package/_cjs/chains/opStack/actions/estimateContractL1Gas.js +36 -0
- package/_cjs/chains/opStack/actions/estimateContractL1Gas.js.map +1 -0
- package/_cjs/chains/opStack/actions/estimateContractTotalFee.js +36 -0
- package/_cjs/chains/opStack/actions/estimateContractTotalFee.js.map +1 -0
- package/_cjs/chains/opStack/actions/estimateContractTotalGas.js +36 -0
- package/_cjs/chains/opStack/actions/estimateContractTotalGas.js.map +1 -0
- package/_cjs/chains/opStack/actions/estimateL1Fee.js +53 -0
- package/_cjs/chains/opStack/actions/estimateL1Fee.js.map +1 -0
- package/_cjs/chains/opStack/actions/estimateL1Gas.js +53 -0
- package/_cjs/chains/opStack/actions/estimateL1Gas.js.map +1 -0
- package/_cjs/chains/opStack/actions/estimateTotalFee.js +18 -0
- package/_cjs/chains/opStack/actions/estimateTotalFee.js.map +1 -0
- package/_cjs/chains/opStack/actions/estimateTotalGas.js +16 -0
- package/_cjs/chains/opStack/actions/estimateTotalGas.js.map +1 -0
- package/_cjs/chains/opStack/chainConfig.js +10 -0
- package/_cjs/chains/opStack/chainConfig.js.map +1 -0
- package/_cjs/chains/opStack/contracts.js +16 -0
- package/_cjs/chains/opStack/contracts.js.map +1 -0
- package/_cjs/chains/opStack/decorators/public.js +27 -0
- package/_cjs/chains/opStack/decorators/public.js.map +1 -0
- package/_cjs/chains/opStack/formatters.js +54 -0
- package/_cjs/chains/opStack/formatters.js.map +1 -0
- package/_cjs/chains/opStack/index.js +42 -0
- package/_cjs/chains/opStack/index.js.map +1 -0
- package/_cjs/chains/opStack/types.js +3 -0
- package/_cjs/chains/opStack/types.js.map +1 -0
- package/_cjs/chains/utils.js +12 -0
- package/_cjs/chains/utils.js.map +1 -0
- package/_cjs/chains/zksync/chainConfig.js +10 -0
- package/_cjs/chains/zksync/chainConfig.js.map +1 -0
- package/_cjs/chains/zksync/formatters.js +128 -0
- package/_cjs/chains/zksync/formatters.js.map +1 -0
- package/_cjs/chains/zksync/index.js +8 -0
- package/_cjs/chains/zksync/index.js.map +1 -0
- package/_cjs/chains/zksync/serializers.js +74 -0
- package/_cjs/chains/zksync/serializers.js.map +1 -0
- package/_cjs/chains/zksync/types.js +3 -0
- package/_cjs/chains/zksync/types.js.map +1 -0
- package/_cjs/clients/createClient.js +42 -0
- package/_cjs/clients/createClient.js.map +1 -0
- package/_cjs/clients/createPublicClient.js +17 -0
- package/_cjs/clients/createPublicClient.js.map +1 -0
- package/_cjs/clients/createTestClient.js +20 -0
- package/_cjs/clients/createTestClient.js.map +1 -0
- package/_cjs/clients/createWalletClient.js +18 -0
- package/_cjs/clients/createWalletClient.js.map +1 -0
- package/_cjs/clients/decorators/public.js +101 -0
- package/_cjs/clients/decorators/public.js.map +1 -0
- package/_cjs/clients/decorators/test.js +74 -0
- package/_cjs/clients/decorators/test.js.map +1 -0
- package/_cjs/clients/decorators/wallet.js +41 -0
- package/_cjs/clients/decorators/wallet.js.map +1 -0
- package/_cjs/clients/transports/createTransport.js +13 -0
- package/_cjs/clients/transports/createTransport.js.map +1 -0
- package/_cjs/clients/transports/custom.js +17 -0
- package/_cjs/clients/transports/custom.js.map +1 -0
- package/_cjs/clients/transports/fallback.js +122 -0
- package/_cjs/clients/transports/fallback.js.map +1 -0
- package/_cjs/clients/transports/http.js +59 -0
- package/_cjs/clients/transports/http.js.map +1 -0
- package/_cjs/clients/transports/webSocket.js +81 -0
- package/_cjs/clients/transports/webSocket.js.map +1 -0
- package/_cjs/constants/abis.js +1350 -0
- package/_cjs/constants/abis.js.map +1 -0
- package/_cjs/constants/address.js +5 -0
- package/_cjs/constants/address.js.map +1 -0
- package/_cjs/constants/bytes.js +5 -0
- package/_cjs/constants/bytes.js.map +1 -0
- package/_cjs/constants/contract.js +5 -0
- package/_cjs/constants/contract.js.map +1 -0
- package/_cjs/constants/contracts.js +5 -0
- package/_cjs/constants/contracts.js.map +1 -0
- package/_cjs/constants/number.js +101 -0
- package/_cjs/constants/number.js.map +1 -0
- package/_cjs/constants/solidity.js +35 -0
- package/_cjs/constants/solidity.js.map +1 -0
- package/_cjs/constants/strings.js +5 -0
- package/_cjs/constants/strings.js.map +1 -0
- package/_cjs/constants/unit.js +16 -0
- package/_cjs/constants/unit.js.map +1 -0
- package/_cjs/ens/index.js +20 -0
- package/_cjs/ens/index.js.map +1 -0
- package/_cjs/errors/abi.js +461 -0
- package/_cjs/errors/abi.js.map +1 -0
- package/_cjs/errors/account.js +23 -0
- package/_cjs/errors/account.js.map +1 -0
- package/_cjs/errors/address.js +17 -0
- package/_cjs/errors/address.js.map +1 -0
- package/_cjs/errors/base.js +83 -0
- package/_cjs/errors/base.js.map +1 -0
- package/_cjs/errors/block.js +22 -0
- package/_cjs/errors/block.js.map +1 -0
- package/_cjs/errors/ccip.js +69 -0
- package/_cjs/errors/ccip.js.map +1 -0
- package/_cjs/errors/chain.js +86 -0
- package/_cjs/errors/chain.js.map +1 -0
- package/_cjs/errors/contract.js +286 -0
- package/_cjs/errors/contract.js.map +1 -0
- package/_cjs/errors/cursor.js +29 -0
- package/_cjs/errors/cursor.js.map +1 -0
- package/_cjs/errors/data.js +31 -0
- package/_cjs/errors/data.js.map +1 -0
- package/_cjs/errors/encoding.js +65 -0
- package/_cjs/errors/encoding.js.map +1 -0
- package/_cjs/errors/ens.js +59 -0
- package/_cjs/errors/ens.js.map +1 -0
- package/_cjs/errors/estimateGas.js +49 -0
- package/_cjs/errors/estimateGas.js.map +1 -0
- package/_cjs/errors/fee.js +42 -0
- package/_cjs/errors/fee.js.map +1 -0
- package/_cjs/errors/log.js +17 -0
- package/_cjs/errors/log.js.map +1 -0
- package/_cjs/errors/node.js +262 -0
- package/_cjs/errors/node.js.map +1 -0
- package/_cjs/errors/request.js +107 -0
- package/_cjs/errors/request.js.map +1 -0
- package/_cjs/errors/rpc.js +448 -0
- package/_cjs/errors/rpc.js.map +1 -0
- package/_cjs/errors/transaction.js +225 -0
- package/_cjs/errors/transaction.js.map +1 -0
- package/_cjs/errors/transport.js +13 -0
- package/_cjs/errors/transport.js.map +1 -0
- package/_cjs/errors/version.js +1 -1
- package/_cjs/index.js +486 -0
- package/_cjs/index.js.map +1 -0
- package/_cjs/types/account.js +3 -0
- package/_cjs/types/account.js.map +1 -0
- package/_cjs/types/block.js +3 -0
- package/_cjs/types/block.js.map +1 -0
- package/_cjs/types/chain.js +3 -0
- package/_cjs/types/chain.js.map +1 -0
- package/_cjs/types/contract.js +3 -0
- package/_cjs/types/contract.js.map +1 -0
- package/_cjs/types/eip1193.js +24 -0
- package/_cjs/types/eip1193.js.map +1 -0
- package/_cjs/types/ens.js +3 -0
- package/_cjs/types/ens.js.map +1 -0
- package/_cjs/types/fee.js +3 -0
- package/_cjs/types/fee.js.map +1 -0
- package/_cjs/types/filter.js +3 -0
- package/_cjs/types/filter.js.map +1 -0
- package/_cjs/types/log.js +3 -0
- package/_cjs/types/log.js.map +1 -0
- package/_cjs/types/misc.js +3 -0
- package/_cjs/types/misc.js.map +1 -0
- package/_cjs/types/multicall.js +3 -0
- package/_cjs/types/multicall.js.map +1 -0
- package/_cjs/types/proof.js +3 -0
- package/_cjs/types/proof.js.map +1 -0
- package/_cjs/types/rpc.js +3 -0
- package/_cjs/types/rpc.js.map +1 -0
- package/_cjs/types/transaction.js +3 -0
- package/_cjs/types/transaction.js.map +1 -0
- package/_cjs/types/transport.js +3 -0
- package/_cjs/types/transport.js.map +1 -0
- package/_cjs/types/typedData.js +3 -0
- package/_cjs/types/typedData.js.map +1 -0
- package/_cjs/types/utils.js +3 -0
- package/_cjs/types/utils.js.map +1 -0
- package/_cjs/types/window.js +3 -0
- package/_cjs/types/window.js.map +1 -0
- package/_cjs/types/withdrawal.js +3 -0
- package/_cjs/types/withdrawal.js.map +1 -0
- package/_cjs/utils/abi/decodeAbiParameters.js +210 -0
- package/_cjs/utils/abi/decodeAbiParameters.js.map +1 -0
- package/_cjs/utils/abi/decodeDeployData.js +22 -0
- package/_cjs/utils/abi/decodeDeployData.js.map +1 -0
- package/_cjs/utils/abi/decodeErrorResult.js +30 -0
- package/_cjs/utils/abi/decodeErrorResult.js.map +1 -0
- package/_cjs/utils/abi/decodeEventLog.js +85 -0
- package/_cjs/utils/abi/decodeEventLog.js.map +1 -0
- package/_cjs/utils/abi/decodeFunctionData.js +28 -0
- package/_cjs/utils/abi/decodeFunctionData.js.map +1 -0
- package/_cjs/utils/abi/decodeFunctionResult.js +29 -0
- package/_cjs/utils/abi/decodeFunctionResult.js.map +1 -0
- package/_cjs/utils/abi/encodeAbiParameters.js +211 -0
- package/_cjs/utils/abi/encodeAbiParameters.js.map +1 -0
- package/_cjs/utils/abi/encodeDeployData.js +23 -0
- package/_cjs/utils/abi/encodeDeployData.js.map +1 -0
- package/_cjs/utils/abi/encodeErrorResult.js +33 -0
- package/_cjs/utils/abi/encodeErrorResult.js.map +1 -0
- package/_cjs/utils/abi/encodeEventTopics.js +53 -0
- package/_cjs/utils/abi/encodeEventTopics.js.map +1 -0
- package/_cjs/utils/abi/encodeFunctionData.js +34 -0
- package/_cjs/utils/abi/encodeFunctionData.js.map +1 -0
- package/_cjs/utils/abi/encodeFunctionResult.js +27 -0
- package/_cjs/utils/abi/encodeFunctionResult.js.map +1 -0
- package/_cjs/utils/abi/encodePacked.js +73 -0
- package/_cjs/utils/abi/encodePacked.js.map +1 -0
- package/_cjs/utils/abi/formatAbiItem.js +27 -0
- package/_cjs/utils/abi/formatAbiItem.js.map +1 -0
- package/_cjs/utils/abi/formatAbiItemWithArgs.js +17 -0
- package/_cjs/utils/abi/formatAbiItemWithArgs.js.map +1 -0
- package/_cjs/utils/abi/getAbiItem.js +84 -0
- package/_cjs/utils/abi/getAbiItem.js.map +1 -0
- package/_cjs/utils/accounts.js +8 -0
- package/_cjs/utils/accounts.js.map +1 -0
- package/_cjs/utils/address/getAddress.js +31 -0
- package/_cjs/utils/address/getAddress.js.map +1 -0
- package/_cjs/utils/address/getContractAddress.js +42 -0
- package/_cjs/utils/address/getContractAddress.js.map +1 -0
- package/_cjs/utils/address/isAddress.js +9 -0
- package/_cjs/utils/address/isAddress.js.map +1 -0
- package/_cjs/utils/address/isAddressEqual.js +14 -0
- package/_cjs/utils/address/isAddressEqual.js.map +1 -0
- package/_cjs/utils/buildRequest.js +93 -0
- package/_cjs/utils/buildRequest.js.map +1 -0
- package/_cjs/utils/ccip.js +121 -0
- package/_cjs/utils/ccip.js.map +1 -0
- package/_cjs/utils/chain/assertCurrentChain.js +12 -0
- package/_cjs/utils/chain/assertCurrentChain.js.map +1 -0
- package/_cjs/utils/chain/defineChain.js +13 -0
- package/_cjs/utils/chain/defineChain.js.map +1 -0
- package/_cjs/utils/chain/extractChain.js +8 -0
- package/_cjs/utils/chain/extractChain.js.map +1 -0
- package/_cjs/utils/chain/getChainContractAddress.js +26 -0
- package/_cjs/utils/chain/getChainContractAddress.js.map +1 -0
- package/_cjs/utils/cursor.js +134 -0
- package/_cjs/utils/cursor.js.map +1 -0
- package/_cjs/utils/data/concat.js +28 -0
- package/_cjs/utils/data/concat.js.map +1 -0
- package/_cjs/utils/data/isBytes.js +14 -0
- package/_cjs/utils/data/isBytes.js.map +1 -0
- package/_cjs/utils/data/isBytesEqual.js +13 -0
- package/_cjs/utils/data/isBytesEqual.js.map +1 -0
- package/_cjs/utils/data/isHex.js +12 -0
- package/_cjs/utils/data/isHex.js.map +1 -0
- package/_cjs/utils/data/pad.js +42 -0
- package/_cjs/utils/data/pad.js.map +1 -0
- package/_cjs/utils/data/size.js +11 -0
- package/_cjs/utils/data/size.js.map +1 -0
- package/_cjs/utils/data/slice.js +54 -0
- package/_cjs/utils/data/slice.js.map +1 -0
- package/_cjs/utils/data/trim.js +25 -0
- package/_cjs/utils/data/trim.js.map +1 -0
- package/_cjs/utils/encoding/fromBytes.js +56 -0
- package/_cjs/utils/encoding/fromBytes.js.map +1 -0
- package/_cjs/utils/encoding/fromHex.js +70 -0
- package/_cjs/utils/encoding/fromHex.js.map +1 -0
- package/_cjs/utils/encoding/fromRlp.js +67 -0
- package/_cjs/utils/encoding/fromRlp.js.map +1 -0
- package/_cjs/utils/encoding/toBytes.js +83 -0
- package/_cjs/utils/encoding/toBytes.js.map +1 -0
- package/_cjs/utils/encoding/toHex.js +79 -0
- package/_cjs/utils/encoding/toHex.js.map +1 -0
- package/_cjs/utils/encoding/toRlp.js +105 -0
- package/_cjs/utils/encoding/toRlp.js.map +1 -0
- package/_cjs/utils/ens/avatar/parseAvatarRecord.js +34 -0
- package/_cjs/utils/ens/avatar/parseAvatarRecord.js.map +1 -0
- package/_cjs/utils/ens/avatar/utils.js +186 -0
- package/_cjs/utils/ens/avatar/utils.js.map +1 -0
- package/_cjs/utils/ens/encodeLabelhash.js +8 -0
- package/_cjs/utils/ens/encodeLabelhash.js.map +1 -0
- package/_cjs/utils/ens/encodedLabelToLabelhash.js +18 -0
- package/_cjs/utils/ens/encodedLabelToLabelhash.js.map +1 -0
- package/_cjs/utils/ens/errors.js +24 -0
- package/_cjs/utils/ens/errors.js.map +1 -0
- package/_cjs/utils/ens/labelhash.js +15 -0
- package/_cjs/utils/ens/labelhash.js.map +1 -0
- package/_cjs/utils/ens/namehash.js +24 -0
- package/_cjs/utils/ens/namehash.js.map +1 -0
- package/_cjs/utils/ens/normalize.js +9 -0
- package/_cjs/utils/ens/normalize.js.map +1 -0
- package/_cjs/utils/ens/packetToBytes.js +27 -0
- package/_cjs/utils/ens/packetToBytes.js.map +1 -0
- package/_cjs/utils/errors/getCallError.js +20 -0
- package/_cjs/utils/errors/getCallError.js.map +1 -0
- package/_cjs/utils/errors/getContractError.js +39 -0
- package/_cjs/utils/errors/getContractError.js.map +1 -0
- package/_cjs/utils/errors/getEstimateGasError.js +20 -0
- package/_cjs/utils/errors/getEstimateGasError.js.map +1 -0
- package/_cjs/utils/errors/getNodeError.js +65 -0
- package/_cjs/utils/errors/getNodeError.js.map +1 -0
- package/_cjs/utils/errors/getTransactionError.js +20 -0
- package/_cjs/utils/errors/getTransactionError.js.map +1 -0
- package/_cjs/utils/filters/createFilterRequestScope.js +14 -0
- package/_cjs/utils/filters/createFilterRequestScope.js.map +1 -0
- package/_cjs/utils/formatters/block.js +32 -0
- package/_cjs/utils/formatters/block.js.map +1 -0
- package/_cjs/utils/formatters/extract.js +24 -0
- package/_cjs/utils/formatters/extract.js.map +1 -0
- package/_cjs/utils/formatters/feeHistory.js +13 -0
- package/_cjs/utils/formatters/feeHistory.js.map +1 -0
- package/_cjs/utils/formatters/formatter.js +25 -0
- package/_cjs/utils/formatters/formatter.js.map +1 -0
- package/_cjs/utils/formatters/log.js +18 -0
- package/_cjs/utils/formatters/log.js.map +1 -0
- package/_cjs/utils/formatters/proof.js +22 -0
- package/_cjs/utils/formatters/proof.js.map +1 -0
- package/_cjs/utils/formatters/transaction.js +66 -0
- package/_cjs/utils/formatters/transaction.js.map +1 -0
- package/_cjs/utils/formatters/transactionReceipt.js +47 -0
- package/_cjs/utils/formatters/transactionReceipt.js.map +1 -0
- package/_cjs/utils/formatters/transactionRequest.js +39 -0
- package/_cjs/utils/formatters/transactionRequest.js.map +1 -0
- package/_cjs/utils/getAction.js +8 -0
- package/_cjs/utils/getAction.js.map +1 -0
- package/_cjs/utils/hash/getEventSelector.js +10 -0
- package/_cjs/utils/hash/getEventSelector.js.map +1 -0
- package/_cjs/utils/hash/getEventSignature.js +9 -0
- package/_cjs/utils/hash/getEventSignature.js.map +1 -0
- package/_cjs/utils/hash/getFunctionSelector.js +11 -0
- package/_cjs/utils/hash/getFunctionSelector.js.map +1 -0
- package/_cjs/utils/hash/getFunctionSignature.js +15 -0
- package/_cjs/utils/hash/getFunctionSignature.js.map +1 -0
- package/_cjs/utils/hash/hashFunction.js +17 -0
- package/_cjs/utils/hash/hashFunction.js.map +1 -0
- package/_cjs/utils/hash/isHash.js +10 -0
- package/_cjs/utils/hash/isHash.js.map +1 -0
- package/_cjs/utils/hash/keccak256.js +16 -0
- package/_cjs/utils/hash/keccak256.js.map +1 -0
- package/_cjs/utils/hash/normalizeSignature.js +48 -0
- package/_cjs/utils/hash/normalizeSignature.js.map +1 -0
- package/_cjs/utils/index.js +213 -0
- package/_cjs/utils/index.js.map +1 -0
- package/_cjs/utils/observe.js +42 -0
- package/_cjs/utils/observe.js.map +1 -0
- package/_cjs/utils/poll.js +27 -0
- package/_cjs/utils/poll.js.map +1 -0
- package/_cjs/utils/promise/createBatchScheduler.js +49 -0
- package/_cjs/utils/promise/createBatchScheduler.js.map +1 -0
- package/_cjs/utils/promise/withCache.js +47 -0
- package/_cjs/utils/promise/withCache.js.map +1 -0
- package/_cjs/utils/promise/withRetry.js +29 -0
- package/_cjs/utils/promise/withRetry.js.map +1 -0
- package/_cjs/utils/promise/withTimeout.js +35 -0
- package/_cjs/utils/promise/withTimeout.js.map +1 -0
- package/_cjs/utils/regex.js +7 -0
- package/_cjs/utils/regex.js.map +1 -0
- package/_cjs/utils/rpc.js +154 -0
- package/_cjs/utils/rpc.js.map +1 -0
- package/_cjs/utils/signature/compactSignatureToHex.js +10 -0
- package/_cjs/utils/signature/compactSignatureToHex.js.map +1 -0
- package/_cjs/utils/signature/compactSignatureToSignature.js +15 -0
- package/_cjs/utils/signature/compactSignatureToSignature.js.map +1 -0
- package/_cjs/utils/signature/hashMessage.js +20 -0
- package/_cjs/utils/signature/hashMessage.js.map +1 -0
- package/_cjs/utils/signature/hashTypedData.js +124 -0
- package/_cjs/utils/signature/hashTypedData.js.map +1 -0
- package/_cjs/utils/signature/hexToCompactSignature.js +14 -0
- package/_cjs/utils/signature/hexToCompactSignature.js.map +1 -0
- package/_cjs/utils/signature/hexToSignature.js +12 -0
- package/_cjs/utils/signature/hexToSignature.js.map +1 -0
- package/_cjs/utils/signature/recoverAddress.js +10 -0
- package/_cjs/utils/signature/recoverAddress.js.map +1 -0
- package/_cjs/utils/signature/recoverMessageAddress.js +10 -0
- package/_cjs/utils/signature/recoverMessageAddress.js.map +1 -0
- package/_cjs/utils/signature/recoverPublicKey.js +21 -0
- package/_cjs/utils/signature/recoverPublicKey.js.map +1 -0
- package/_cjs/utils/signature/recoverTypedDataAddress.js +19 -0
- package/_cjs/utils/signature/recoverTypedDataAddress.js.map +1 -0
- package/_cjs/utils/signature/signatureToCompactSignature.js +17 -0
- package/_cjs/utils/signature/signatureToCompactSignature.js.map +1 -0
- package/_cjs/utils/signature/signatureToHex.js +11 -0
- package/_cjs/utils/signature/signatureToHex.js.map +1 -0
- package/_cjs/utils/signature/verifyMessage.js +11 -0
- package/_cjs/utils/signature/verifyMessage.js.map +1 -0
- package/_cjs/utils/signature/verifyTypedData.js +18 -0
- package/_cjs/utils/signature/verifyTypedData.js.map +1 -0
- package/_cjs/utils/stringify.js +9 -0
- package/_cjs/utils/stringify.js.map +1 -0
- package/_cjs/utils/transaction/assertRequest.js +28 -0
- package/_cjs/utils/transaction/assertRequest.js.map +1 -0
- package/_cjs/utils/transaction/assertTransaction.js +51 -0
- package/_cjs/utils/transaction/assertTransaction.js.map +1 -0
- package/_cjs/utils/transaction/getSerializedTransactionType.js +18 -0
- package/_cjs/utils/transaction/getSerializedTransactionType.js.map +1 -0
- package/_cjs/utils/transaction/getTransactionType.js +19 -0
- package/_cjs/utils/transaction/getTransactionType.js.map +1 -0
- package/_cjs/utils/transaction/parseTransaction.js +213 -0
- package/_cjs/utils/transaction/parseTransaction.js.map +1 -0
- package/_cjs/utils/transaction/serializeAccessList.js +26 -0
- package/_cjs/utils/transaction/serializeAccessList.js.map +1 -0
- package/_cjs/utils/transaction/serializeTransaction.js +123 -0
- package/_cjs/utils/transaction/serializeTransaction.js.map +1 -0
- package/_cjs/utils/typedData.js +75 -0
- package/_cjs/utils/typedData.js.map +1 -0
- package/_cjs/utils/uid.js +18 -0
- package/_cjs/utils/uid.js.map +1 -0
- package/_cjs/utils/unit/formatEther.js +10 -0
- package/_cjs/utils/unit/formatEther.js.map +1 -0
- package/_cjs/utils/unit/formatGwei.js +10 -0
- package/_cjs/utils/unit/formatGwei.js.map +1 -0
- package/_cjs/utils/unit/formatUnits.js +18 -0
- package/_cjs/utils/unit/formatUnits.js.map +1 -0
- package/_cjs/utils/unit/parseEther.js +10 -0
- package/_cjs/utils/unit/parseEther.js.map +1 -0
- package/_cjs/utils/unit/parseGwei.js +10 -0
- package/_cjs/utils/unit/parseGwei.js.map +1 -0
- package/_cjs/utils/unit/parseUnits.js +38 -0
- package/_cjs/utils/unit/parseUnits.js.map +1 -0
- package/_cjs/utils/wait.js +8 -0
- package/_cjs/utils/wait.js.map +1 -0
- package/_cjs/window/index.js +4 -0
- package/_cjs/window/index.js.map +1 -0
- package/_esm/actions/test/dumpState.js +26 -0
- package/_esm/actions/test/dumpState.js.map +1 -0
- package/_esm/actions/test/loadState.js +27 -0
- package/_esm/actions/test/loadState.js.map +1 -0
- package/_esm/chains/celo/formatters.js.map +1 -1
- package/_esm/chains/definitions/chiliz.js +23 -0
- package/_esm/chains/definitions/chiliz.js.map +1 -0
- package/_esm/chains/definitions/lukso.js +28 -0
- package/_esm/chains/definitions/lukso.js.map +1 -0
- package/_esm/chains/definitions/spicy.js +31 -0
- package/_esm/chains/definitions/spicy.js.map +1 -0
- package/_esm/chains/index.js +3 -0
- package/_esm/chains/index.js.map +1 -1
- package/_esm/chains/opStack/decorators/public.js +1 -1
- package/_esm/chains/opStack/index.js +1 -1
- package/_esm/clients/decorators/test.js +4 -0
- package/_esm/clients/decorators/test.js.map +1 -1
- package/_esm/constants/bytes.js +2 -0
- package/_esm/constants/bytes.js.map +1 -0
- package/_esm/constants/strings.js +2 -0
- package/_esm/constants/strings.js.map +1 -0
- package/_esm/errors/node.js +22 -11
- package/_esm/errors/node.js.map +1 -1
- package/_esm/errors/rpc.js +36 -18
- package/_esm/errors/rpc.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_esm/index.js +2 -0
- package/_esm/index.js.map +1 -1
- package/_esm/utils/formatters/transaction.js +19 -1
- package/_esm/utils/formatters/transaction.js.map +1 -1
- package/_esm/utils/signature/hashMessage.js +2 -1
- package/_esm/utils/signature/hashMessage.js.map +1 -1
- package/_esm/utils/transaction/serializeTransaction.js +20 -6
- package/_esm/utils/transaction/serializeTransaction.js.map +1 -1
- package/_types/actions/test/dumpState.d.ts +31 -0
- package/_types/actions/test/dumpState.d.ts.map +1 -0
- package/_types/actions/test/loadState.d.ts +34 -0
- package/_types/actions/test/loadState.d.ts.map +1 -0
- package/_types/chains/celo/chainConfig.d.ts +167 -137
- package/_types/chains/celo/chainConfig.d.ts.map +1 -1
- package/_types/chains/celo/formatters.d.ts +167 -137
- package/_types/chains/celo/formatters.d.ts.map +1 -1
- package/_types/chains/celo/types.d.ts +2 -0
- package/_types/chains/celo/types.d.ts.map +1 -1
- package/_types/chains/definitions/base.d.ts +129 -111
- package/_types/chains/definitions/base.d.ts.map +1 -1
- package/_types/chains/definitions/baseGoerli.d.ts +129 -111
- package/_types/chains/definitions/baseGoerli.d.ts.map +1 -1
- package/_types/chains/definitions/baseSepolia.d.ts +129 -111
- package/_types/chains/definitions/baseSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/celo.d.ts +167 -137
- package/_types/chains/definitions/celo.d.ts.map +1 -1
- package/_types/chains/definitions/celoAlfajores.d.ts +167 -137
- package/_types/chains/definitions/celoAlfajores.d.ts.map +1 -1
- package/_types/chains/definitions/celoCannoli.d.ts +167 -137
- package/_types/chains/definitions/celoCannoli.d.ts.map +1 -1
- package/_types/chains/definitions/chiliz.d.ts +35 -0
- package/_types/chains/definitions/chiliz.d.ts.map +1 -0
- package/_types/chains/definitions/lukso.d.ts +40 -0
- package/_types/chains/definitions/lukso.d.ts.map +1 -0
- package/_types/chains/definitions/optimism.d.ts +129 -111
- package/_types/chains/definitions/optimism.d.ts.map +1 -1
- package/_types/chains/definitions/optimismGoerli.d.ts +129 -111
- package/_types/chains/definitions/optimismGoerli.d.ts.map +1 -1
- package/_types/chains/definitions/optimismSepolia.d.ts +129 -111
- package/_types/chains/definitions/optimismSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/spicy.d.ts +36 -0
- package/_types/chains/definitions/spicy.d.ts.map +1 -0
- package/_types/chains/definitions/zkSync.d.ts +11 -0
- package/_types/chains/definitions/zkSync.d.ts.map +1 -1
- package/_types/chains/definitions/zkSyncTestnet.d.ts +11 -0
- package/_types/chains/definitions/zkSyncTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/zora.d.ts +129 -111
- package/_types/chains/definitions/zora.d.ts.map +1 -1
- package/_types/chains/definitions/zoraSepolia.d.ts +129 -111
- package/_types/chains/definitions/zoraSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/zoraTestnet.d.ts +129 -111
- package/_types/chains/definitions/zoraTestnet.d.ts.map +1 -1
- package/_types/chains/index.d.ts +5 -1
- package/_types/chains/index.d.ts.map +1 -1
- package/_types/chains/opStack/chainConfig.d.ts +125 -107
- package/_types/chains/opStack/chainConfig.d.ts.map +1 -1
- package/_types/chains/opStack/decorators/public.d.ts +18 -18
- package/_types/chains/opStack/formatters.d.ts +125 -107
- package/_types/chains/opStack/formatters.d.ts.map +1 -1
- package/_types/chains/opStack/index.d.ts +1 -1
- package/_types/chains/zksync/chainConfig.d.ts +11 -0
- package/_types/chains/zksync/chainConfig.d.ts.map +1 -1
- package/_types/chains/zksync/formatters.d.ts +11 -0
- package/_types/chains/zksync/formatters.d.ts.map +1 -1
- package/_types/clients/decorators/test.d.ts +41 -0
- package/_types/clients/decorators/test.d.ts.map +1 -1
- package/_types/constants/bytes.d.ts +2 -0
- package/_types/constants/bytes.d.ts.map +1 -0
- package/_types/constants/strings.d.ts +2 -0
- package/_types/constants/strings.d.ts.map +1 -0
- package/_types/errors/version.d.ts +1 -1
- package/_types/index.d.ts +2 -0
- package/_types/index.d.ts.map +1 -1
- package/_types/types/eip1193.d.ts +16 -0
- package/_types/types/eip1193.d.ts.map +1 -1
- package/_types/types/rpc.d.ts +2 -2
- package/_types/types/rpc.d.ts.map +1 -1
- package/_types/types/transaction.d.ts +10 -1
- package/_types/types/transaction.d.ts.map +1 -1
- package/_types/types/utils.d.ts +16 -0
- package/_types/types/utils.d.ts.map +1 -1
- package/_types/utils/formatters/transaction.d.ts +1 -1
- package/_types/utils/formatters/transaction.d.ts.map +1 -1
- package/_types/utils/formatters/transactionRequest.d.ts +1 -1
- package/_types/utils/signature/hashMessage.d.ts.map +1 -1
- package/_types/utils/transaction/serializeTransaction.d.ts.map +1 -1
- package/actions/test/dumpState.ts +44 -0
- package/actions/test/loadState.ts +47 -0
- package/chains/celo/formatters.ts +0 -1
- package/chains/celo/types.ts +2 -0
- package/chains/definitions/chiliz.ts +23 -0
- package/chains/definitions/lukso.ts +28 -0
- package/chains/definitions/spicy.ts +31 -0
- package/chains/index.ts +21 -3
- package/chains/opStack/decorators/public.ts +19 -19
- package/chains/opStack/index.ts +1 -1
- package/clients/decorators/test.ts +50 -0
- package/constants/bytes.ts +2 -0
- package/constants/strings.ts +1 -0
- package/errors/version.ts +1 -1
- package/index.ts +2 -0
- package/package.json +34 -11
- package/types/eip1193.ts +16 -0
- package/types/rpc.ts +10 -5
- package/types/transaction.ts +10 -1
- package/types/utils.ts +20 -0
- package/utils/formatters/transaction.ts +20 -3
- package/utils/signature/hashMessage.ts +2 -1
- package/utils/transaction/serializeTransaction.ts +18 -12
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,27 @@
|
|
1
1
|
# viem
|
2
2
|
|
3
|
+
## 1.19.1
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- [#1488](https://github.com/wagmi-dev/viem/pull/1488) [`f82bc658`](https://github.com/wagmi-dev/viem/commit/f82bc658f68baa51fe50ffafa32ea4d6e0af14b9) Thanks [@glitch-txs](https://github.com/glitch-txs)! - Added Chiliz and Spicy chains
|
8
|
+
|
9
|
+
## 1.19.0
|
10
|
+
|
11
|
+
### Minor Changes
|
12
|
+
|
13
|
+
- [#1485](https://github.com/wagmi-dev/viem/pull/1485) [`490de5da`](https://github.com/wagmi-dev/viem/commit/490de5da023938252d526604763d19f8defe2e62) Thanks [@jxom](https://github.com/jxom)! - Added `yParity` to `Transaction` type.
|
14
|
+
|
15
|
+
- [#1486](https://github.com/wagmi-dev/viem/pull/1486) [`5e40a875`](https://github.com/wagmi-dev/viem/commit/5e40a87502541ffcf1dae5364eef48a2c0085f82) Thanks [@jxom](https://github.com/jxom)! - Added `dumpState` & `loadState` Test Actions.
|
16
|
+
|
17
|
+
- [`5bf3a3b2`](https://github.com/wagmi-dev/viem/commit/5bf3a3b2da2c2c223b913eae9aea50a0ba834efc) Thanks [@jxom](https://github.com/jxom)! - Added `presignMessagePrefix` and `zeroHash` constants.
|
18
|
+
|
19
|
+
- [#1483](https://github.com/wagmi-dev/viem/pull/1483) [`5a4e907b`](https://github.com/wagmi-dev/viem/commit/5a4e907bd47c78827f28ae5cfb8e1f73067c5fc1) Thanks [@jxom](https://github.com/jxom)! - Support `v` values of 0 or 1 in `serializeTransaction`.
|
20
|
+
|
21
|
+
### Patch Changes
|
22
|
+
|
23
|
+
- [#1470](https://github.com/wagmi-dev/viem/pull/1470) [`a0512a5b`](https://github.com/wagmi-dev/viem/commit/a0512a5b107afaef201791647e43e8a9d881c621) Thanks [@marv1n-10xdev](https://github.com/marv1n-10xdev)! - Added LUSKO chain
|
24
|
+
|
3
25
|
## 1.18.9
|
4
26
|
|
5
27
|
### Patch Changes
|
@@ -0,0 +1,9 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.generateMnemonic = void 0;
|
4
|
+
const bip39_1 = require("@scure/bip39");
|
5
|
+
function generateMnemonic(wordlist) {
|
6
|
+
return (0, bip39_1.generateMnemonic)(wordlist);
|
7
|
+
}
|
8
|
+
exports.generateMnemonic = generateMnemonic;
|
9
|
+
//# sourceMappingURL=generateMnemonic.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"generateMnemonic.js","sourceRoot":"","sources":["../../accounts/generateMnemonic.ts"],"names":[],"mappings":";;;AAAA,wCAAoE;AAYpE,SAAgB,gBAAgB,CAAC,QAAkB;IACjD,OAAO,IAAA,wBAAiB,EAAC,QAAQ,CAAC,CAAA;AACpC,CAAC;AAFD,4CAEC"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.generatePrivateKey = void 0;
|
4
|
+
const secp256k1_1 = require("@noble/curves/secp256k1");
|
5
|
+
const toHex_js_1 = require("../utils/encoding/toHex.js");
|
6
|
+
function generatePrivateKey() {
|
7
|
+
return (0, toHex_js_1.toHex)(secp256k1_1.secp256k1.utils.randomPrivateKey());
|
8
|
+
}
|
9
|
+
exports.generatePrivateKey = generatePrivateKey;
|
10
|
+
//# sourceMappingURL=generatePrivateKey.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"generatePrivateKey.js","sourceRoot":"","sources":["../../accounts/generatePrivateKey.ts"],"names":[],"mappings":";;;AAAA,uDAAmD;AAInD,yDAAuE;AASvE,SAAgB,kBAAkB;IAChC,OAAO,IAAA,gBAAK,EAAC,qBAAS,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAA;AAClD,CAAC;AAFD,gDAEC"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.hdKeyToAccount = void 0;
|
4
|
+
const toHex_js_1 = require("../utils/encoding/toHex.js");
|
5
|
+
const privateKeyToAccount_js_1 = require("./privateKeyToAccount.js");
|
6
|
+
function hdKeyToAccount(hdKey_, { accountIndex = 0, addressIndex = 0, changeIndex = 0, path } = {}) {
|
7
|
+
const hdKey = hdKey_.derive(path || `m/44'/60'/${accountIndex}'/${changeIndex}/${addressIndex}`);
|
8
|
+
const account = (0, privateKeyToAccount_js_1.privateKeyToAccount)((0, toHex_js_1.toHex)(hdKey.privateKey));
|
9
|
+
return {
|
10
|
+
...account,
|
11
|
+
getHdKey: () => hdKey,
|
12
|
+
source: 'hd',
|
13
|
+
};
|
14
|
+
}
|
15
|
+
exports.hdKeyToAccount = hdKeyToAccount;
|
16
|
+
//# sourceMappingURL=hdKeyToAccount.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"hdKeyToAccount.js","sourceRoot":"","sources":["../../accounts/hdKeyToAccount.ts"],"names":[],"mappings":";;;AAEA,yDAAuE;AAGvE,qEAGiC;AAajC,SAAgB,cAAc,CAC5B,MAAa,EACb,EAAE,YAAY,GAAG,CAAC,EAAE,YAAY,GAAG,CAAC,EAAE,WAAW,GAAG,CAAC,EAAE,IAAI,KAAgB,EAAE;IAE7E,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CACzB,IAAI,IAAI,aAAa,YAAY,KAAK,WAAW,IAAI,YAAY,EAAE,CACpE,CAAA;IACD,MAAM,OAAO,GAAG,IAAA,4CAAmB,EAAC,IAAA,gBAAK,EAAC,KAAK,CAAC,UAAW,CAAC,CAAC,CAAA;IAC7D,OAAO;QACL,GAAG,OAAO;QACV,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK;QACrB,MAAM,EAAE,IAAI;KACb,CAAA;AACH,CAAC;AAbD,wCAaC"}
|
@@ -0,0 +1,52 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.privateKeyToAddress = exports.publicKeyToAddress = exports.parseAccount = exports.signTypedData = exports.signTransaction = exports.signMessage = exports.signatureToHex = exports.sign = exports.toAccount = exports.privateKeyToAccount = exports.mnemonicToAccount = exports.hdKeyToAccount = exports.generatePrivateKey = exports.generateMnemonic = exports.traditionalChinese = exports.spanish = exports.simplifiedChinese = exports.korean = exports.japanese = exports.italian = exports.french = exports.english = exports.czech = exports.HDKey = void 0;
|
4
|
+
var bip32_1 = require("@scure/bip32");
|
5
|
+
Object.defineProperty(exports, "HDKey", { enumerable: true, get: function () { return bip32_1.HDKey; } });
|
6
|
+
var czech_1 = require("@scure/bip39/wordlists/czech");
|
7
|
+
Object.defineProperty(exports, "czech", { enumerable: true, get: function () { return czech_1.wordlist; } });
|
8
|
+
var english_1 = require("@scure/bip39/wordlists/english");
|
9
|
+
Object.defineProperty(exports, "english", { enumerable: true, get: function () { return english_1.wordlist; } });
|
10
|
+
var french_1 = require("@scure/bip39/wordlists/french");
|
11
|
+
Object.defineProperty(exports, "french", { enumerable: true, get: function () { return french_1.wordlist; } });
|
12
|
+
var italian_1 = require("@scure/bip39/wordlists/italian");
|
13
|
+
Object.defineProperty(exports, "italian", { enumerable: true, get: function () { return italian_1.wordlist; } });
|
14
|
+
var japanese_1 = require("@scure/bip39/wordlists/japanese");
|
15
|
+
Object.defineProperty(exports, "japanese", { enumerable: true, get: function () { return japanese_1.wordlist; } });
|
16
|
+
var korean_1 = require("@scure/bip39/wordlists/korean");
|
17
|
+
Object.defineProperty(exports, "korean", { enumerable: true, get: function () { return korean_1.wordlist; } });
|
18
|
+
var simplified_chinese_1 = require("@scure/bip39/wordlists/simplified-chinese");
|
19
|
+
Object.defineProperty(exports, "simplifiedChinese", { enumerable: true, get: function () { return simplified_chinese_1.wordlist; } });
|
20
|
+
var spanish_1 = require("@scure/bip39/wordlists/spanish");
|
21
|
+
Object.defineProperty(exports, "spanish", { enumerable: true, get: function () { return spanish_1.wordlist; } });
|
22
|
+
var traditional_chinese_1 = require("@scure/bip39/wordlists/traditional-chinese");
|
23
|
+
Object.defineProperty(exports, "traditionalChinese", { enumerable: true, get: function () { return traditional_chinese_1.wordlist; } });
|
24
|
+
var generateMnemonic_js_1 = require("./generateMnemonic.js");
|
25
|
+
Object.defineProperty(exports, "generateMnemonic", { enumerable: true, get: function () { return generateMnemonic_js_1.generateMnemonic; } });
|
26
|
+
var generatePrivateKey_js_1 = require("./generatePrivateKey.js");
|
27
|
+
Object.defineProperty(exports, "generatePrivateKey", { enumerable: true, get: function () { return generatePrivateKey_js_1.generatePrivateKey; } });
|
28
|
+
var hdKeyToAccount_js_1 = require("./hdKeyToAccount.js");
|
29
|
+
Object.defineProperty(exports, "hdKeyToAccount", { enumerable: true, get: function () { return hdKeyToAccount_js_1.hdKeyToAccount; } });
|
30
|
+
var mnemonicToAccount_js_1 = require("./mnemonicToAccount.js");
|
31
|
+
Object.defineProperty(exports, "mnemonicToAccount", { enumerable: true, get: function () { return mnemonicToAccount_js_1.mnemonicToAccount; } });
|
32
|
+
var privateKeyToAccount_js_1 = require("./privateKeyToAccount.js");
|
33
|
+
Object.defineProperty(exports, "privateKeyToAccount", { enumerable: true, get: function () { return privateKeyToAccount_js_1.privateKeyToAccount; } });
|
34
|
+
var toAccount_js_1 = require("./toAccount.js");
|
35
|
+
Object.defineProperty(exports, "toAccount", { enumerable: true, get: function () { return toAccount_js_1.toAccount; } });
|
36
|
+
var sign_js_1 = require("./utils/sign.js");
|
37
|
+
Object.defineProperty(exports, "sign", { enumerable: true, get: function () { return sign_js_1.sign; } });
|
38
|
+
var signatureToHex_js_1 = require("../utils/signature/signatureToHex.js");
|
39
|
+
Object.defineProperty(exports, "signatureToHex", { enumerable: true, get: function () { return signatureToHex_js_1.signatureToHex; } });
|
40
|
+
var signMessage_js_1 = require("./utils/signMessage.js");
|
41
|
+
Object.defineProperty(exports, "signMessage", { enumerable: true, get: function () { return signMessage_js_1.signMessage; } });
|
42
|
+
var signTransaction_js_1 = require("./utils/signTransaction.js");
|
43
|
+
Object.defineProperty(exports, "signTransaction", { enumerable: true, get: function () { return signTransaction_js_1.signTransaction; } });
|
44
|
+
var signTypedData_js_1 = require("./utils/signTypedData.js");
|
45
|
+
Object.defineProperty(exports, "signTypedData", { enumerable: true, get: function () { return signTypedData_js_1.signTypedData; } });
|
46
|
+
var parseAccount_js_1 = require("./utils/parseAccount.js");
|
47
|
+
Object.defineProperty(exports, "parseAccount", { enumerable: true, get: function () { return parseAccount_js_1.parseAccount; } });
|
48
|
+
var publicKeyToAddress_js_1 = require("./utils/publicKeyToAddress.js");
|
49
|
+
Object.defineProperty(exports, "publicKeyToAddress", { enumerable: true, get: function () { return publicKeyToAddress_js_1.publicKeyToAddress; } });
|
50
|
+
var privateKeyToAddress_js_1 = require("./utils/privateKeyToAddress.js");
|
51
|
+
Object.defineProperty(exports, "privateKeyToAddress", { enumerable: true, get: function () { return privateKeyToAddress_js_1.privateKeyToAddress; } });
|
52
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../accounts/index.ts"],"names":[],"mappings":";;;AACA,sCAAoC;AAA3B,8FAAA,KAAK,OAAA;AACd,sDAAgE;AAAvD,8FAAA,QAAQ,OAAS;AAC1B,0DAAoE;AAA3D,kGAAA,QAAQ,OAAW;AAC5B,wDAAkE;AAAzD,gGAAA,QAAQ,OAAU;AAC3B,0DAAoE;AAA3D,kGAAA,QAAQ,OAAW;AAC5B,4DAAsE;AAA7D,oGAAA,QAAQ,OAAY;AAC7B,wDAAkE;AAAzD,gGAAA,QAAQ,OAAU;AAC3B,gFAAyF;AAAhF,uHAAA,QAAQ,OAAqB;AACtC,0DAAoE;AAA3D,kGAAA,QAAQ,OAAW;AAC5B,kFAA2F;AAAlF,yHAAA,QAAQ,OAAsB;AAEvC,6DAG8B;AAD5B,uHAAA,gBAAgB,OAAA;AAElB,iEAGgC;AAD9B,2HAAA,kBAAkB,OAAA;AAEpB,yDAG4B;AAD1B,mHAAA,cAAc,OAAA;AAEhB,+DAG+B;AAD7B,yHAAA,iBAAiB,OAAA;AAEnB,mEAGiC;AAD/B,6HAAA,mBAAmB,OAAA;AAErB,+CAAmE;AAAjC,yGAAA,SAAS,OAAA;AAW3C,2CAKwB;AADtB,+FAAA,IAAI,OAAA;AAEN,0EAG6C;AAD3C,mHAAA,cAAc,OAAA;AAEhB,yDAK+B;AAD7B,6GAAA,WAAW,OAAA;AAEb,iEAKmC;AADjC,qHAAA,eAAe,OAAA;AAEjB,6DAKiC;AAD/B,iHAAA,aAAa,OAAA;AAEf,2DAGgC;AAD9B,+GAAA,YAAY,OAAA;AAEd,uEAGsC;AADpC,2HAAA,kBAAkB,OAAA;AAEpB,yEAGuC;AADrC,6HAAA,mBAAmB,OAAA"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.mnemonicToAccount = void 0;
|
4
|
+
const bip32_1 = require("@scure/bip32");
|
5
|
+
const bip39_1 = require("@scure/bip39");
|
6
|
+
const hdKeyToAccount_js_1 = require("./hdKeyToAccount.js");
|
7
|
+
function mnemonicToAccount(mnemonic, opts = {}) {
|
8
|
+
const seed = (0, bip39_1.mnemonicToSeedSync)(mnemonic);
|
9
|
+
return (0, hdKeyToAccount_js_1.hdKeyToAccount)(bip32_1.HDKey.fromMasterSeed(seed), opts);
|
10
|
+
}
|
11
|
+
exports.mnemonicToAccount = mnemonicToAccount;
|
12
|
+
//# sourceMappingURL=mnemonicToAccount.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mnemonicToAccount.js","sourceRoot":"","sources":["../../accounts/mnemonicToAccount.ts"],"names":[],"mappings":";;;AAAA,wCAAoC;AACpC,wCAAiD;AAGjD,2DAG4B;AAU5B,SAAgB,iBAAiB,CAC/B,QAAgB,EAChB,OAAkB,EAAE;IAEpB,MAAM,IAAI,GAAG,IAAA,0BAAkB,EAAC,QAAQ,CAAC,CAAA;IACzC,OAAO,IAAA,kCAAc,EAAC,aAAK,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAA;AACzD,CAAC;AAND,8CAMC"}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.privateKeyToAccount = void 0;
|
4
|
+
const secp256k1_1 = require("@noble/curves/secp256k1");
|
5
|
+
const toHex_js_1 = require("../utils/encoding/toHex.js");
|
6
|
+
const toAccount_js_1 = require("./toAccount.js");
|
7
|
+
const publicKeyToAddress_js_1 = require("./utils/publicKeyToAddress.js");
|
8
|
+
const signMessage_js_1 = require("./utils/signMessage.js");
|
9
|
+
const signTransaction_js_1 = require("./utils/signTransaction.js");
|
10
|
+
const signTypedData_js_1 = require("./utils/signTypedData.js");
|
11
|
+
function privateKeyToAccount(privateKey) {
|
12
|
+
const publicKey = (0, toHex_js_1.toHex)(secp256k1_1.secp256k1.getPublicKey(privateKey.slice(2), false));
|
13
|
+
const address = (0, publicKeyToAddress_js_1.publicKeyToAddress)(publicKey);
|
14
|
+
const account = (0, toAccount_js_1.toAccount)({
|
15
|
+
address,
|
16
|
+
async signMessage({ message }) {
|
17
|
+
return (0, signMessage_js_1.signMessage)({ message, privateKey });
|
18
|
+
},
|
19
|
+
async signTransaction(transaction, { serializer } = {}) {
|
20
|
+
return (0, signTransaction_js_1.signTransaction)({ privateKey, transaction, serializer });
|
21
|
+
},
|
22
|
+
async signTypedData(typedData) {
|
23
|
+
return (0, signTypedData_js_1.signTypedData)({ ...typedData, privateKey });
|
24
|
+
},
|
25
|
+
});
|
26
|
+
return {
|
27
|
+
...account,
|
28
|
+
publicKey,
|
29
|
+
source: 'privateKey',
|
30
|
+
};
|
31
|
+
}
|
32
|
+
exports.privateKeyToAccount = privateKeyToAccount;
|
33
|
+
//# sourceMappingURL=privateKeyToAccount.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"privateKeyToAccount.js","sourceRoot":"","sources":["../../accounts/privateKeyToAccount.ts"],"names":[],"mappings":";;;AAAA,uDAAmD;AAGnD,yDAAuE;AAGvE,iDAAmE;AAEnE,yEAGsC;AACtC,2DAA+E;AAC/E,mEAGmC;AACnC,+DAGiC;AAgBjC,SAAgB,mBAAmB,CAAC,UAAe;IACjD,MAAM,SAAS,GAAG,IAAA,gBAAK,EAAC,qBAAS,CAAC,YAAY,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAA;IAC3E,MAAM,OAAO,GAAG,IAAA,0CAAkB,EAAC,SAAS,CAAC,CAAA;IAE7C,MAAM,OAAO,GAAG,IAAA,wBAAS,EAAC;QACxB,OAAO;QACP,KAAK,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE;YAC3B,OAAO,IAAA,4BAAW,EAAC,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAA;QAC7C,CAAC;QACD,KAAK,CAAC,eAAe,CAAC,WAAW,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE;YACpD,OAAO,IAAA,oCAAe,EAAC,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC,CAAA;QACjE,CAAC;QACD,KAAK,CAAC,aAAa,CAAC,SAAS;YAC3B,OAAO,IAAA,gCAAa,EAAC,EAAE,GAAG,SAAS,EAAE,UAAU,EAAE,CAAC,CAAA;QACpD,CAAC;KACF,CAAC,CAAA;IAEF,OAAO;QACL,GAAG,OAAO;QACV,SAAS;QACT,MAAM,EAAE,YAAY;KACrB,CAAA;AACH,CAAC;AAtBD,kDAsBC"}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.toAccount = void 0;
|
4
|
+
const address_js_1 = require("../errors/address.js");
|
5
|
+
const isAddress_js_1 = require("../utils/address/isAddress.js");
|
6
|
+
function toAccount(source) {
|
7
|
+
if (typeof source === 'string') {
|
8
|
+
if (!(0, isAddress_js_1.isAddress)(source))
|
9
|
+
throw new address_js_1.InvalidAddressError({ address: source });
|
10
|
+
return {
|
11
|
+
address: source,
|
12
|
+
type: 'json-rpc',
|
13
|
+
};
|
14
|
+
}
|
15
|
+
if (!(0, isAddress_js_1.isAddress)(source.address))
|
16
|
+
throw new address_js_1.InvalidAddressError({ address: source.address });
|
17
|
+
return {
|
18
|
+
address: source.address,
|
19
|
+
signMessage: source.signMessage,
|
20
|
+
signTransaction: source.signTransaction,
|
21
|
+
signTypedData: source.signTypedData,
|
22
|
+
source: 'custom',
|
23
|
+
type: 'local',
|
24
|
+
};
|
25
|
+
}
|
26
|
+
exports.toAccount = toAccount;
|
27
|
+
//# sourceMappingURL=toAccount.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"toAccount.js","sourceRoot":"","sources":["../../accounts/toAccount.ts"],"names":[],"mappings":";;;AAEA,qDAG6B;AAC7B,gEAGsC;AAwBtC,SAAgB,SAAS,CACvB,MAAsB;IAEtB,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;QAC9B,IAAI,CAAC,IAAA,wBAAS,EAAC,MAAM,CAAC;YAAE,MAAM,IAAI,gCAAmB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAA;QAC1E,OAAO;YACL,OAAO,EAAE,MAAM;YACf,IAAI,EAAE,UAAU;SACuB,CAAA;KAC1C;IAED,IAAI,CAAC,IAAA,wBAAS,EAAC,MAAM,CAAC,OAAO,CAAC;QAC5B,MAAM,IAAI,gCAAmB,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAA;IAC5D,OAAO;QACL,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,eAAe,EAAE,MAAM,CAAC,eAAe;QACvC,aAAa,EAAE,MAAM,CAAC,aAAa;QACnC,MAAM,EAAE,QAAQ;QAChB,IAAI,EAAE,OAAO;KAC0B,CAAA;AAC3C,CAAC;AArBD,8BAqBC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../accounts/types.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.parseAccount = void 0;
|
4
|
+
function parseAccount(account) {
|
5
|
+
if (typeof account === 'string')
|
6
|
+
return { address: account, type: 'json-rpc' };
|
7
|
+
return account;
|
8
|
+
}
|
9
|
+
exports.parseAccount = parseAccount;
|
10
|
+
//# sourceMappingURL=parseAccount.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"parseAccount.js","sourceRoot":"","sources":["../../../accounts/utils/parseAccount.ts"],"names":[],"mappings":";;;AAOA,SAAgB,YAAY,CAAC,OAA0B;IACrD,IAAI,OAAO,OAAO,KAAK,QAAQ;QAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,CAAA;IAC9E,OAAO,OAAO,CAAA;AAChB,CAAC;AAHD,oCAGC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.privateKeyToAddress = void 0;
|
4
|
+
const secp256k1_1 = require("@noble/curves/secp256k1");
|
5
|
+
const toHex_js_1 = require("../../utils/encoding/toHex.js");
|
6
|
+
const publicKeyToAddress_js_1 = require("./publicKeyToAddress.js");
|
7
|
+
function privateKeyToAddress(privateKey) {
|
8
|
+
const publicKey = (0, toHex_js_1.bytesToHex)(secp256k1_1.secp256k1.getPublicKey(privateKey.slice(2), false));
|
9
|
+
return (0, publicKeyToAddress_js_1.publicKeyToAddress)(publicKey);
|
10
|
+
}
|
11
|
+
exports.privateKeyToAddress = privateKeyToAddress;
|
12
|
+
//# sourceMappingURL=privateKeyToAddress.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"privateKeyToAddress.js","sourceRoot":"","sources":["../../../accounts/utils/privateKeyToAddress.ts"],"names":[],"mappings":";;;AAAA,uDAAmD;AAKnD,4DAGsC;AACtC,mEAGgC;AAchC,SAAgB,mBAAmB,CAAC,UAAe;IACjD,MAAM,SAAS,GAAG,IAAA,qBAAU,EAC1B,qBAAS,CAAC,YAAY,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CACnD,CAAA;IACD,OAAO,IAAA,0CAAkB,EAAC,SAAS,CAAC,CAAA;AACtC,CAAC;AALD,kDAKC"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.publicKeyToAddress = void 0;
|
4
|
+
const getAddress_js_1 = require("../../utils/address/getAddress.js");
|
5
|
+
const keccak256_js_1 = require("../../utils/hash/keccak256.js");
|
6
|
+
function publicKeyToAddress(publicKey) {
|
7
|
+
const address = (0, keccak256_js_1.keccak256)(`0x${publicKey.substring(4)}`).substring(26);
|
8
|
+
return (0, getAddress_js_1.checksumAddress)(`0x${address}`);
|
9
|
+
}
|
10
|
+
exports.publicKeyToAddress = publicKeyToAddress;
|
11
|
+
//# sourceMappingURL=publicKeyToAddress.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"publicKeyToAddress.js","sourceRoot":"","sources":["../../../accounts/utils/publicKeyToAddress.ts"],"names":[],"mappings":";;;AAIA,qEAG0C;AAC1C,gEAGsC;AActC,SAAgB,kBAAkB,CAAC,SAAc;IAC/C,MAAM,OAAO,GAAG,IAAA,wBAAS,EAAC,KAAK,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;IACtE,OAAO,IAAA,+BAAe,EAAC,KAAK,OAAO,EAAE,CAAY,CAAA;AACnD,CAAC;AAHD,gDAGC"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.sign = void 0;
|
4
|
+
const secp256k1_1 = require("@noble/curves/secp256k1");
|
5
|
+
const toHex_js_1 = require("../../utils/encoding/toHex.js");
|
6
|
+
async function sign({ hash, privateKey, }) {
|
7
|
+
const { r, s, recovery } = secp256k1_1.secp256k1.sign(hash.slice(2), privateKey.slice(2));
|
8
|
+
return {
|
9
|
+
r: (0, toHex_js_1.toHex)(r),
|
10
|
+
s: (0, toHex_js_1.toHex)(s),
|
11
|
+
v: recovery ? 28n : 27n,
|
12
|
+
};
|
13
|
+
}
|
14
|
+
exports.sign = sign;
|
15
|
+
//# sourceMappingURL=sign.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"sign.js","sourceRoot":"","sources":["../../../accounts/utils/sign.ts"],"names":[],"mappings":";;;AAAA,uDAAmD;AAInD,4DAA0E;AAmBnE,KAAK,UAAU,IAAI,CAAC,EACzB,IAAI,EACJ,UAAU,GACK;IACf,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,qBAAS,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;IAC7E,OAAO;QACL,CAAC,EAAE,IAAA,gBAAK,EAAC,CAAC,CAAC;QACX,CAAC,EAAE,IAAA,gBAAK,EAAC,CAAC,CAAC;QACX,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG;KACxB,CAAA;AACH,CAAC;AAVD,oBAUC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.signMessage = void 0;
|
4
|
+
const hashMessage_js_1 = require("../../utils/signature/hashMessage.js");
|
5
|
+
const signatureToHex_js_1 = require("../../utils/signature/signatureToHex.js");
|
6
|
+
const sign_js_1 = require("./sign.js");
|
7
|
+
async function signMessage({ message, privateKey, }) {
|
8
|
+
const signature = await (0, sign_js_1.sign)({ hash: (0, hashMessage_js_1.hashMessage)(message), privateKey });
|
9
|
+
return (0, signatureToHex_js_1.signatureToHex)(signature);
|
10
|
+
}
|
11
|
+
exports.signMessage = signMessage;
|
12
|
+
//# sourceMappingURL=signMessage.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"signMessage.js","sourceRoot":"","sources":["../../../accounts/utils/signMessage.ts"],"names":[],"mappings":";;;AAEA,yEAG6C;AAC7C,+EAGgD;AAEhD,uCAAoD;AAuB7C,KAAK,UAAU,WAAW,CAAC,EAChC,OAAO,EACP,UAAU,GACY;IACtB,MAAM,SAAS,GAAG,MAAM,IAAA,cAAI,EAAC,EAAE,IAAI,EAAE,IAAA,4BAAW,EAAC,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC,CAAA;IACxE,OAAO,IAAA,kCAAc,EAAC,SAAS,CAAC,CAAA;AAClC,CAAC;AAND,kCAMC"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.signTransaction = void 0;
|
4
|
+
const keccak256_js_1 = require("../../utils/hash/keccak256.js");
|
5
|
+
const serializeTransaction_js_1 = require("../../utils/transaction/serializeTransaction.js");
|
6
|
+
const sign_js_1 = require("./sign.js");
|
7
|
+
async function signTransaction({ privateKey, transaction, serializer = serializeTransaction_js_1.serializeTransaction, }) {
|
8
|
+
const signature = await (0, sign_js_1.sign)({
|
9
|
+
hash: (0, keccak256_js_1.keccak256)(serializer(transaction)),
|
10
|
+
privateKey,
|
11
|
+
});
|
12
|
+
return serializer(transaction, signature);
|
13
|
+
}
|
14
|
+
exports.signTransaction = signTransaction;
|
15
|
+
//# sourceMappingURL=signTransaction.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"signTransaction.js","sourceRoot":"","sources":["../../../accounts/utils/signTransaction.ts"],"names":[],"mappings":";;;AAMA,gEAGsC;AAEtC,6FAGwD;AAExD,uCAAoD;AAqB7C,KAAK,UAAU,eAAe,CAEnC,EACA,UAAU,EACV,WAAW,EACX,UAAU,GAAG,8CAAoB,GACmB;IAGpD,MAAM,SAAS,GAAG,MAAM,IAAA,cAAI,EAAC;QAC3B,IAAI,EAAE,IAAA,wBAAS,EAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QACxC,UAAU;KACX,CAAC,CAAA;IACF,OAAO,UAAU,CACf,WAAW,EACX,SAAS,CAC6C,CAAA;AAC1D,CAAC;AAjBD,0CAiBC"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.signTypedData = void 0;
|
4
|
+
const hashTypedData_js_1 = require("../../utils/signature/hashTypedData.js");
|
5
|
+
const signatureToHex_js_1 = require("../../utils/signature/signatureToHex.js");
|
6
|
+
const sign_js_1 = require("./sign.js");
|
7
|
+
async function signTypedData(parameters) {
|
8
|
+
const { privateKey, ...typedData } = parameters;
|
9
|
+
const signature = await (0, sign_js_1.sign)({
|
10
|
+
hash: (0, hashTypedData_js_1.hashTypedData)(typedData),
|
11
|
+
privateKey,
|
12
|
+
});
|
13
|
+
return (0, signatureToHex_js_1.signatureToHex)(signature);
|
14
|
+
}
|
15
|
+
exports.signTypedData = signTypedData;
|
16
|
+
//# sourceMappingURL=signTypedData.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"signTypedData.js","sourceRoot":"","sources":["../../../accounts/utils/signTypedData.ts"],"names":[],"mappings":";;;AAIA,6EAG+C;AAC/C,+EAGgD;AAGhD,uCAAoD;AAwB7C,KAAK,UAAU,aAAa,CAIjC,UAA2D;IAE3D,MAAM,EAAE,UAAU,EAAE,GAAG,SAAS,EAAE,GAChC,UAAgD,CAAA;IAClD,MAAM,SAAS,GAAG,MAAM,IAAA,cAAI,EAAC;QAC3B,IAAI,EAAE,IAAA,gCAAa,EAAC,SAAS,CAAC;QAC9B,UAAU;KACX,CAAC,CAAA;IACF,OAAO,IAAA,kCAAc,EAAC,SAAS,CAAC,CAAA;AAClC,CAAC;AAbD,sCAaC"}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getEnsAddress = void 0;
|
4
|
+
const abis_js_1 = require("../../constants/abis.js");
|
5
|
+
const decodeFunctionResult_js_1 = require("../../utils/abi/decodeFunctionResult.js");
|
6
|
+
const encodeFunctionData_js_1 = require("../../utils/abi/encodeFunctionData.js");
|
7
|
+
const getChainContractAddress_js_1 = require("../../utils/chain/getChainContractAddress.js");
|
8
|
+
const trim_js_1 = require("../../utils/data/trim.js");
|
9
|
+
const toHex_js_1 = require("../../utils/encoding/toHex.js");
|
10
|
+
const errors_js_1 = require("../../utils/ens/errors.js");
|
11
|
+
const namehash_js_1 = require("../../utils/ens/namehash.js");
|
12
|
+
const packetToBytes_js_1 = require("../../utils/ens/packetToBytes.js");
|
13
|
+
const getAction_js_1 = require("../../utils/getAction.js");
|
14
|
+
const readContract_js_1 = require("../public/readContract.js");
|
15
|
+
async function getEnsAddress(client, { blockNumber, blockTag, coinType, name, universalResolverAddress: universalResolverAddress_, }) {
|
16
|
+
let universalResolverAddress = universalResolverAddress_;
|
17
|
+
if (!universalResolverAddress) {
|
18
|
+
if (!client.chain)
|
19
|
+
throw new Error('client chain not configured. universalResolverAddress is required.');
|
20
|
+
universalResolverAddress = (0, getChainContractAddress_js_1.getChainContractAddress)({
|
21
|
+
blockNumber,
|
22
|
+
chain: client.chain,
|
23
|
+
contract: 'ensUniversalResolver',
|
24
|
+
});
|
25
|
+
}
|
26
|
+
try {
|
27
|
+
const functionData = (0, encodeFunctionData_js_1.encodeFunctionData)({
|
28
|
+
abi: abis_js_1.addressResolverAbi,
|
29
|
+
functionName: 'addr',
|
30
|
+
...(coinType != null
|
31
|
+
? { args: [(0, namehash_js_1.namehash)(name), BigInt(coinType)] }
|
32
|
+
: { args: [(0, namehash_js_1.namehash)(name)] }),
|
33
|
+
});
|
34
|
+
const res = await (0, getAction_js_1.getAction)(client, readContract_js_1.readContract)({
|
35
|
+
address: universalResolverAddress,
|
36
|
+
abi: abis_js_1.universalResolverResolveAbi,
|
37
|
+
functionName: 'resolve',
|
38
|
+
args: [(0, toHex_js_1.toHex)((0, packetToBytes_js_1.packetToBytes)(name)), functionData],
|
39
|
+
blockNumber,
|
40
|
+
blockTag,
|
41
|
+
});
|
42
|
+
if (res[0] === '0x')
|
43
|
+
return null;
|
44
|
+
const address = (0, decodeFunctionResult_js_1.decodeFunctionResult)({
|
45
|
+
abi: abis_js_1.addressResolverAbi,
|
46
|
+
args: coinType != null ? [(0, namehash_js_1.namehash)(name), BigInt(coinType)] : undefined,
|
47
|
+
functionName: 'addr',
|
48
|
+
data: res[0],
|
49
|
+
});
|
50
|
+
if (address === '0x')
|
51
|
+
return null;
|
52
|
+
if ((0, trim_js_1.trim)(address) === '0x00')
|
53
|
+
return null;
|
54
|
+
return address;
|
55
|
+
}
|
56
|
+
catch (err) {
|
57
|
+
if ((0, errors_js_1.isNullUniversalResolverError)(err, 'resolve'))
|
58
|
+
return null;
|
59
|
+
throw err;
|
60
|
+
}
|
61
|
+
}
|
62
|
+
exports.getEnsAddress = getEnsAddress;
|
63
|
+
//# sourceMappingURL=getEnsAddress.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getEnsAddress.js","sourceRoot":"","sources":["../../../actions/ens/getEnsAddress.ts"],"names":[],"mappings":";;;AAIA,qDAGgC;AAIhC,qFAGgD;AAChD,iFAG8C;AAC9C,6FAGqD;AACrD,sDAAmE;AACnE,4DAA0E;AAC1E,yDAAwE;AACxE,6DAA8E;AAC9E,uEAGyC;AACzC,2DAAoD;AACpD,+DAGkC;AAqD3B,KAAK,UAAU,aAAa,CACjC,MAAiC,EACjC,EACE,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,wBAAwB,EAAE,yBAAyB,GAC3B;IAE1B,IAAI,wBAAwB,GAAG,yBAAyB,CAAA;IACxD,IAAI,CAAC,wBAAwB,EAAE;QAC7B,IAAI,CAAC,MAAM,CAAC,KAAK;YACf,MAAM,IAAI,KAAK,CACb,oEAAoE,CACrE,CAAA;QAEH,wBAAwB,GAAG,IAAA,oDAAuB,EAAC;YACjD,WAAW;YACX,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,QAAQ,EAAE,sBAAsB;SACjC,CAAC,CAAA;KACH;IAED,IAAI;QACF,MAAM,YAAY,GAAG,IAAA,0CAAkB,EAAC;YACtC,GAAG,EAAE,4BAAkB;YACvB,YAAY,EAAE,MAAM;YACpB,GAAG,CAAC,QAAQ,IAAI,IAAI;gBAClB,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,IAAA,sBAAQ,EAAC,IAAI,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE;gBAC9C,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,IAAA,sBAAQ,EAAC,IAAI,CAAC,CAAC,EAAE,CAAC;SAChC,CAAC,CAAA;QAEF,MAAM,GAAG,GAAG,MAAM,IAAA,wBAAS,EACzB,MAAM,EACN,8BAAY,CACb,CAAC;YACA,OAAO,EAAE,wBAAwB;YACjC,GAAG,EAAE,qCAA2B;YAChC,YAAY,EAAE,SAAS;YACvB,IAAI,EAAE,CAAC,IAAA,gBAAK,EAAC,IAAA,gCAAa,EAAC,IAAI,CAAC,CAAC,EAAE,YAAY,CAAC;YAChD,WAAW;YACX,QAAQ;SACT,CAAC,CAAA;QAEF,IAAI,GAAG,CAAC,CAAC,CAAC,KAAK,IAAI;YAAE,OAAO,IAAI,CAAA;QAEhC,MAAM,OAAO,GAAG,IAAA,8CAAoB,EAAC;YACnC,GAAG,EAAE,4BAAkB;YACvB,IAAI,EAAE,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,IAAA,sBAAQ,EAAC,IAAI,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS;YACvE,YAAY,EAAE,MAAM;YACpB,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;SACb,CAAC,CAAA;QAEF,IAAI,OAAO,KAAK,IAAI;YAAE,OAAO,IAAI,CAAA;QACjC,IAAI,IAAA,cAAI,EAAC,OAAO,CAAC,KAAK,MAAM;YAAE,OAAO,IAAI,CAAA;QACzC,OAAO,OAAO,CAAA;KACf;IAAC,OAAO,GAAG,EAAE;QACZ,IAAI,IAAA,wCAA4B,EAAC,GAAG,EAAE,SAAS,CAAC;YAAE,OAAO,IAAI,CAAA;QAC7D,MAAM,GAAG,CAAA;KACV;AACH,CAAC;AA7DD,sCA6DC"}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getEnsAvatar = void 0;
|
4
|
+
const parseAvatarRecord_js_1 = require("../../utils/ens/avatar/parseAvatarRecord.js");
|
5
|
+
const getAction_js_1 = require("../../utils/getAction.js");
|
6
|
+
const getEnsText_js_1 = require("./getEnsText.js");
|
7
|
+
async function getEnsAvatar(client, { blockNumber, blockTag, gatewayUrls, name, universalResolverAddress, }) {
|
8
|
+
const record = await (0, getAction_js_1.getAction)(client, getEnsText_js_1.getEnsText)({
|
9
|
+
blockNumber,
|
10
|
+
blockTag,
|
11
|
+
key: 'avatar',
|
12
|
+
name,
|
13
|
+
universalResolverAddress,
|
14
|
+
});
|
15
|
+
if (!record)
|
16
|
+
return null;
|
17
|
+
try {
|
18
|
+
return await (0, parseAvatarRecord_js_1.parseAvatarRecord)(client, { record, gatewayUrls });
|
19
|
+
}
|
20
|
+
catch {
|
21
|
+
return null;
|
22
|
+
}
|
23
|
+
}
|
24
|
+
exports.getEnsAvatar = getEnsAvatar;
|
25
|
+
//# sourceMappingURL=getEnsAvatar.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getEnsAvatar.js","sourceRoot":"","sources":["../../../actions/ens/getEnsAvatar.ts"],"names":[],"mappings":";;;AAMA,sFAGoD;AACpD,2DAAoD;AAEpD,mDAIwB;AA4CjB,KAAK,UAAU,YAAY,CAChC,MAAiC,EACjC,EACE,WAAW,EACX,QAAQ,EACR,WAAW,EACX,IAAI,EACJ,wBAAwB,GACD;IAEzB,MAAM,MAAM,GAAG,MAAM,IAAA,wBAAS,EAC5B,MAAM,EACN,0BAAU,CACX,CAAC;QACA,WAAW;QACX,QAAQ;QACR,GAAG,EAAE,QAAQ;QACb,IAAI;QACJ,wBAAwB;KACzB,CAAC,CAAA;IACF,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAA;IACxB,IAAI;QACF,OAAO,MAAM,IAAA,wCAAiB,EAAC,MAAM,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAA;KAChE;IAAC,MAAM;QACN,OAAO,IAAI,CAAA;KACZ;AACH,CAAC;AA1BD,oCA0BC"}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getEnsName = void 0;
|
4
|
+
const abis_js_1 = require("../../constants/abis.js");
|
5
|
+
const getChainContractAddress_js_1 = require("../../utils/chain/getChainContractAddress.js");
|
6
|
+
const toHex_js_1 = require("../../utils/encoding/toHex.js");
|
7
|
+
const errors_js_1 = require("../../utils/ens/errors.js");
|
8
|
+
const packetToBytes_js_1 = require("../../utils/ens/packetToBytes.js");
|
9
|
+
const getAction_js_1 = require("../../utils/getAction.js");
|
10
|
+
const readContract_js_1 = require("../public/readContract.js");
|
11
|
+
async function getEnsName(client, { address, blockNumber, blockTag, universalResolverAddress: universalResolverAddress_, }) {
|
12
|
+
let universalResolverAddress = universalResolverAddress_;
|
13
|
+
if (!universalResolverAddress) {
|
14
|
+
if (!client.chain)
|
15
|
+
throw new Error('client chain not configured. universalResolverAddress is required.');
|
16
|
+
universalResolverAddress = (0, getChainContractAddress_js_1.getChainContractAddress)({
|
17
|
+
blockNumber,
|
18
|
+
chain: client.chain,
|
19
|
+
contract: 'ensUniversalResolver',
|
20
|
+
});
|
21
|
+
}
|
22
|
+
const reverseNode = `${address.toLowerCase().substring(2)}.addr.reverse`;
|
23
|
+
try {
|
24
|
+
const res = await (0, getAction_js_1.getAction)(client, readContract_js_1.readContract)({
|
25
|
+
address: universalResolverAddress,
|
26
|
+
abi: abis_js_1.universalResolverReverseAbi,
|
27
|
+
functionName: 'reverse',
|
28
|
+
args: [(0, toHex_js_1.toHex)((0, packetToBytes_js_1.packetToBytes)(reverseNode))],
|
29
|
+
blockNumber,
|
30
|
+
blockTag,
|
31
|
+
});
|
32
|
+
return res[0];
|
33
|
+
}
|
34
|
+
catch (err) {
|
35
|
+
if ((0, errors_js_1.isNullUniversalResolverError)(err, 'reverse'))
|
36
|
+
return null;
|
37
|
+
throw err;
|
38
|
+
}
|
39
|
+
}
|
40
|
+
exports.getEnsName = getEnsName;
|
41
|
+
//# sourceMappingURL=getEnsName.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getEnsName.js","sourceRoot":"","sources":["../../../actions/ens/getEnsName.ts"],"names":[],"mappings":";;;AAIA,qDAAqE;AAIrE,6FAGqD;AACrD,4DAA0E;AAC1E,yDAAwE;AACxE,uEAGyC;AACzC,2DAAoD;AACpD,+DAIkC;AA8C3B,KAAK,UAAU,UAAU,CAC9B,MAAiC,EACjC,EACE,OAAO,EACP,WAAW,EACX,QAAQ,EACR,wBAAwB,EAAE,yBAAyB,GAC9B;IAEvB,IAAI,wBAAwB,GAAG,yBAAyB,CAAA;IACxD,IAAI,CAAC,wBAAwB,EAAE;QAC7B,IAAI,CAAC,MAAM,CAAC,KAAK;YACf,MAAM,IAAI,KAAK,CACb,oEAAoE,CACrE,CAAA;QAEH,wBAAwB,GAAG,IAAA,oDAAuB,EAAC;YACjD,WAAW;YACX,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,QAAQ,EAAE,sBAAsB;SACjC,CAAC,CAAA;KACH;IAED,MAAM,WAAW,GAAG,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,eAAe,CAAA;IACxE,IAAI;QACF,MAAM,GAAG,GAAG,MAAM,IAAA,wBAAS,EACzB,MAAM,EACN,8BAAY,CACb,CAAC;YACA,OAAO,EAAE,wBAAwB;YACjC,GAAG,EAAE,qCAA2B;YAChC,YAAY,EAAE,SAAS;YACvB,IAAI,EAAE,CAAC,IAAA,gBAAK,EAAC,IAAA,gCAAa,EAAC,WAAW,CAAC,CAAC,CAAC;YACzC,WAAW;YACX,QAAQ;SACT,CAAC,CAAA;QACF,OAAO,GAAG,CAAC,CAAC,CAAC,CAAA;KACd;IAAC,OAAO,GAAG,EAAE;QACZ,IAAI,IAAA,wCAA4B,EAAC,GAAG,EAAE,SAAS,CAAC;YAAE,OAAO,IAAI,CAAA;QAC7D,MAAM,GAAG,CAAA;KACV;AACH,CAAC;AAzCD,gCAyCC"}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getEnsResolver = void 0;
|
4
|
+
const getChainContractAddress_js_1 = require("../../utils/chain/getChainContractAddress.js");
|
5
|
+
const toHex_js_1 = require("../../utils/encoding/toHex.js");
|
6
|
+
const packetToBytes_js_1 = require("../../utils/ens/packetToBytes.js");
|
7
|
+
const getAction_js_1 = require("../../utils/getAction.js");
|
8
|
+
const readContract_js_1 = require("../public/readContract.js");
|
9
|
+
async function getEnsResolver(client, { blockNumber, blockTag, name, universalResolverAddress: universalResolverAddress_, }) {
|
10
|
+
let universalResolverAddress = universalResolverAddress_;
|
11
|
+
if (!universalResolverAddress) {
|
12
|
+
if (!client.chain)
|
13
|
+
throw new Error('client chain not configured. universalResolverAddress is required.');
|
14
|
+
universalResolverAddress = (0, getChainContractAddress_js_1.getChainContractAddress)({
|
15
|
+
blockNumber,
|
16
|
+
chain: client.chain,
|
17
|
+
contract: 'ensUniversalResolver',
|
18
|
+
});
|
19
|
+
}
|
20
|
+
const [resolverAddress] = await (0, getAction_js_1.getAction)(client, readContract_js_1.readContract)({
|
21
|
+
address: universalResolverAddress,
|
22
|
+
abi: [
|
23
|
+
{
|
24
|
+
inputs: [{ type: 'bytes' }],
|
25
|
+
name: 'findResolver',
|
26
|
+
outputs: [{ type: 'address' }, { type: 'bytes32' }],
|
27
|
+
stateMutability: 'view',
|
28
|
+
type: 'function',
|
29
|
+
},
|
30
|
+
],
|
31
|
+
functionName: 'findResolver',
|
32
|
+
args: [(0, toHex_js_1.toHex)((0, packetToBytes_js_1.packetToBytes)(name))],
|
33
|
+
blockNumber,
|
34
|
+
blockTag,
|
35
|
+
});
|
36
|
+
return resolverAddress;
|
37
|
+
}
|
38
|
+
exports.getEnsResolver = getEnsResolver;
|
39
|
+
//# sourceMappingURL=getEnsResolver.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getEnsResolver.js","sourceRoot":"","sources":["../../../actions/ens/getEnsResolver.ts"],"names":[],"mappings":";;;AAOA,6FAGqD;AACrD,4DAA0E;AAC1E,uEAGyC;AACzC,2DAAoD;AACpD,+DAGkC;AA+C3B,KAAK,UAAU,cAAc,CAClC,MAAiC,EACjC,EACE,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,wBAAwB,EAAE,yBAAyB,GAC1B;IAE3B,IAAI,wBAAwB,GAAG,yBAAyB,CAAA;IACxD,IAAI,CAAC,wBAAwB,EAAE;QAC7B,IAAI,CAAC,MAAM,CAAC,KAAK;YACf,MAAM,IAAI,KAAK,CACb,oEAAoE,CACrE,CAAA;QAEH,wBAAwB,GAAG,IAAA,oDAAuB,EAAC;YACjD,WAAW;YACX,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,QAAQ,EAAE,sBAAsB;SACjC,CAAC,CAAA;KACH;IAED,MAAM,CAAC,eAAe,CAAC,GAAG,MAAM,IAAA,wBAAS,EACvC,MAAM,EACN,8BAAY,CACb,CAAC;QACA,OAAO,EAAE,wBAAwB;QACjC,GAAG,EAAE;YACH;gBACE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gBAC3B,IAAI,EAAE,cAAc;gBACpB,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;gBACnD,eAAe,EAAE,MAAM;gBACvB,IAAI,EAAE,UAAU;aACjB;SACF;QACD,YAAY,EAAE,cAAc;QAC5B,IAAI,EAAE,CAAC,IAAA,gBAAK,EAAC,IAAA,gCAAa,EAAC,IAAI,CAAC,CAAC,CAAC;QAClC,WAAW;QACX,QAAQ;KACT,CAAC,CAAA;IACF,OAAO,eAAe,CAAA;AACxB,CAAC;AA3CD,wCA2CC"}
|
@@ -0,0 +1,57 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getEnsText = void 0;
|
4
|
+
const abis_js_1 = require("../../constants/abis.js");
|
5
|
+
const decodeFunctionResult_js_1 = require("../../utils/abi/decodeFunctionResult.js");
|
6
|
+
const encodeFunctionData_js_1 = require("../../utils/abi/encodeFunctionData.js");
|
7
|
+
const getChainContractAddress_js_1 = require("../../utils/chain/getChainContractAddress.js");
|
8
|
+
const toHex_js_1 = require("../../utils/encoding/toHex.js");
|
9
|
+
const errors_js_1 = require("../../utils/ens/errors.js");
|
10
|
+
const namehash_js_1 = require("../../utils/ens/namehash.js");
|
11
|
+
const packetToBytes_js_1 = require("../../utils/ens/packetToBytes.js");
|
12
|
+
const getAction_js_1 = require("../../utils/getAction.js");
|
13
|
+
const readContract_js_1 = require("../public/readContract.js");
|
14
|
+
async function getEnsText(client, { blockNumber, blockTag, name, key, universalResolverAddress: universalResolverAddress_, }) {
|
15
|
+
let universalResolverAddress = universalResolverAddress_;
|
16
|
+
if (!universalResolverAddress) {
|
17
|
+
if (!client.chain)
|
18
|
+
throw new Error('client chain not configured. universalResolverAddress is required.');
|
19
|
+
universalResolverAddress = (0, getChainContractAddress_js_1.getChainContractAddress)({
|
20
|
+
blockNumber,
|
21
|
+
chain: client.chain,
|
22
|
+
contract: 'ensUniversalResolver',
|
23
|
+
});
|
24
|
+
}
|
25
|
+
try {
|
26
|
+
const res = await (0, getAction_js_1.getAction)(client, readContract_js_1.readContract)({
|
27
|
+
address: universalResolverAddress,
|
28
|
+
abi: abis_js_1.universalResolverResolveAbi,
|
29
|
+
functionName: 'resolve',
|
30
|
+
args: [
|
31
|
+
(0, toHex_js_1.toHex)((0, packetToBytes_js_1.packetToBytes)(name)),
|
32
|
+
(0, encodeFunctionData_js_1.encodeFunctionData)({
|
33
|
+
abi: abis_js_1.textResolverAbi,
|
34
|
+
functionName: 'text',
|
35
|
+
args: [(0, namehash_js_1.namehash)(name), key],
|
36
|
+
}),
|
37
|
+
],
|
38
|
+
blockNumber,
|
39
|
+
blockTag,
|
40
|
+
});
|
41
|
+
if (res[0] === '0x')
|
42
|
+
return null;
|
43
|
+
const record = (0, decodeFunctionResult_js_1.decodeFunctionResult)({
|
44
|
+
abi: abis_js_1.textResolverAbi,
|
45
|
+
functionName: 'text',
|
46
|
+
data: res[0],
|
47
|
+
});
|
48
|
+
return record === '' ? null : record;
|
49
|
+
}
|
50
|
+
catch (err) {
|
51
|
+
if ((0, errors_js_1.isNullUniversalResolverError)(err, 'resolve'))
|
52
|
+
return null;
|
53
|
+
throw err;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
exports.getEnsText = getEnsText;
|
57
|
+
//# sourceMappingURL=getEnsText.js.map
|