viem 0.0.0-portable-types-20230522163654 → 0.0.0-tmm-sign-typed-data-types.20230619T221425
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/README.md +12 -0
- package/dist/cjs/actions/ens/getEnsAddress.js +34 -23
- package/dist/cjs/actions/ens/getEnsAddress.js.map +1 -1
- package/dist/cjs/actions/getContract.js +22 -16
- package/dist/cjs/actions/getContract.js.map +1 -1
- package/dist/cjs/actions/public/call.js +1 -1
- package/dist/cjs/actions/public/call.js.map +1 -1
- package/dist/cjs/actions/public/createContractEventFilter.js +2 -1
- package/dist/cjs/actions/public/createContractEventFilter.js.map +1 -1
- package/dist/cjs/actions/public/createEventFilter.js +2 -1
- package/dist/cjs/actions/public/createEventFilter.js.map +1 -1
- package/dist/cjs/actions/public/estimateContractGas.js +1 -1
- package/dist/cjs/actions/public/estimateContractGas.js.map +1 -1
- package/dist/cjs/actions/public/estimateGas.js +3 -2
- package/dist/cjs/actions/public/estimateGas.js.map +1 -1
- package/dist/cjs/actions/public/getBlock.js.map +1 -1
- package/dist/cjs/actions/public/getBlockTransactionCount.js +1 -1
- package/dist/cjs/actions/public/getBlockTransactionCount.js.map +1 -1
- package/dist/cjs/actions/public/getChainId.js +3 -1
- package/dist/cjs/actions/public/getChainId.js.map +1 -1
- package/dist/cjs/actions/public/getFilterChanges.js +15 -3
- package/dist/cjs/actions/public/getFilterChanges.js.map +1 -1
- package/dist/cjs/actions/public/getFilterLogs.js +14 -2
- package/dist/cjs/actions/public/getFilterLogs.js.map +1 -1
- package/dist/cjs/actions/public/getGasPrice.js.map +1 -1
- package/dist/cjs/actions/public/getLogs.js +15 -3
- package/dist/cjs/actions/public/getLogs.js.map +1 -1
- package/dist/cjs/actions/public/getTransactionCount.js.map +1 -1
- package/dist/cjs/actions/public/verifyTypedData.js +6 -1
- package/dist/cjs/actions/public/verifyTypedData.js.map +1 -1
- package/dist/cjs/actions/public/watchContractEvent.js +3 -1
- package/dist/cjs/actions/public/watchContractEvent.js.map +1 -1
- package/dist/cjs/actions/public/watchEvent.js +3 -1
- package/dist/cjs/actions/public/watchEvent.js.map +1 -1
- package/dist/cjs/actions/test/getAutomine.js +4 -0
- package/dist/cjs/actions/test/getAutomine.js.map +1 -1
- package/dist/cjs/actions/test/mine.js +10 -4
- package/dist/cjs/actions/test/mine.js.map +1 -1
- package/dist/cjs/actions/test/sendUnsignedTransaction.js +21 -3
- package/dist/cjs/actions/test/sendUnsignedTransaction.js.map +1 -1
- package/dist/cjs/actions/test/setAutomine.js +11 -4
- package/dist/cjs/actions/test/setAutomine.js.map +1 -1
- package/dist/cjs/actions/test/setBalance.js +10 -4
- package/dist/cjs/actions/test/setBalance.js.map +1 -1
- package/dist/cjs/actions/wallet/sendTransaction.js +1 -1
- package/dist/cjs/actions/wallet/sendTransaction.js.map +1 -1
- package/dist/cjs/actions/wallet/signMessage.js +8 -1
- package/dist/cjs/actions/wallet/signMessage.js.map +1 -1
- package/dist/cjs/chains.js +14 -2
- package/dist/cjs/chains.js.map +1 -1
- package/dist/cjs/clients/createClient.js +1 -1
- package/dist/cjs/clients/createClient.js.map +1 -1
- package/dist/cjs/clients/createPublicClient.js.map +1 -1
- package/dist/cjs/clients/createTestClient.js.map +1 -1
- package/dist/cjs/clients/createWalletClient.js.map +1 -1
- package/dist/cjs/clients/decorators/public.js.map +1 -1
- package/dist/cjs/clients/decorators/test.js.map +1 -1
- package/dist/cjs/clients/transports/createTransport.js.map +1 -1
- package/dist/cjs/clients/transports/custom.js.map +1 -1
- package/dist/cjs/clients/transports/fallback.js.map +1 -1
- package/dist/cjs/clients/transports/http.js +25 -7
- package/dist/cjs/clients/transports/http.js.map +1 -1
- package/dist/cjs/clients/transports/webSocket.js +22 -14
- package/dist/cjs/clients/transports/webSocket.js.map +1 -1
- package/dist/cjs/errors/abi.js +15 -1
- package/dist/cjs/errors/abi.js.map +1 -1
- package/dist/cjs/errors/base.js +4 -11
- package/dist/cjs/errors/base.js.map +1 -1
- package/dist/cjs/errors/request.js.map +1 -1
- package/dist/cjs/errors/rpc.js +8 -2
- package/dist/cjs/errors/rpc.js.map +1 -1
- package/dist/cjs/errors/version.js +1 -1
- package/dist/cjs/errors/version.js.map +1 -1
- package/dist/cjs/index.js +26 -10
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/eip1193.js +3 -3
- package/dist/cjs/types/eip1193.js.map +1 -1
- package/dist/cjs/utils/abi/decodeEventLog.js +33 -19
- package/dist/cjs/utils/abi/decodeEventLog.js.map +1 -1
- package/dist/cjs/utils/abi/encodeEventTopics.js +11 -7
- package/dist/cjs/utils/abi/encodeEventTopics.js.map +1 -1
- package/dist/cjs/utils/abi/getAbiItem.js +2 -0
- package/dist/cjs/utils/abi/getAbiItem.js.map +1 -1
- package/dist/cjs/utils/buildRequest.js.map +1 -1
- package/dist/cjs/utils/encoding/toBytes.js.map +1 -1
- package/dist/cjs/utils/encoding/toHex.js.map +1 -1
- package/dist/cjs/utils/ens/encodeLabelhash.js +8 -0
- package/dist/cjs/utils/ens/encodeLabelhash.js.map +1 -0
- package/dist/cjs/utils/ens/encodedLabelToLabelhash.js +18 -0
- package/dist/cjs/utils/ens/encodedLabelToLabelhash.js.map +1 -0
- package/dist/cjs/utils/ens/labelhash.js +2 -1
- package/dist/cjs/utils/ens/labelhash.js.map +1 -1
- package/dist/cjs/utils/ens/namehash.js +5 -1
- package/dist/cjs/utils/ens/namehash.js.map +1 -1
- package/dist/cjs/utils/ens/packetToBytes.js +10 -9
- package/dist/cjs/utils/ens/packetToBytes.js.map +1 -1
- package/dist/cjs/utils/filters/createFilterRequestScope.js.map +1 -1
- package/dist/cjs/utils/formatters/block.js +3 -1
- package/dist/cjs/utils/formatters/block.js.map +1 -1
- package/dist/cjs/utils/formatters/log.js +2 -2
- package/dist/cjs/utils/formatters/transaction.js +3 -1
- package/dist/cjs/utils/formatters/transaction.js.map +1 -1
- package/dist/cjs/utils/formatters/transactionReceipt.js +1 -1
- package/dist/cjs/utils/formatters/transactionReceipt.js.map +1 -1
- package/dist/cjs/utils/formatters/transactionRequest.js.map +1 -1
- package/dist/cjs/utils/hash/getEventSelector.js +5 -1
- package/dist/cjs/utils/hash/getEventSelector.js.map +1 -1
- package/dist/cjs/utils/hash/getFunctionSelector.js +5 -1
- package/dist/cjs/utils/hash/getFunctionSelector.js.map +1 -1
- package/dist/cjs/utils/hash/hashFunction.js +6 -4
- package/dist/cjs/utils/hash/hashFunction.js.map +1 -1
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/cjs/utils/observe.js.map +1 -1
- package/dist/cjs/utils/promise/createBatchScheduler.js.map +1 -1
- package/dist/cjs/utils/promise/withCache.js +8 -4
- package/dist/cjs/utils/promise/withCache.js.map +1 -1
- package/dist/cjs/utils/rpc.js +12 -17
- package/dist/cjs/utils/rpc.js.map +1 -1
- package/dist/cjs/utils/signature/hashMessage.js +7 -1
- package/dist/cjs/utils/signature/hashMessage.js.map +1 -1
- package/dist/cjs/utils/transaction/getTransactionType.js.map +1 -1
- package/dist/cjs/utils/transaction/prepareRequest.js +1 -2
- package/dist/cjs/utils/transaction/prepareRequest.js.map +1 -1
- package/dist/cjs/utils/transaction/serializeTransaction.js.map +1 -1
- package/dist/cjs/utils/typedData.js.map +1 -1
- package/dist/cjs/utils/unit/parseUnits.js +13 -3
- package/dist/cjs/utils/unit/parseUnits.js.map +1 -1
- package/dist/esm/accounts/generateMnemonic.js +7 -0
- package/dist/esm/accounts/generateMnemonic.js.map +1 -1
- package/dist/esm/accounts/generatePrivateKey.js +5 -0
- package/dist/esm/accounts/generatePrivateKey.js.map +1 -1
- package/dist/esm/accounts/hdKeyToAccount.js +5 -0
- package/dist/esm/accounts/hdKeyToAccount.js.map +1 -1
- package/dist/esm/accounts/mnemonicToAccount.js +5 -0
- package/dist/esm/accounts/mnemonicToAccount.js.map +1 -1
- package/dist/esm/accounts/privateKeyToAccount.js +5 -0
- package/dist/esm/accounts/privateKeyToAccount.js.map +1 -1
- package/dist/esm/accounts/toAccount.js +5 -0
- package/dist/esm/accounts/toAccount.js.map +1 -1
- package/dist/esm/accounts/utils/publicKeyToAddress.js +7 -0
- package/dist/esm/accounts/utils/publicKeyToAddress.js.map +1 -1
- package/dist/esm/accounts/utils/sign.js +8 -0
- package/dist/esm/accounts/utils/sign.js.map +1 -1
- package/dist/esm/accounts/utils/signMessage.js +6 -0
- package/dist/esm/accounts/utils/signMessage.js.map +1 -1
- package/dist/esm/accounts/utils/signTypedData.js +6 -0
- package/dist/esm/accounts/utils/signTypedData.js.map +1 -1
- package/dist/esm/actions/ens/getEnsAddress.js +62 -23
- package/dist/esm/actions/ens/getEnsAddress.js.map +1 -1
- package/dist/esm/actions/ens/getEnsAvatar.js +28 -0
- package/dist/esm/actions/ens/getEnsAvatar.js.map +1 -1
- package/dist/esm/actions/ens/getEnsName.js +27 -0
- package/dist/esm/actions/ens/getEnsName.js.map +1 -1
- package/dist/esm/actions/ens/getEnsResolver.js +28 -0
- package/dist/esm/actions/ens/getEnsResolver.js.map +1 -1
- package/dist/esm/actions/ens/getEnsText.js +29 -0
- package/dist/esm/actions/ens/getEnsText.js.map +1 -1
- package/dist/esm/actions/getContract.js +58 -16
- package/dist/esm/actions/getContract.js.map +1 -1
- package/dist/esm/actions/public/call.js +32 -1
- package/dist/esm/actions/public/call.js.map +1 -1
- package/dist/esm/actions/public/createBlockFilter.js +21 -0
- package/dist/esm/actions/public/createBlockFilter.js.map +1 -1
- package/dist/esm/actions/public/createContractEventFilter.js +24 -1
- package/dist/esm/actions/public/createContractEventFilter.js.map +1 -1
- package/dist/esm/actions/public/createEventFilter.js +25 -1
- package/dist/esm/actions/public/createEventFilter.js.map +1 -1
- package/dist/esm/actions/public/createPendingTransactionFilter.js +21 -0
- package/dist/esm/actions/public/createPendingTransactionFilter.js.map +1 -1
- package/dist/esm/actions/public/estimateContractGas.js +28 -1
- package/dist/esm/actions/public/estimateContractGas.js.map +1 -1
- package/dist/esm/actions/public/estimateGas.js +29 -2
- package/dist/esm/actions/public/estimateGas.js.map +1 -1
- package/dist/esm/actions/public/getBalance.js +35 -0
- package/dist/esm/actions/public/getBalance.js.map +1 -1
- package/dist/esm/actions/public/getBlock.js +24 -0
- package/dist/esm/actions/public/getBlock.js.map +1 -1
- package/dist/esm/actions/public/getBlockNumber.js +23 -0
- package/dist/esm/actions/public/getBlockNumber.js.map +1 -1
- package/dist/esm/actions/public/getBlockTransactionCount.js +24 -1
- package/dist/esm/actions/public/getBlockTransactionCount.js.map +1 -1
- package/dist/esm/actions/public/getBytecode.js +23 -0
- package/dist/esm/actions/public/getBytecode.js.map +1 -1
- package/dist/esm/actions/public/getChainId.js +24 -1
- package/dist/esm/actions/public/getChainId.js.map +1 -1
- package/dist/esm/actions/public/getFeeHistory.js +24 -0
- package/dist/esm/actions/public/getFeeHistory.js.map +1 -1
- package/dist/esm/actions/public/getFilterChanges.js +99 -3
- package/dist/esm/actions/public/getFilterChanges.js.map +1 -1
- package/dist/esm/actions/public/getFilterLogs.js +43 -2
- package/dist/esm/actions/public/getFilterLogs.js.map +1 -1
- package/dist/esm/actions/public/getGasPrice.js +20 -0
- package/dist/esm/actions/public/getGasPrice.js.map +1 -1
- package/dist/esm/actions/public/getLogs.js +39 -3
- package/dist/esm/actions/public/getLogs.js.map +1 -1
- package/dist/esm/actions/public/getStorageAt.js +24 -0
- package/dist/esm/actions/public/getStorageAt.js.map +1 -1
- package/dist/esm/actions/public/getTransaction.js +24 -0
- package/dist/esm/actions/public/getTransaction.js.map +1 -1
- package/dist/esm/actions/public/getTransactionConfirmations.js +24 -0
- package/dist/esm/actions/public/getTransactionConfirmations.js.map +1 -1
- package/dist/esm/actions/public/getTransactionCount.js +23 -0
- package/dist/esm/actions/public/getTransactionCount.js.map +1 -1
- package/dist/esm/actions/public/getTransactionReceipt.js +24 -0
- package/dist/esm/actions/public/getTransactionReceipt.js.map +1 -1
- package/dist/esm/actions/public/multicall.js +40 -0
- package/dist/esm/actions/public/multicall.js.map +1 -1
- package/dist/esm/actions/public/readContract.js +31 -0
- package/dist/esm/actions/public/readContract.js.map +1 -1
- package/dist/esm/actions/public/simulateContract.js +31 -0
- package/dist/esm/actions/public/simulateContract.js.map +1 -1
- package/dist/esm/actions/public/uninstallFilter.js +24 -0
- package/dist/esm/actions/public/uninstallFilter.js.map +1 -1
- package/dist/esm/actions/public/verifyHash.js +10 -0
- package/dist/esm/actions/public/verifyHash.js.map +1 -1
- package/dist/esm/actions/public/verifyMessage.js +11 -0
- package/dist/esm/actions/public/verifyMessage.js.map +1 -1
- package/dist/esm/actions/public/verifyTypedData.js +16 -2
- package/dist/esm/actions/public/verifyTypedData.js.map +1 -1
- package/dist/esm/actions/public/waitForTransactionReceipt.js +52 -0
- package/dist/esm/actions/public/waitForTransactionReceipt.js.map +1 -1
- package/dist/esm/actions/public/watchBlockNumber.js +31 -0
- package/dist/esm/actions/public/watchBlockNumber.js.map +1 -1
- package/dist/esm/actions/public/watchBlocks.js +35 -1
- package/dist/esm/actions/public/watchBlocks.js.map +1 -1
- package/dist/esm/actions/public/watchContractEvent.js +39 -1
- package/dist/esm/actions/public/watchContractEvent.js.map +1 -1
- package/dist/esm/actions/public/watchEvent.js +41 -1
- package/dist/esm/actions/public/watchEvent.js.map +1 -1
- package/dist/esm/actions/public/watchPendingTransactions.js +29 -0
- package/dist/esm/actions/public/watchPendingTransactions.js.map +1 -1
- package/dist/esm/actions/test/dropTransaction.js +22 -0
- package/dist/esm/actions/test/dropTransaction.js.map +1 -1
- package/dist/esm/actions/test/getAutomine.js +24 -0
- package/dist/esm/actions/test/getAutomine.js.map +1 -1
- package/dist/esm/actions/test/getTxpoolContent.js +20 -0
- package/dist/esm/actions/test/getTxpoolContent.js.map +1 -1
- package/dist/esm/actions/test/getTxpoolStatus.js +20 -0
- package/dist/esm/actions/test/getTxpoolStatus.js.map +1 -1
- package/dist/esm/actions/test/impersonateAccount.js +22 -0
- package/dist/esm/actions/test/impersonateAccount.js.map +1 -1
- package/dist/esm/actions/test/increaseTime.js +22 -0
- package/dist/esm/actions/test/increaseTime.js.map +1 -1
- package/dist/esm/actions/test/inspectTxpool.js +20 -0
- package/dist/esm/actions/test/inspectTxpool.js.map +1 -1
- package/dist/esm/actions/test/mine.js +30 -4
- package/dist/esm/actions/test/mine.js.map +1 -1
- package/dist/esm/actions/test/removeBlockTimestampInterval.js +19 -0
- package/dist/esm/actions/test/removeBlockTimestampInterval.js.map +1 -1
- package/dist/esm/actions/test/reset.js +20 -0
- package/dist/esm/actions/test/reset.js.map +1 -1
- package/dist/esm/actions/test/revert.js +20 -0
- package/dist/esm/actions/test/revert.js.map +1 -1
- package/dist/esm/actions/test/sendUnsignedTransaction.js +48 -4
- package/dist/esm/actions/test/sendUnsignedTransaction.js.map +1 -1
- package/dist/esm/actions/test/setAutomine.js +30 -4
- package/dist/esm/actions/test/setAutomine.js.map +1 -1
- package/dist/esm/actions/test/setBalance.js +33 -4
- package/dist/esm/actions/test/setBalance.js.map +1 -1
- package/dist/esm/actions/test/setBlockGasLimit.js +20 -0
- package/dist/esm/actions/test/setBlockGasLimit.js.map +1 -1
- package/dist/esm/actions/test/setBlockTimestampInterval.js +20 -0
- package/dist/esm/actions/test/setBlockTimestampInterval.js.map +1 -1
- package/dist/esm/actions/test/setCode.js +23 -0
- package/dist/esm/actions/test/setCode.js.map +1 -1
- package/dist/esm/actions/test/setCoinbase.js +22 -0
- package/dist/esm/actions/test/setCoinbase.js.map +1 -1
- package/dist/esm/actions/test/setIntervalMining.js +20 -0
- package/dist/esm/actions/test/setIntervalMining.js.map +1 -1
- package/dist/esm/actions/test/setLoggingEnabled.js +19 -0
- package/dist/esm/actions/test/setLoggingEnabled.js.map +1 -1
- package/dist/esm/actions/test/setMinGasPrice.js +24 -0
- package/dist/esm/actions/test/setMinGasPrice.js.map +1 -1
- package/dist/esm/actions/test/setNextBlockBaseFeePerGas.js +22 -0
- package/dist/esm/actions/test/setNextBlockBaseFeePerGas.js.map +1 -1
- package/dist/esm/actions/test/setNextBlockTimestamp.js +20 -0
- package/dist/esm/actions/test/setNextBlockTimestamp.js.map +1 -1
- package/dist/esm/actions/test/setNonce.js +23 -0
- package/dist/esm/actions/test/setNonce.js.map +1 -1
- package/dist/esm/actions/test/setRpcUrl.js +20 -0
- package/dist/esm/actions/test/setRpcUrl.js.map +1 -1
- package/dist/esm/actions/test/setStorageAt.js +24 -0
- package/dist/esm/actions/test/setStorageAt.js.map +1 -1
- package/dist/esm/actions/test/snapshot.js +19 -0
- package/dist/esm/actions/test/snapshot.js.map +1 -1
- package/dist/esm/actions/test/stopImpersonatingAccount.js +22 -0
- package/dist/esm/actions/test/stopImpersonatingAccount.js.map +1 -1
- package/dist/esm/actions/wallet/addChain.js +19 -0
- package/dist/esm/actions/wallet/addChain.js.map +1 -1
- package/dist/esm/actions/wallet/deployContract.js +27 -0
- package/dist/esm/actions/wallet/deployContract.js.map +1 -1
- package/dist/esm/actions/wallet/getAddresses.js +20 -0
- package/dist/esm/actions/wallet/getAddresses.js.map +1 -1
- package/dist/esm/actions/wallet/getPermissions.js +20 -0
- package/dist/esm/actions/wallet/getPermissions.js.map +1 -1
- package/dist/esm/actions/wallet/requestAddresses.js +24 -0
- package/dist/esm/actions/wallet/requestAddresses.js.map +1 -1
- package/dist/esm/actions/wallet/requestPermissions.js +23 -0
- package/dist/esm/actions/wallet/requestPermissions.js.map +1 -1
- package/dist/esm/actions/wallet/sendTransaction.js +48 -1
- package/dist/esm/actions/wallet/sendTransaction.js.map +1 -1
- package/dist/esm/actions/wallet/signMessage.js +55 -2
- package/dist/esm/actions/wallet/signMessage.js.map +1 -1
- package/dist/esm/actions/wallet/signTypedData.js +100 -0
- package/dist/esm/actions/wallet/signTypedData.js.map +1 -1
- package/dist/esm/actions/wallet/switchChain.js +20 -0
- package/dist/esm/actions/wallet/switchChain.js.map +1 -1
- package/dist/esm/actions/wallet/watchAsset.js +28 -0
- package/dist/esm/actions/wallet/watchAsset.js.map +1 -1
- package/dist/esm/actions/wallet/writeContract.js +50 -0
- package/dist/esm/actions/wallet/writeContract.js.map +1 -1
- package/dist/esm/chains.js +99 -87
- package/dist/esm/chains.js.map +1 -1
- package/dist/esm/clients/createClient.js +4 -1
- package/dist/esm/clients/createClient.js.map +1 -1
- package/dist/esm/clients/createPublicClient.js +19 -0
- package/dist/esm/clients/createPublicClient.js.map +1 -1
- package/dist/esm/clients/createTestClient.js +23 -0
- package/dist/esm/clients/createTestClient.js.map +1 -1
- package/dist/esm/clients/createWalletClient.js +36 -0
- package/dist/esm/clients/createWalletClient.js.map +1 -1
- package/dist/esm/clients/decorators/public.js.map +1 -1
- package/dist/esm/clients/decorators/test.js.map +1 -1
- package/dist/esm/clients/transports/createTransport.js +3 -0
- package/dist/esm/clients/transports/createTransport.js.map +1 -1
- package/dist/esm/clients/transports/custom.js +3 -0
- package/dist/esm/clients/transports/custom.js.map +1 -1
- package/dist/esm/clients/transports/fallback.js +11 -0
- package/dist/esm/clients/transports/fallback.js.map +1 -1
- package/dist/esm/clients/transports/http.js +31 -8
- package/dist/esm/clients/transports/http.js.map +1 -1
- package/dist/esm/clients/transports/webSocket.js +28 -15
- package/dist/esm/clients/transports/webSocket.js.map +1 -1
- package/dist/esm/constants/abis.js +6 -0
- package/dist/esm/constants/abis.js.map +1 -1
- package/dist/esm/constants/solidity.js +1 -0
- package/dist/esm/constants/solidity.js.map +1 -1
- package/dist/esm/contract.js +0 -1
- package/dist/esm/contract.js.map +1 -1
- package/dist/esm/errors/abi.js +15 -1
- package/dist/esm/errors/abi.js.map +1 -1
- package/dist/esm/errors/base.js +4 -11
- package/dist/esm/errors/base.js.map +1 -1
- package/dist/esm/errors/node.js +9 -0
- package/dist/esm/errors/node.js.map +1 -1
- package/dist/esm/errors/request.js.map +1 -1
- package/dist/esm/errors/rpc.js +111 -2
- package/dist/esm/errors/rpc.js.map +1 -1
- package/dist/esm/errors/version.js +1 -1
- package/dist/esm/errors/version.js.map +1 -1
- package/dist/esm/index.js +2 -51
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/package.json +1 -1
- package/dist/esm/types/account.js +1 -1
- package/dist/esm/types/account.js.map +1 -1
- package/dist/esm/types/eip1193.js +3 -1
- package/dist/esm/types/eip1193.js.map +1 -1
- package/dist/esm/utils/abi/decodeAbiParameters.js +29 -0
- package/dist/esm/utils/abi/decodeAbiParameters.js.map +1 -1
- package/dist/esm/utils/abi/decodeEventLog.js +35 -19
- package/dist/esm/utils/abi/decodeEventLog.js.map +1 -1
- package/dist/esm/utils/abi/encodeAbiParameters.js +10 -1
- package/dist/esm/utils/abi/encodeAbiParameters.js.map +1 -1
- package/dist/esm/utils/abi/encodeEventTopics.js +11 -7
- package/dist/esm/utils/abi/encodeEventTopics.js.map +1 -1
- package/dist/esm/utils/abi/getAbiItem.js +9 -0
- package/dist/esm/utils/abi/getAbiItem.js.map +1 -1
- package/dist/esm/utils/accounts.js +3 -0
- package/dist/esm/utils/accounts.js.map +1 -1
- package/dist/esm/utils/buildRequest.js +2 -0
- package/dist/esm/utils/buildRequest.js.map +1 -1
- package/dist/esm/utils/data/size.js +6 -0
- package/dist/esm/utils/data/size.js.map +1 -1
- package/dist/esm/utils/data/slice.js +21 -0
- package/dist/esm/utils/data/slice.js.map +1 -1
- package/dist/esm/utils/encoding/fromBytes.js +79 -0
- package/dist/esm/utils/encoding/fromBytes.js.map +1 -1
- package/dist/esm/utils/encoding/fromHex.js +106 -0
- package/dist/esm/utils/encoding/fromHex.js.map +1 -1
- package/dist/esm/utils/encoding/toBytes.js +102 -1
- package/dist/esm/utils/encoding/toBytes.js.map +1 -1
- package/dist/esm/utils/encoding/toHex.js +108 -2
- package/dist/esm/utils/encoding/toHex.js.map +1 -1
- package/dist/esm/utils/ens/avatar/parseAvatarRecord.js +6 -2
- package/dist/esm/utils/ens/avatar/parseAvatarRecord.js.map +1 -1
- package/dist/esm/utils/ens/avatar/utils.js +10 -0
- package/dist/esm/utils/ens/avatar/utils.js.map +1 -1
- package/dist/esm/utils/ens/encodeLabelhash.js +4 -0
- package/dist/esm/utils/ens/encodeLabelhash.js.map +1 -0
- package/dist/esm/utils/ens/encodedLabelToLabelhash.js +14 -0
- package/dist/esm/utils/ens/encodedLabelToLabelhash.js.map +1 -0
- package/dist/esm/utils/ens/labelhash.js +11 -1
- package/dist/esm/utils/ens/labelhash.js.map +1 -1
- package/dist/esm/utils/ens/namehash.js +18 -2
- package/dist/esm/utils/ens/namehash.js.map +1 -1
- package/dist/esm/utils/ens/normalize.js +10 -0
- package/dist/esm/utils/ens/normalize.js.map +1 -1
- package/dist/esm/utils/ens/packetToBytes.js +16 -9
- package/dist/esm/utils/ens/packetToBytes.js.map +1 -1
- package/dist/esm/utils/filters/createFilterRequestScope.js +5 -0
- package/dist/esm/utils/filters/createFilterRequestScope.js.map +1 -1
- package/dist/esm/utils/formatters/block.js +4 -1
- package/dist/esm/utils/formatters/block.js.map +1 -1
- package/dist/esm/utils/formatters/extract.js +3 -0
- package/dist/esm/utils/formatters/extract.js.map +1 -1
- package/dist/esm/utils/formatters/format.js +3 -0
- package/dist/esm/utils/formatters/format.js.map +1 -1
- package/dist/esm/utils/formatters/log.js +2 -2
- package/dist/esm/utils/formatters/transaction.js +3 -1
- package/dist/esm/utils/formatters/transaction.js.map +1 -1
- package/dist/esm/utils/formatters/transactionReceipt.js +2 -2
- package/dist/esm/utils/formatters/transactionReceipt.js.map +1 -1
- package/dist/esm/utils/formatters/transactionRequest.js +1 -1
- package/dist/esm/utils/formatters/transactionRequest.js.map +1 -1
- package/dist/esm/utils/hash/getEventSelector.js +6 -2
- package/dist/esm/utils/hash/getEventSelector.js.map +1 -1
- package/dist/esm/utils/hash/getFunctionSelector.js +6 -2
- package/dist/esm/utils/hash/getFunctionSelector.js.map +1 -1
- package/dist/esm/utils/hash/hashFunction.js +4 -3
- package/dist/esm/utils/hash/hashFunction.js.map +1 -1
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/esm/utils/observe.js +7 -2
- package/dist/esm/utils/observe.js.map +1 -1
- package/dist/esm/utils/poll.js +3 -0
- package/dist/esm/utils/poll.js.map +1 -1
- package/dist/esm/utils/promise/createBatchScheduler.js +1 -1
- package/dist/esm/utils/promise/createBatchScheduler.js.map +1 -1
- package/dist/esm/utils/promise/withCache.js +23 -6
- package/dist/esm/utils/promise/withCache.js.map +1 -1
- package/dist/esm/utils/regex.js +4 -0
- package/dist/esm/utils/regex.js.map +1 -1
- package/dist/esm/utils/rpc.js +27 -19
- package/dist/esm/utils/rpc.js.map +1 -1
- package/dist/esm/utils/signature/hashMessage.js +8 -2
- package/dist/esm/utils/signature/hashMessage.js.map +1 -1
- package/dist/esm/utils/signature/hashTypedData.js +3 -0
- package/dist/esm/utils/signature/hashTypedData.js.map +1 -1
- package/dist/esm/utils/signature/recoverPublicKey.js +2 -0
- package/dist/esm/utils/signature/recoverPublicKey.js.map +1 -1
- package/dist/esm/utils/signature/verifyMessage.js +12 -0
- package/dist/esm/utils/signature/verifyMessage.js.map +1 -1
- package/dist/esm/utils/signature/verifyTypedData.js +12 -0
- package/dist/esm/utils/signature/verifyTypedData.js.map +1 -1
- package/dist/esm/utils/transaction/getTransactionType.js.map +1 -1
- package/dist/esm/utils/transaction/prepareRequest.js +5 -2
- package/dist/esm/utils/transaction/prepareRequest.js.map +1 -1
- package/dist/esm/utils/transaction/serializeTransaction.js +4 -2
- package/dist/esm/utils/transaction/serializeTransaction.js.map +1 -1
- package/dist/esm/utils/typedData.js +4 -0
- package/dist/esm/utils/typedData.js.map +1 -1
- package/dist/esm/utils/unit/parseUnits.js +15 -3
- package/dist/esm/utils/unit/parseUnits.js.map +1 -1
- package/dist/types/accounts/types.d.ts +3 -5
- package/dist/types/accounts/types.d.ts.map +1 -1
- package/dist/types/accounts/utils/signMessage.d.ts +2 -2
- package/dist/types/accounts/utils/signMessage.d.ts.map +1 -1
- package/dist/types/accounts/utils/signTypedData.d.ts +3 -6
- package/dist/types/accounts/utils/signTypedData.d.ts.map +1 -1
- package/dist/types/actions/ens/getEnsAddress.d.ts.map +1 -1
- package/dist/types/actions/getContract.d.ts +65 -21
- package/dist/types/actions/getContract.d.ts.map +1 -1
- package/dist/types/actions/public/createBlockFilter.d.ts +1 -1
- package/dist/types/actions/public/createContractEventFilter.d.ts +9 -4
- package/dist/types/actions/public/createContractEventFilter.d.ts.map +1 -1
- package/dist/types/actions/public/createEventFilter.d.ts +18 -6
- package/dist/types/actions/public/createEventFilter.d.ts.map +1 -1
- package/dist/types/actions/public/createPendingTransactionFilter.d.ts +1 -1
- package/dist/types/actions/public/estimateContractGas.d.ts +5 -3
- package/dist/types/actions/public/estimateContractGas.d.ts.map +1 -1
- package/dist/types/actions/public/estimateGas.d.ts.map +1 -1
- package/dist/types/actions/public/getBlockNumber.d.ts +2 -2
- package/dist/types/actions/public/getBlockNumber.d.ts.map +1 -1
- package/dist/types/actions/public/getChainId.d.ts.map +1 -1
- package/dist/types/actions/public/getFilterChanges.d.ts +8 -8
- package/dist/types/actions/public/getFilterChanges.d.ts.map +1 -1
- package/dist/types/actions/public/getFilterLogs.d.ts +4 -4
- package/dist/types/actions/public/getFilterLogs.d.ts.map +1 -1
- package/dist/types/actions/public/getLogs.d.ts +10 -4
- package/dist/types/actions/public/getLogs.d.ts.map +1 -1
- package/dist/types/actions/public/getTransaction.d.ts +1 -1
- package/dist/types/actions/public/getTransactionCount.d.ts +1 -1
- package/dist/types/actions/public/getTransactionReceipt.d.ts +1 -1
- package/dist/types/actions/public/multicall.d.ts +1 -1
- package/dist/types/actions/public/readContract.d.ts +2 -2
- package/dist/types/actions/public/readContract.d.ts.map +1 -1
- package/dist/types/actions/public/simulateContract.d.ts +2 -2
- package/dist/types/actions/public/uninstallFilter.d.ts +3 -3
- package/dist/types/actions/public/verifyMessage.d.ts +2 -2
- package/dist/types/actions/public/verifyMessage.d.ts.map +1 -1
- package/dist/types/actions/public/verifyTypedData.d.ts +3 -4
- package/dist/types/actions/public/verifyTypedData.d.ts.map +1 -1
- package/dist/types/actions/public/watchContractEvent.d.ts +11 -6
- package/dist/types/actions/public/watchContractEvent.d.ts.map +1 -1
- package/dist/types/actions/public/watchEvent.d.ts +13 -7
- package/dist/types/actions/public/watchEvent.d.ts.map +1 -1
- package/dist/types/actions/test/getAutomine.d.ts.map +1 -1
- package/dist/types/actions/test/mine.d.ts.map +1 -1
- package/dist/types/actions/test/sendUnsignedTransaction.d.ts +8 -2
- package/dist/types/actions/test/sendUnsignedTransaction.d.ts.map +1 -1
- package/dist/types/actions/test/setAutomine.d.ts.map +1 -1
- package/dist/types/actions/test/setBalance.d.ts.map +1 -1
- package/dist/types/actions/test/setBlockTimestampInterval.d.ts +1 -1
- package/dist/types/actions/test/stopImpersonatingAccount.d.ts +1 -1
- package/dist/types/actions/wallet/deployContract.d.ts +1 -1
- package/dist/types/actions/wallet/signMessage.d.ts +4 -4
- package/dist/types/actions/wallet/signMessage.d.ts.map +1 -1
- package/dist/types/actions/wallet/signTypedData.d.ts +4 -7
- package/dist/types/actions/wallet/signTypedData.d.ts.map +1 -1
- package/dist/types/actions/wallet/writeContract.d.ts +3 -3
- package/dist/types/chains.d.ts +364 -16
- package/dist/types/chains.d.ts.map +1 -1
- package/dist/types/clients/createClient.d.ts +5 -5
- package/dist/types/clients/createClient.d.ts.map +1 -1
- package/dist/types/clients/createPublicClient.d.ts +4 -4
- package/dist/types/clients/createPublicClient.d.ts.map +1 -1
- package/dist/types/clients/createTestClient.d.ts +4 -4
- package/dist/types/clients/createTestClient.d.ts.map +1 -1
- package/dist/types/clients/createWalletClient.d.ts +4 -4
- package/dist/types/clients/createWalletClient.d.ts.map +1 -1
- package/dist/types/clients/decorators/public.d.ts +30 -30
- package/dist/types/clients/decorators/public.d.ts.map +1 -1
- package/dist/types/clients/decorators/test.d.ts +3 -3
- package/dist/types/clients/decorators/test.d.ts.map +1 -1
- package/dist/types/clients/decorators/wallet.d.ts +7 -9
- package/dist/types/clients/decorators/wallet.d.ts.map +1 -1
- package/dist/types/clients/transports/createTransport.d.ts +5 -8
- package/dist/types/clients/transports/createTransport.d.ts.map +1 -1
- package/dist/types/clients/transports/custom.d.ts +2 -2
- package/dist/types/clients/transports/custom.d.ts.map +1 -1
- package/dist/types/clients/transports/http.d.ts +11 -0
- package/dist/types/clients/transports/http.d.ts.map +1 -1
- package/dist/types/clients/transports/webSocket.d.ts.map +1 -1
- package/dist/types/contract.d.ts +1 -1
- package/dist/types/contract.d.ts.map +1 -1
- package/dist/types/errors/abi.d.ts +6 -4
- package/dist/types/errors/abi.d.ts.map +1 -1
- package/dist/types/errors/base.d.ts +0 -1
- package/dist/types/errors/base.d.ts.map +1 -1
- package/dist/types/errors/request.d.ts +16 -8
- package/dist/types/errors/request.d.ts.map +1 -1
- package/dist/types/errors/rpc.d.ts +12 -8
- package/dist/types/errors/rpc.d.ts.map +1 -1
- package/dist/types/errors/version.d.ts +1 -1
- package/dist/types/errors/version.d.ts.map +1 -1
- package/dist/types/index.d.ts +56 -53
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types/account.d.ts +1 -1
- package/dist/types/types/account.d.ts.map +1 -1
- package/dist/types/types/contract.d.ts +11 -6
- package/dist/types/types/contract.d.ts.map +1 -1
- package/dist/types/types/eip1193.d.ts +1048 -834
- package/dist/types/types/eip1193.d.ts.map +1 -1
- package/dist/types/types/filter.d.ts +12 -3
- package/dist/types/types/filter.d.ts.map +1 -1
- package/dist/types/types/log.d.ts +5 -3
- package/dist/types/types/log.d.ts.map +1 -1
- package/dist/types/types/misc.d.ts +4 -0
- package/dist/types/types/misc.d.ts.map +1 -1
- package/dist/types/types/rpc.d.ts +1 -1
- package/dist/types/types/rpc.d.ts.map +1 -1
- package/dist/types/types/transaction.d.ts +14 -5
- package/dist/types/types/transaction.d.ts.map +1 -1
- package/dist/types/types/typedData.d.ts +17 -29
- package/dist/types/types/typedData.d.ts.map +1 -1
- package/dist/types/types/utils.d.ts +11 -0
- package/dist/types/types/utils.d.ts.map +1 -1
- package/dist/types/utils/abi/decodeEventLog.d.ts +6 -5
- package/dist/types/utils/abi/decodeEventLog.d.ts.map +1 -1
- package/dist/types/utils/abi/encodeEventTopics.d.ts.map +1 -1
- package/dist/types/utils/abi/getAbiItem.d.ts.map +1 -1
- package/dist/types/utils/buildRequest.d.ts.map +1 -1
- package/dist/types/utils/ens/encodeLabelhash.d.ts +3 -0
- package/dist/types/utils/ens/encodeLabelhash.d.ts.map +1 -0
- package/dist/types/utils/ens/encodedLabelToLabelhash.d.ts +3 -0
- package/dist/types/utils/ens/encodedLabelToLabelhash.d.ts.map +1 -0
- package/dist/types/utils/ens/labelhash.d.ts.map +1 -1
- package/dist/types/utils/ens/namehash.d.ts.map +1 -1
- package/dist/types/utils/ens/packetToBytes.d.ts.map +1 -1
- package/dist/types/utils/filters/createFilterRequestScope.d.ts +6 -2
- package/dist/types/utils/filters/createFilterRequestScope.d.ts.map +1 -1
- package/dist/types/utils/formatters/block.d.ts.map +1 -1
- package/dist/types/utils/formatters/transaction.d.ts +1 -1
- package/dist/types/utils/formatters/transaction.d.ts.map +1 -1
- package/dist/types/utils/formatters/transactionReceipt.d.ts.map +1 -1
- package/dist/types/utils/hash/getEventSelector.d.ts +2 -1
- package/dist/types/utils/hash/getEventSelector.d.ts.map +1 -1
- package/dist/types/utils/hash/getFunctionSelector.d.ts +2 -1
- package/dist/types/utils/hash/getFunctionSelector.d.ts.map +1 -1
- package/dist/types/utils/hash/hashFunction.d.ts +2 -0
- package/dist/types/utils/hash/hashFunction.d.ts.map +1 -1
- package/dist/types/utils/index.d.ts +1 -1
- package/dist/types/utils/index.d.ts.map +1 -1
- package/dist/types/utils/observe.d.ts.map +1 -1
- package/dist/types/utils/promise/withCache.d.ts.map +1 -1
- package/dist/types/utils/rpc.d.ts +18 -10
- package/dist/types/utils/rpc.d.ts.map +1 -1
- package/dist/types/utils/signature/hashMessage.d.ts +2 -2
- package/dist/types/utils/signature/hashMessage.d.ts.map +1 -1
- package/dist/types/utils/signature/hashTypedData.d.ts +3 -6
- package/dist/types/utils/signature/hashTypedData.d.ts.map +1 -1
- package/dist/types/utils/signature/recoverMessageAddress.d.ts +2 -2
- package/dist/types/utils/signature/recoverMessageAddress.d.ts.map +1 -1
- package/dist/types/utils/signature/recoverTypedDataAddress.d.ts +3 -6
- package/dist/types/utils/signature/recoverTypedDataAddress.d.ts.map +1 -1
- package/dist/types/utils/signature/verifyTypedData.d.ts +3 -6
- package/dist/types/utils/signature/verifyTypedData.d.ts.map +1 -1
- package/dist/types/utils/transaction/getTransactionType.d.ts +2 -2
- package/dist/types/utils/transaction/getTransactionType.d.ts.map +1 -1
- package/dist/types/utils/transaction/prepareRequest.d.ts +1 -1
- package/dist/types/utils/transaction/prepareRequest.d.ts.map +1 -1
- package/dist/types/utils/typedData.d.ts +2 -3
- package/dist/types/utils/typedData.d.ts.map +1 -1
- package/dist/types/utils/unit/parseUnits.d.ts.map +1 -1
- package/package.json +7 -13
- package/src/accounts/types.ts +4 -4
- package/src/accounts/utils/signMessage.ts +2 -2
- package/src/accounts/utils/signTypedData.ts +4 -4
- package/src/actions/ens/getEnsAddress.ts +37 -22
- package/src/actions/getContract.ts +133 -69
- package/src/actions/public/call.ts +1 -1
- package/src/actions/public/createBlockFilter.ts +1 -1
- package/src/actions/public/createContractEventFilter.ts +22 -5
- package/src/actions/public/createEventFilter.ts +35 -14
- package/src/actions/public/createPendingTransactionFilter.ts +1 -1
- package/src/actions/public/estimateContractGas.ts +11 -5
- package/src/actions/public/estimateGas.ts +4 -3
- package/src/actions/public/getBlock.ts +2 -2
- package/src/actions/public/getBlockTransactionCount.ts +1 -1
- package/src/actions/public/getChainId.ts +3 -1
- package/src/actions/public/getFilterChanges.ts +36 -11
- package/src/actions/public/getFilterLogs.ts +34 -8
- package/src/actions/public/getGasPrice.ts +1 -1
- package/src/actions/public/getLogs.ts +39 -10
- package/src/actions/public/getTransaction.ts +1 -1
- package/src/actions/public/getTransactionCount.ts +2 -2
- package/src/actions/public/getTransactionReceipt.ts +1 -1
- package/src/actions/public/multicall.ts +1 -1
- package/src/actions/public/readContract.ts +2 -2
- package/src/actions/public/simulateContract.ts +2 -2
- package/src/actions/public/uninstallFilter.ts +3 -3
- package/src/actions/public/verifyMessage.ts +2 -2
- package/src/actions/public/verifyTypedData.ts +18 -6
- package/src/actions/public/watchContractEvent.ts +17 -5
- package/src/actions/public/watchEvent.ts +19 -6
- package/src/actions/test/getAutomine.ts +4 -0
- package/src/actions/test/mine.ts +10 -4
- package/src/actions/test/sendUnsignedTransaction.ts +54 -5
- package/src/actions/test/setAutomine.ts +8 -4
- package/src/actions/test/setBalance.ts +10 -4
- package/src/actions/test/setBlockTimestampInterval.ts +1 -1
- package/src/actions/test/stopImpersonatingAccount.ts +1 -1
- package/src/actions/wallet/deployContract.ts +1 -1
- package/src/actions/wallet/sendTransaction.ts +1 -1
- package/src/actions/wallet/signMessage.ts +13 -6
- package/src/actions/wallet/signTypedData.ts +5 -5
- package/src/actions/wallet/writeContract.ts +3 -3
- package/src/chains.ts +123 -88
- package/src/clients/createClient.ts +13 -11
- package/src/clients/createPublicClient.ts +4 -5
- package/src/clients/createTestClient.ts +4 -5
- package/src/clients/createWalletClient.ts +4 -5
- package/src/clients/decorators/public.ts +65 -39
- package/src/clients/decorators/test.ts +6 -5
- package/src/clients/decorators/wallet.ts +8 -8
- package/src/clients/transports/createTransport.ts +5 -9
- package/src/clients/transports/custom.ts +1 -2
- package/src/clients/transports/fallback.ts +1 -1
- package/src/clients/transports/http.ts +44 -7
- package/src/clients/transports/webSocket.ts +23 -15
- package/src/contract.ts +3 -3
- package/src/errors/abi.ts +16 -4
- package/src/errors/base.ts +6 -6
- package/src/errors/request.ts +4 -4
- package/src/errors/rpc.ts +43 -15
- package/src/errors/version.ts +1 -1
- package/src/index.ts +266 -247
- package/src/types/account.ts +9 -9
- package/src/types/contract.ts +33 -15
- package/src/types/eip1193.ts +1093 -839
- package/src/types/filter.ts +15 -3
- package/src/types/log.ts +13 -3
- package/src/types/misc.ts +6 -0
- package/src/types/rpc.ts +1 -1
- package/src/types/transaction.ts +24 -6
- package/src/types/typedData.ts +36 -45
- package/src/types/utils.ts +15 -0
- package/src/utils/abi/decodeEventLog.ts +47 -22
- package/src/utils/abi/encodeEventTopics.ts +16 -11
- package/src/utils/abi/getAbiItem.ts +1 -0
- package/src/utils/buildRequest.ts +5 -1
- package/src/utils/encoding/toBytes.ts +1 -1
- package/src/utils/encoding/toHex.ts +2 -2
- package/src/utils/ens/encodeLabelhash.ts +5 -0
- package/src/utils/ens/encodedLabelToLabelhash.ts +11 -0
- package/src/utils/ens/labelhash.ts +2 -1
- package/src/utils/ens/namehash.ts +6 -2
- package/src/utils/ens/packetToBytes.ts +12 -8
- package/src/utils/filters/createFilterRequestScope.ts +12 -4
- package/src/utils/formatters/block.ts +3 -1
- package/src/utils/formatters/log.ts +2 -2
- package/src/utils/formatters/transaction.ts +3 -1
- package/src/utils/formatters/transactionReceipt.ts +4 -2
- package/src/utils/formatters/transactionRequest.ts +1 -1
- package/src/utils/hash/getEventSelector.ts +6 -2
- package/src/utils/hash/getFunctionSelector.ts +6 -2
- package/src/utils/hash/hashFunction.ts +6 -2
- package/src/utils/index.ts +6 -0
- package/src/utils/observe.ts +2 -2
- package/src/utils/promise/createBatchScheduler.ts +1 -1
- package/src/utils/promise/withCache.ts +13 -11
- package/src/utils/rpc.ts +53 -53
- package/src/utils/signature/hashMessage.ts +8 -4
- package/src/utils/signature/hashTypedData.ts +4 -4
- package/src/utils/signature/recoverMessageAddress.ts +2 -2
- package/src/utils/signature/recoverTypedDataAddress.ts +4 -4
- package/src/utils/signature/verifyTypedData.ts +4 -4
- package/src/utils/transaction/getTransactionType.ts +10 -9
- package/src/utils/transaction/prepareRequest.ts +1 -2
- package/src/utils/transaction/serializeTransaction.ts +3 -3
- package/src/utils/typedData.ts +3 -3
- package/src/utils/unit/parseUnits.ts +15 -5
- package/dist/cjs/adapters/ethers.js +0 -49
- package/dist/cjs/adapters/ethers.js.map +0 -1
- package/dist/cjs/ethers.js +0 -6
- package/dist/cjs/ethers.js.map +0 -1
- package/dist/esm/adapters/ethers.js +0 -45
- package/dist/esm/adapters/ethers.js.map +0 -1
- package/dist/esm/ethers.js +0 -2
- package/dist/esm/ethers.js.map +0 -1
- package/dist/types/adapters/ethers.d.ts +0 -27
- package/dist/types/adapters/ethers.d.ts.map +0 -1
- package/dist/types/ethers.d.ts +0 -2
- package/dist/types/ethers.d.ts.map +0 -1
- package/ethers/package.json +0 -5
- package/src/adapters/ethers.ts +0 -94
- package/src/ethers.ts +0 -1
@@ -24,15 +24,18 @@ import { uninstallFilter } from './uninstallFilter.js'
|
|
24
24
|
|
25
25
|
export type OnLogsParameter<
|
26
26
|
TAbiEvent extends AbiEvent | undefined = undefined,
|
27
|
+
TStrict extends boolean | undefined = undefined,
|
27
28
|
TEventName extends string | undefined = MaybeAbiEventName<TAbiEvent>,
|
28
|
-
> = Log<bigint, number, TAbiEvent, [TAbiEvent], TEventName>[]
|
29
|
+
> = Log<bigint, number, TAbiEvent, TStrict, [TAbiEvent], TEventName>[]
|
29
30
|
export type OnLogsFn<
|
30
31
|
TAbiEvent extends AbiEvent | undefined = undefined,
|
32
|
+
TStrict extends boolean | undefined = undefined,
|
31
33
|
TEventName extends string | undefined = MaybeAbiEventName<TAbiEvent>,
|
32
|
-
> = (logs: OnLogsParameter<TAbiEvent, TEventName>) => void
|
34
|
+
> = (logs: OnLogsParameter<TAbiEvent, TStrict, TEventName>) => void
|
33
35
|
|
34
36
|
export type WatchEventParameters<
|
35
37
|
TAbiEvent extends AbiEvent | undefined = undefined,
|
38
|
+
TStrict extends boolean | undefined = undefined,
|
36
39
|
TEventName extends string | undefined = MaybeAbiEventName<TAbiEvent>,
|
37
40
|
> = {
|
38
41
|
/** The address of the contract. */
|
@@ -45,24 +48,30 @@ export type WatchEventParameters<
|
|
45
48
|
/** The callback to call when an error occurred when trying to get for a new block. */
|
46
49
|
onError?: (error: Error) => void
|
47
50
|
/** The callback to call when new event logs are received. */
|
48
|
-
onLogs: OnLogsFn<TAbiEvent, TEventName>
|
51
|
+
onLogs: OnLogsFn<TAbiEvent, TStrict, TEventName>
|
49
52
|
/** Polling frequency (in ms). Defaults to Client's pollingInterval config. */
|
50
53
|
pollingInterval?: number
|
51
54
|
} & (
|
52
55
|
| {
|
53
56
|
event: TAbiEvent
|
54
57
|
args?: MaybeExtractEventArgsFromAbi<[TAbiEvent], TEventName>
|
58
|
+
/**
|
59
|
+
* Whether or not the logs must match the indexed/non-indexed arguments on `event`.
|
60
|
+
* @default false
|
61
|
+
*/
|
62
|
+
strict?: TStrict
|
55
63
|
}
|
56
64
|
| {
|
57
65
|
event?: never
|
58
66
|
args?: never
|
67
|
+
strict?: never
|
59
68
|
}
|
60
69
|
)
|
61
70
|
|
62
71
|
export type WatchEventReturnType = () => void
|
63
72
|
|
64
73
|
/**
|
65
|
-
* Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms#event-log).
|
74
|
+
* Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms.html#event-log).
|
66
75
|
*
|
67
76
|
* - Docs: https://viem.sh/docs/actions/public/watchEvent.html
|
68
77
|
* - JSON-RPC Methods:
|
@@ -74,7 +83,7 @@ export type WatchEventReturnType = () => void
|
|
74
83
|
*
|
75
84
|
* This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent.html#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent.html#onLogs).
|
76
85
|
*
|
77
|
-
* `watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter.html) and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. `eth_newFilter`), then `watchEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead.
|
86
|
+
* `watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter.html) and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. `eth_newFilter`), then `watchEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs.html) instead.
|
78
87
|
*
|
79
88
|
* @param client - Client to use
|
80
89
|
* @param parameters - {@link WatchEventParameters}
|
@@ -97,6 +106,7 @@ export function watchEvent<
|
|
97
106
|
TChain extends Chain | undefined,
|
98
107
|
TAbiEvent extends AbiEvent | undefined,
|
99
108
|
TEventName extends string | undefined,
|
109
|
+
TStrict extends boolean | undefined = undefined,
|
100
110
|
>(
|
101
111
|
client: PublicClient<Transport, TChain>,
|
102
112
|
{
|
@@ -107,7 +117,8 @@ export function watchEvent<
|
|
107
117
|
onError,
|
108
118
|
onLogs,
|
109
119
|
pollingInterval = client.pollingInterval,
|
110
|
-
|
120
|
+
strict: strict_,
|
121
|
+
}: WatchEventParameters<TAbiEvent, TStrict>,
|
111
122
|
): WatchEventReturnType {
|
112
123
|
const observerId = stringify([
|
113
124
|
'watchEvent',
|
@@ -118,6 +129,7 @@ export function watchEvent<
|
|
118
129
|
event,
|
119
130
|
pollingInterval,
|
120
131
|
])
|
132
|
+
const strict = strict_ ?? false
|
121
133
|
|
122
134
|
return observe(observerId, { onLogs, onError }, (emit) => {
|
123
135
|
let previousBlockNumber: bigint
|
@@ -132,6 +144,7 @@ export function watchEvent<
|
|
132
144
|
address,
|
133
145
|
args,
|
134
146
|
event: event!,
|
147
|
+
strict,
|
135
148
|
} as unknown as CreateEventFilterParameters)) as unknown as Filter<
|
136
149
|
'event',
|
137
150
|
[TAbiEvent],
|
@@ -30,6 +30,10 @@ export type GetAutomineReturnType = boolean
|
|
30
30
|
export async function getAutomine<TChain extends Chain | undefined>(
|
31
31
|
client: TestClient<TestClientMode, Transport, TChain>,
|
32
32
|
): Promise<GetAutomineReturnType> {
|
33
|
+
if (client.mode === 'ganache')
|
34
|
+
return await client.request({
|
35
|
+
method: 'eth_mining',
|
36
|
+
})
|
33
37
|
return await client.request({
|
34
38
|
method: `${client.mode}_getAutomine`,
|
35
39
|
})
|
package/src/actions/test/mine.ts
CHANGED
@@ -37,8 +37,14 @@ export async function mine<TChain extends Chain | undefined>(
|
|
37
37
|
client: TestClient<TestClientMode, Transport, TChain>,
|
38
38
|
{ blocks, interval }: MineParameters,
|
39
39
|
) {
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
40
|
+
if (client.mode === 'ganache')
|
41
|
+
await client.request({
|
42
|
+
method: 'evm_mine',
|
43
|
+
params: [{ blocks: numberToHex(blocks) }],
|
44
|
+
})
|
45
|
+
else
|
46
|
+
await client.request({
|
47
|
+
method: `${client.mode}_mine`,
|
48
|
+
params: [numberToHex(blocks), numberToHex(interval || 0)],
|
49
|
+
})
|
44
50
|
}
|
@@ -4,11 +4,27 @@ import type {
|
|
4
4
|
} from '../../clients/createTestClient.js'
|
5
5
|
import type { Transport } from '../../clients/transports/createTransport.js'
|
6
6
|
import type { Chain } from '../../types/chain.js'
|
7
|
+
import type { Formatter } from '../../types/formatter.js'
|
7
8
|
import type { Hash } from '../../types/misc.js'
|
8
9
|
import type { TransactionRequest } from '../../types/transaction.js'
|
9
|
-
import {
|
10
|
+
import type { MergeIntersectionProperties } from '../../types/utils.js'
|
11
|
+
import { extract } from '../../utils/formatters/extract.js'
|
12
|
+
import { type Formatted, format } from '../../utils/formatters/format.js'
|
13
|
+
import {
|
14
|
+
type TransactionRequestFormatter,
|
15
|
+
formatTransactionRequest,
|
16
|
+
} from '../../utils/formatters/transactionRequest.js'
|
10
17
|
|
11
|
-
|
18
|
+
type FormattedTransactionRequest<
|
19
|
+
TFormatter extends Formatter | undefined = Formatter,
|
20
|
+
> = MergeIntersectionProperties<
|
21
|
+
Formatted<TFormatter, TransactionRequest, true>,
|
22
|
+
TransactionRequest
|
23
|
+
>
|
24
|
+
|
25
|
+
export type SendUnsignedTransactionParameters<
|
26
|
+
TChain extends Chain | undefined = Chain | undefined,
|
27
|
+
> = FormattedTransactionRequest<TransactionRequestFormatter<TChain>>
|
12
28
|
|
13
29
|
export type SendUnsignedTransactionReturnType = Hash
|
14
30
|
|
@@ -41,12 +57,45 @@ export async function sendUnsignedTransaction<
|
|
41
57
|
TChain extends Chain | undefined,
|
42
58
|
>(
|
43
59
|
client: TestClient<TestClientMode, Transport, TChain>,
|
44
|
-
|
60
|
+
args: SendUnsignedTransactionParameters<TChain>,
|
45
61
|
): Promise<SendUnsignedTransactionReturnType> {
|
46
|
-
const
|
62
|
+
const {
|
63
|
+
accessList,
|
64
|
+
data,
|
65
|
+
from,
|
66
|
+
gas,
|
67
|
+
gasPrice,
|
68
|
+
maxFeePerGas,
|
69
|
+
maxPriorityFeePerGas,
|
70
|
+
nonce,
|
71
|
+
to,
|
72
|
+
value,
|
73
|
+
...rest
|
74
|
+
} = args
|
75
|
+
|
76
|
+
const formatter = client.chain?.formatters?.transactionRequest
|
77
|
+
const request = format(
|
78
|
+
{
|
79
|
+
accessList,
|
80
|
+
data,
|
81
|
+
from,
|
82
|
+
gas,
|
83
|
+
gasPrice,
|
84
|
+
maxFeePerGas,
|
85
|
+
maxPriorityFeePerGas,
|
86
|
+
nonce,
|
87
|
+
to,
|
88
|
+
value,
|
89
|
+
// Pick out extra data that might exist on the chain's transaction request type.
|
90
|
+
...extract(rest, { formatter }),
|
91
|
+
} as TransactionRequest,
|
92
|
+
{
|
93
|
+
formatter: formatter || formatTransactionRequest,
|
94
|
+
},
|
95
|
+
)
|
47
96
|
const hash = await client.request({
|
48
97
|
method: 'eth_sendUnsignedTransaction',
|
49
|
-
params: [
|
98
|
+
params: [request],
|
50
99
|
})
|
51
100
|
return hash
|
52
101
|
}
|
@@ -28,8 +28,12 @@ export async function setAutomine<TChain extends Chain | undefined>(
|
|
28
28
|
client: TestClient<TestClientMode, Transport, TChain>,
|
29
29
|
enabled: boolean,
|
30
30
|
) {
|
31
|
-
|
32
|
-
method: '
|
33
|
-
|
34
|
-
}
|
31
|
+
if (client.mode === 'ganache') {
|
32
|
+
if (enabled) await client.request({ method: 'miner_start' })
|
33
|
+
else await client.request({ method: 'miner_stop' })
|
34
|
+
} else
|
35
|
+
await client.request({
|
36
|
+
method: 'evm_setAutomine',
|
37
|
+
params: [enabled],
|
38
|
+
})
|
35
39
|
}
|
@@ -42,8 +42,14 @@ export async function setBalance<TChain extends Chain | undefined>(
|
|
42
42
|
client: TestClient<TestClientMode, Transport, TChain>,
|
43
43
|
{ address, value }: SetBalanceParameters,
|
44
44
|
) {
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
45
|
+
if (client.mode === 'ganache')
|
46
|
+
await client.request({
|
47
|
+
method: 'evm_setAccountBalance',
|
48
|
+
params: [address, numberToHex(value)],
|
49
|
+
})
|
50
|
+
else
|
51
|
+
await client.request({
|
52
|
+
method: `${client.mode}_setBalance`,
|
53
|
+
params: [address, numberToHex(value)],
|
54
|
+
})
|
49
55
|
}
|
@@ -11,7 +11,7 @@ export type SetBlockTimestampIntervalParameters = {
|
|
11
11
|
}
|
12
12
|
|
13
13
|
/**
|
14
|
-
* Similar to [`increaseTime`](https://viem.sh/docs/actions/test/increaseTime), but sets a block timestamp `interval`. The timestamp of future blocks will be computed as `lastBlock_timestamp` + `interval`.
|
14
|
+
* Similar to [`increaseTime`](https://viem.sh/docs/actions/test/increaseTime.html), but sets a block timestamp `interval`. The timestamp of future blocks will be computed as `lastBlock_timestamp` + `interval`.
|
15
15
|
*
|
16
16
|
* - Docs: https://viem.sh/docs/actions/test/setBlockTimestampInterval.html
|
17
17
|
*
|
@@ -13,7 +13,7 @@ export type StopImpersonatingAccountParameters = {
|
|
13
13
|
}
|
14
14
|
|
15
15
|
/**
|
16
|
-
* Stop impersonating an account after having previously used [`impersonateAccount`](https://viem.sh/docs/actions/test/impersonateAccount).
|
16
|
+
* Stop impersonating an account after having previously used [`impersonateAccount`](https://viem.sh/docs/actions/test/impersonateAccount.html).
|
17
17
|
*
|
18
18
|
* - Docs: https://viem.sh/docs/actions/test/stopImpersonatingAccount.html
|
19
19
|
*
|
@@ -38,7 +38,7 @@ export type DeployContractReturnType = SendTransactionReturnType
|
|
38
38
|
*
|
39
39
|
* @param client - Client to use
|
40
40
|
* @param parameters - {@link DeployContractParameters}
|
41
|
-
* @returns The [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. {@link DeployContractReturnType}
|
41
|
+
* @returns The [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) hash. {@link DeployContractReturnType}
|
42
42
|
*
|
43
43
|
* @example
|
44
44
|
* import { createWalletClient, http } from 'viem'
|
@@ -147,8 +147,8 @@ export async function sendTransaction<
|
|
147
147
|
|
148
148
|
if (!chainId) chainId = await getChainId(client)
|
149
149
|
const signedRequest = (await account.signTransaction({
|
150
|
-
chainId,
|
151
150
|
...request,
|
151
|
+
chainId,
|
152
152
|
} as TransactionSerializable)) as Hash
|
153
153
|
return await client.request({
|
154
154
|
method: 'eth_sendRawTransaction',
|
@@ -5,13 +5,13 @@ import type { Transport } from '../../clients/transports/createTransport.js'
|
|
5
5
|
import { AccountNotFoundError } from '../../errors/account.js'
|
6
6
|
import type { GetAccountParameter } from '../../types/account.js'
|
7
7
|
import type { Chain } from '../../types/chain.js'
|
8
|
-
import type { Hex } from '../../types/misc.js'
|
9
|
-
import { toHex } from '../../utils/encoding/toHex.js'
|
8
|
+
import type { Hex, SignableMessage } from '../../types/misc.js'
|
9
|
+
import { stringToHex, toHex } from '../../utils/encoding/toHex.js'
|
10
10
|
|
11
11
|
export type SignMessageParameters<
|
12
12
|
TAccount extends Account | undefined = Account | undefined,
|
13
13
|
> = GetAccountParameter<TAccount> & {
|
14
|
-
message:
|
14
|
+
message: SignableMessage
|
15
15
|
}
|
16
16
|
|
17
17
|
export type SignMessageReturnType = Hex
|
@@ -25,8 +25,8 @@ export type SignMessageReturnType = Hex
|
|
25
25
|
* - Local Accounts: Signs locally. No JSON-RPC request.
|
26
26
|
*
|
27
27
|
* With the calculated signature, you can:
|
28
|
-
* - use [`verifyMessage`](https://viem.sh/docs/utilities/verifyMessage) to verify the signature,
|
29
|
-
* - use [`recoverMessageAddress`](https://viem.sh/docs/utilities/recoverMessageAddress) to recover the signing address from a signature.
|
28
|
+
* - use [`verifyMessage`](https://viem.sh/docs/utilities/verifyMessage.html) to verify the signature,
|
29
|
+
* - use [`recoverMessageAddress`](https://viem.sh/docs/utilities/recoverMessageAddress.html) to recover the signing address from a signature.
|
30
30
|
*
|
31
31
|
* @param client - Client to use
|
32
32
|
* @param parameters - {@link SignMessageParameters}
|
@@ -78,8 +78,15 @@ export async function signMessage<
|
|
78
78
|
})
|
79
79
|
const account = parseAccount(account_)
|
80
80
|
if (account.type === 'local') return account.signMessage({ message })
|
81
|
+
|
82
|
+
const message_ = (() => {
|
83
|
+
if (typeof message === 'string') return stringToHex(message)
|
84
|
+
if (message.raw instanceof Uint8Array) return toHex(message.raw)
|
85
|
+
return message.raw
|
86
|
+
})()
|
87
|
+
|
81
88
|
return client.request({
|
82
89
|
method: 'personal_sign',
|
83
|
-
params: [
|
90
|
+
params: [message_, account.address],
|
84
91
|
})
|
85
92
|
}
|
@@ -14,8 +14,8 @@ import { stringify } from '../../utils/stringify.js'
|
|
14
14
|
import { validateTypedData } from '../../utils/typedData.js'
|
15
15
|
|
16
16
|
export type SignTypedDataParameters<
|
17
|
-
TTypedData extends TypedData |
|
18
|
-
TPrimaryType extends
|
17
|
+
TTypedData extends TypedData | Record<string, unknown> = TypedData,
|
18
|
+
TPrimaryType extends keyof TTypedData = keyof TTypedData,
|
19
19
|
TAccount extends Account | undefined = undefined,
|
20
20
|
> = GetAccountParameter<TAccount> &
|
21
21
|
TypedDataDefinition<TTypedData, TPrimaryType>
|
@@ -23,7 +23,7 @@ export type SignTypedDataParameters<
|
|
23
23
|
export type SignTypedDataReturnType = Hex
|
24
24
|
|
25
25
|
/**
|
26
|
-
* Signs typed data and calculates an Ethereum-specific signature in [
|
26
|
+
* Signs typed data and calculates an Ethereum-specific signature in [https://eips.ethereum.org/EIPS/eip-712](https://eips.ethereum.org/EIPS/eip-712): `sign(keccak256("\x19\x01" ‖ domainSeparator ‖ hashStruct(message)))`
|
27
27
|
*
|
28
28
|
* - Docs: https://viem.sh/docs/actions/wallet/signTypedData.html
|
29
29
|
* - JSON-RPC Methods:
|
@@ -121,8 +121,8 @@ export type SignTypedDataReturnType = Hex
|
|
121
121
|
* })
|
122
122
|
*/
|
123
123
|
export async function signTypedData<
|
124
|
-
TTypedData extends TypedData |
|
125
|
-
TPrimaryType extends
|
124
|
+
const TTypedData extends TypedData | Record<string, unknown>, // `Record<string, unknown>` allows for non-const asserted types
|
125
|
+
TPrimaryType extends keyof TTypedData,
|
126
126
|
TChain extends Chain | undefined,
|
127
127
|
TAccount extends Account | undefined,
|
128
128
|
>(
|
@@ -42,15 +42,15 @@ export type WriteContractReturnType = SendTransactionReturnType
|
|
42
42
|
* - Docs: https://viem.sh/docs/contract/writeContract.html
|
43
43
|
* - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/contracts/writing-to-contracts
|
44
44
|
*
|
45
|
-
* A "write" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a [Transaction](https://viem.sh/docs/glossary/terms) is needed to be broadcast in order to change the state.
|
45
|
+
* A "write" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a [Transaction](https://viem.sh/docs/glossary/terms.html) is needed to be broadcast in order to change the state.
|
46
46
|
*
|
47
|
-
* Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData).
|
47
|
+
* Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet.html) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction.html) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData.html).
|
48
48
|
*
|
49
49
|
* __Warning: The `write` internally sends a transaction – it does not validate if the contract write will succeed (the contract may throw an error). It is highly recommended to [simulate the contract write with `contract.simulate`](https://viem.sh/docs/contract/writeContract.html#usage) before you execute it.__
|
50
50
|
*
|
51
51
|
* @param client - Client to use
|
52
52
|
* @param parameters - {@link WriteContractParameters}
|
53
|
-
* @returns A [Transaction Hash](https://viem.sh/docs/glossary/terms#hash). {@link WriteContractReturnType}
|
53
|
+
* @returns A [Transaction Hash](https://viem.sh/docs/glossary/terms.html#hash). {@link WriteContractReturnType}
|
54
54
|
*
|
55
55
|
* @example
|
56
56
|
* import { createWalletClient, custom, parseAbi } from 'viem'
|
package/src/chains.ts
CHANGED
@@ -11,7 +11,7 @@ import { defineTransactionReceipt } from './utils/formatters/transactionReceipt.
|
|
11
11
|
import { defineTransactionRequest } from './utils/formatters/transactionRequest.js'
|
12
12
|
|
13
13
|
const celoFormatters = {
|
14
|
-
block: defineBlock({
|
14
|
+
block: /*#__PURE__*/ defineBlock({
|
15
15
|
exclude: ['difficulty', 'gasLimit', 'mixHash', 'nonce', 'uncles'],
|
16
16
|
format: (block) => ({
|
17
17
|
randomness: block.randomness as {
|
@@ -20,7 +20,7 @@ const celoFormatters = {
|
|
20
20
|
},
|
21
21
|
}),
|
22
22
|
}),
|
23
|
-
transaction: defineTransaction({
|
23
|
+
transaction: /*#__PURE__*/ defineTransaction({
|
24
24
|
format: (transaction) => ({
|
25
25
|
feeCurrency: transaction.feeCurrency as Address | null,
|
26
26
|
gatewayFee: transaction.gatewayFee
|
@@ -29,7 +29,7 @@ const celoFormatters = {
|
|
29
29
|
gatewayFeeRecipient: transaction.gatewayFeeRecipient as Address | null,
|
30
30
|
}),
|
31
31
|
}),
|
32
|
-
transactionReceipt: defineTransactionReceipt({
|
32
|
+
transactionReceipt: /*#__PURE__*/ defineTransactionReceipt({
|
33
33
|
format: (transaction) => ({
|
34
34
|
feeCurrency: transaction.feeCurrency as Address | null,
|
35
35
|
gatewayFee: transaction.gatewayFee
|
@@ -38,7 +38,7 @@ const celoFormatters = {
|
|
38
38
|
gatewayFeeRecipient: transaction.gatewayFeeRecipient as Address | null,
|
39
39
|
}),
|
40
40
|
}),
|
41
|
-
transactionRequest: defineTransactionRequest({
|
41
|
+
transactionRequest: /*#__PURE__*/ defineTransactionRequest({
|
42
42
|
format: (transactionRequest) => ({
|
43
43
|
feeCurrency: transactionRequest.feeCurrency as Address | undefined,
|
44
44
|
gatewayFee: transactionRequest.gatewayFee as Quantity | undefined,
|
@@ -48,95 +48,130 @@ const celoFormatters = {
|
|
48
48
|
}),
|
49
49
|
}),
|
50
50
|
}
|
51
|
-
|
52
|
-
export const
|
53
|
-
export const
|
54
|
-
export const
|
55
|
-
export const
|
56
|
-
export const
|
57
|
-
export const
|
58
|
-
export const
|
59
|
-
export const
|
60
|
-
export const
|
61
|
-
export const
|
62
|
-
export const
|
63
|
-
export const
|
64
|
-
export const
|
65
|
-
export const celo = defineChain({
|
51
|
+
export const arbitrum = /*#__PURE__*/ defineChain(chains.arbitrum)
|
52
|
+
export const arbitrumGoerli = /*#__PURE__*/ defineChain(chains.arbitrumGoerli)
|
53
|
+
export const aurora = /*#__PURE__*/ defineChain(chains.aurora)
|
54
|
+
export const auroraTestnet = /*#__PURE__*/ defineChain(chains.auroraTestnet)
|
55
|
+
export const avalanche = /*#__PURE__*/ defineChain(chains.avalanche)
|
56
|
+
export const avalancheFuji = /*#__PURE__*/ defineChain(chains.avalancheFuji)
|
57
|
+
export const baseGoerli = /*#__PURE__*/ defineChain(chains.baseGoerli)
|
58
|
+
export const boba = /*#__PURE__*/ defineChain(chains.boba)
|
59
|
+
export const bronos = /*#__PURE__*/ defineChain(chains.bronos)
|
60
|
+
export const bronosTestnet = /*#__PURE__*/ defineChain(chains.bronosTestnet)
|
61
|
+
export const bsc = /*#__PURE__*/ defineChain(chains.bsc)
|
62
|
+
export const bscTestnet = /*#__PURE__*/ defineChain(chains.bscTestnet)
|
63
|
+
export const canto = /*#__PURE__*/ defineChain(chains.canto)
|
64
|
+
export const celo = /*#__PURE__*/ defineChain({
|
66
65
|
...chains.celo,
|
67
66
|
formatters: celoFormatters,
|
68
67
|
})
|
69
|
-
export const celoAlfajores = defineChain({
|
68
|
+
export const celoAlfajores = /*#__PURE__*/ defineChain({
|
70
69
|
...chains.celoAlfajores,
|
71
70
|
formatters: celoFormatters,
|
72
71
|
})
|
73
|
-
export const
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
export const
|
78
|
-
export const
|
79
|
-
export const
|
80
|
-
export const
|
81
|
-
export const
|
82
|
-
export const
|
83
|
-
export const
|
84
|
-
export const
|
85
|
-
export const
|
86
|
-
export const
|
87
|
-
|
88
|
-
|
89
|
-
export const
|
90
|
-
|
91
|
-
|
92
|
-
export const
|
93
|
-
export const
|
94
|
-
export const
|
95
|
-
export const
|
96
|
-
export const
|
97
|
-
export const
|
98
|
-
export const
|
99
|
-
export const
|
100
|
-
export const
|
101
|
-
export const
|
102
|
-
export const
|
103
|
-
export const
|
104
|
-
export const
|
105
|
-
export const
|
106
|
-
export const
|
107
|
-
export const
|
108
|
-
export const
|
109
|
-
export const
|
110
|
-
export const
|
111
|
-
export const
|
112
|
-
export const
|
113
|
-
export const
|
114
|
-
export const
|
115
|
-
export const
|
116
|
-
export const
|
117
|
-
export const
|
118
|
-
export const
|
119
|
-
export const
|
120
|
-
export const
|
121
|
-
|
122
|
-
|
123
|
-
export const
|
124
|
-
export const
|
125
|
-
export const
|
126
|
-
export const
|
127
|
-
export const
|
128
|
-
|
129
|
-
|
130
|
-
export const
|
131
|
-
export const
|
132
|
-
|
133
|
-
|
134
|
-
export const
|
135
|
-
|
136
|
-
|
137
|
-
export const
|
138
|
-
|
139
|
-
|
140
|
-
export const
|
72
|
+
export const celoCannoli = /*#__PURE__*/ defineChain({
|
73
|
+
...chains.celoCannoli,
|
74
|
+
formatters: celoFormatters,
|
75
|
+
})
|
76
|
+
export const cronos = /*#__PURE__*/ defineChain(chains.cronos)
|
77
|
+
export const crossbell = /*#__PURE__*/ defineChain(chains.crossbell)
|
78
|
+
export const dfk = /*#__PURE__*/ defineChain(chains.dfk)
|
79
|
+
export const dogechain = /*#__PURE__*/ defineChain(chains.dogechain)
|
80
|
+
export const evmos = /*#__PURE__*/ defineChain(chains.evmos)
|
81
|
+
export const evmosTestnet = /*#__PURE__*/ defineChain(chains.evmosTestnet)
|
82
|
+
export const fantom = /*#__PURE__*/ defineChain(chains.fantom)
|
83
|
+
export const fantomTestnet = /*#__PURE__*/ defineChain(chains.fantomTestnet)
|
84
|
+
export const filecoin = /*#__PURE__*/ defineChain(chains.filecoin)
|
85
|
+
export const filecoinCalibration = /*#__PURE__*/ defineChain(
|
86
|
+
chains.filecoinCalibration,
|
87
|
+
)
|
88
|
+
export const filecoinHyperspace = /*#__PURE__*/ defineChain(
|
89
|
+
chains.filecoinHyperspace,
|
90
|
+
)
|
91
|
+
export const flare = /*#__PURE__*/ defineChain(chains.flare)
|
92
|
+
export const flareTestnet = /*#__PURE__*/ defineChain(chains.flareTestnet)
|
93
|
+
export const foundry = /*#__PURE__*/ defineChain(chains.foundry)
|
94
|
+
export const iotex = /*#__PURE__*/ defineChain(chains.iotex)
|
95
|
+
export const iotexTestnet = /*#__PURE__*/ defineChain(chains.iotexTestnet)
|
96
|
+
export const goerli = /*#__PURE__*/ defineChain(chains.goerli)
|
97
|
+
export const gnosis = /*#__PURE__*/ defineChain(chains.gnosis)
|
98
|
+
export const gnosisChiado = /*#__PURE__*/ defineChain(chains.gnosisChiado)
|
99
|
+
export const haqqMainnet = /*#__PURE__*/ defineChain(chains.haqqMainnet)
|
100
|
+
export const haqqTestedge2 = /*#__PURE__*/ defineChain(chains.haqqTestedge2)
|
101
|
+
export const hardhat = /*#__PURE__*/ defineChain(chains.hardhat)
|
102
|
+
export const harmonyOne = /*#__PURE__*/ defineChain(chains.harmonyOne)
|
103
|
+
export const klaytn = /*#__PURE__*/ defineChain(chains.klaytn)
|
104
|
+
export const lineaTestnet = /*#__PURE__*/ defineChain(chains.lineaTestnet)
|
105
|
+
export const localhost = /*#__PURE__*/ defineChain(chains.localhost)
|
106
|
+
export const mainnet = /*#__PURE__*/ defineChain(chains.mainnet)
|
107
|
+
export const metis = /*#__PURE__*/ defineChain(chains.metis)
|
108
|
+
export const metisGoerli = /*#__PURE__*/ defineChain(chains.metisGoerli)
|
109
|
+
export const moonbaseAlpha = /*#__PURE__*/ defineChain(chains.moonbaseAlpha)
|
110
|
+
export const moonbeam = /*#__PURE__*/ defineChain(chains.moonbeam)
|
111
|
+
export const moonriver = /*#__PURE__*/ defineChain(chains.moonriver)
|
112
|
+
export const nexi = /*#__PURE__*/ defineChain(chains.nexi)
|
113
|
+
export const okc = /*#__PURE__*/ defineChain(chains.okc)
|
114
|
+
export const optimism = /*#__PURE__*/ defineChain(chains.optimism)
|
115
|
+
export const optimismGoerli = /*#__PURE__*/ defineChain(chains.optimismGoerli)
|
116
|
+
export const polygon = /*#__PURE__*/ defineChain(chains.polygon)
|
117
|
+
export const polygonMumbai = /*#__PURE__*/ defineChain(chains.polygonMumbai)
|
118
|
+
export const polygonZkEvm = /*#__PURE__*/ defineChain(chains.polygonZkEvm)
|
119
|
+
export const polygonZkEvmTestnet = /*#__PURE__*/ defineChain(
|
120
|
+
chains.polygonZkEvmTestnet,
|
121
|
+
)
|
122
|
+
export const pulsechain = /*#__PURE__*/ defineChain(chains.pulsechain)
|
123
|
+
export const pulsechainV4 = /*#__PURE__*/ defineChain(chains.pulsechainV4)
|
124
|
+
export const scrollTestnet = /*#__PURE__*/ defineChain(chains.scrollTestnet)
|
125
|
+
export const sepolia = /*#__PURE__*/ defineChain(chains.sepolia)
|
126
|
+
export const skaleBlockBrawlers = /*#__PURE__*/ defineChain(
|
127
|
+
chains.skaleBlockBrawlers,
|
128
|
+
)
|
129
|
+
export const skaleCalypso = /*#__PURE__*/ defineChain(chains.skaleCalypso)
|
130
|
+
export const skaleCalypsoTestnet = /*#__PURE__*/ defineChain(
|
131
|
+
chains.skaleCalypsoTestnet,
|
132
|
+
)
|
133
|
+
export const skaleChaosTestnet = /*#__PURE__*/ defineChain(
|
134
|
+
chains.skaleChaosTestnet,
|
135
|
+
)
|
136
|
+
export const skaleCryptoBlades = /*#__PURE__*/ defineChain(
|
137
|
+
chains.skaleCryptoBlades,
|
138
|
+
)
|
139
|
+
export const skaleCryptoColosseum = /*#__PURE__*/ defineChain(
|
140
|
+
chains.skaleCryptoColosseum,
|
141
|
+
)
|
142
|
+
export const skaleEuropa = /*#__PURE__*/ defineChain(chains.skaleEuropa)
|
143
|
+
export const skaleEuropaTestnet = /*#__PURE__*/ defineChain(
|
144
|
+
chains.skaleEuropaTestnet,
|
145
|
+
)
|
146
|
+
export const skaleExorde = /*#__PURE__*/ defineChain(chains.skaleExorde)
|
147
|
+
export const skaleHumanProtocol = /*#__PURE__*/ defineChain(
|
148
|
+
chains.skaleHumanProtocol,
|
149
|
+
)
|
150
|
+
export const skaleNebula = /*#__PURE__*/ defineChain(chains.skaleNebula)
|
151
|
+
export const skaleNebulaTestnet = /*#__PURE__*/ defineChain(
|
152
|
+
chains.skaleNebulaTestnet,
|
153
|
+
)
|
154
|
+
export const skaleRazor = /*#__PURE__*/ defineChain(chains.skaleRazor)
|
155
|
+
export const skaleTitan = /*#__PURE__*/ defineChain(chains.skaleTitan)
|
156
|
+
export const skaleTitanTestnet = /*#__PURE__*/ defineChain(
|
157
|
+
chains.skaleTitanTestnet,
|
158
|
+
)
|
159
|
+
export const songbird = /*#__PURE__*/ defineChain(chains.songbird)
|
160
|
+
export const songbirdTestnet = /*#__PURE__*/ defineChain(chains.songbirdTestnet)
|
161
|
+
export const shardeumSphinx = /*#__PURE__*/ defineChain(chains.shardeumSphinx)
|
162
|
+
export const syscoin = /*#__PURE__*/ defineChain(chains.syscoin)
|
163
|
+
export const taraxa = /*#__PURE__*/ defineChain(chains.taraxa)
|
164
|
+
export const taraxaTestnet = /*#__PURE__*/ defineChain(chains.taraxaTestnet)
|
165
|
+
export const telos = /*#__PURE__*/ defineChain(chains.telos)
|
166
|
+
export const telosTestnet = /*#__PURE__*/ defineChain(chains.telosTestnet)
|
167
|
+
export const thunderTestnet = /*#__PURE__*/ defineChain(chains.thunderTestnet)
|
168
|
+
export const wanchain = /*#__PURE__*/ defineChain(chains.wanchain)
|
169
|
+
export const wanchainTestnet = /*#__PURE__*/ defineChain(chains.wanchainTestnet)
|
170
|
+
export const xdc = /*#__PURE__*/ defineChain(chains.xdc)
|
171
|
+
export const xdcTestnet = /*#__PURE__*/ defineChain(chains.xdcTestnet)
|
172
|
+
export const zhejiang = /*#__PURE__*/ defineChain(chains.zhejiang)
|
173
|
+
export const zkSync = /*#__PURE__*/ defineChain(chains.zkSync)
|
174
|
+
export const zkSyncTestnet = /*#__PURE__*/ defineChain(chains.zkSyncTestnet)
|
175
|
+
export const zoraTestnet = /*#__PURE__*/ defineChain(chains.zoraTestnet)
|
141
176
|
|
142
177
|
export type { Chain } from './types/chain.js'
|