viem 1.6.6 → 1.6.7
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/chains/dist/cjs/celo/formatters.js +58 -0
- package/chains/dist/cjs/celo/parsers.js +72 -0
- package/chains/dist/cjs/celo/serializers.js +75 -0
- package/chains/dist/cjs/celo/types.js +3 -0
- package/chains/dist/cjs/index.js +135 -0
- package/chains/dist/cjs/optimism/fees.js +7 -0
- package/chains/dist/cjs/optimism/formatters.js +52 -0
- package/chains/dist/cjs/optimism/types.js +3 -0
- package/chains/dist/cjs/types.js +3 -0
- package/chains/dist/cjs/utils.js +49 -0
- package/chains/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/cjs/errors/version.js +1 -1
- package/dist/esm/errors/version.js +1 -1
- package/dist/types/abi.d.ts +6 -0
- package/dist/types/abi.d.ts.map +1 -0
- package/dist/types/accounts/generateMnemonic.d.ts +9 -0
- package/dist/types/accounts/generateMnemonic.d.ts.map +1 -0
- package/dist/types/accounts/generatePrivateKey.d.ts +8 -0
- package/dist/types/accounts/generatePrivateKey.d.ts.map +1 -0
- package/dist/types/accounts/hdKeyToAccount.d.ts +9 -0
- package/dist/types/accounts/hdKeyToAccount.d.ts.map +1 -0
- package/dist/types/accounts/index.d.ts +27 -0
- package/dist/types/accounts/index.d.ts.map +1 -0
- package/dist/types/accounts/mnemonicToAccount.d.ts +8 -0
- package/dist/types/accounts/mnemonicToAccount.d.ts.map +1 -0
- package/dist/types/accounts/privateKeyToAccount.d.ts +9 -0
- package/dist/types/accounts/privateKeyToAccount.d.ts.map +1 -0
- package/dist/types/accounts/toAccount.d.ts +11 -0
- package/dist/types/accounts/toAccount.d.ts.map +1 -0
- package/dist/types/accounts/types.d.ts +52 -0
- package/dist/types/accounts/types.d.ts.map +1 -0
- package/dist/types/accounts/utils/parseAccount.d.ts +4 -0
- package/dist/types/accounts/utils/parseAccount.d.ts.map +1 -0
- package/dist/types/accounts/utils/privateKeyToAddress.d.ts +11 -0
- package/dist/types/accounts/utils/privateKeyToAddress.d.ts.map +1 -0
- package/dist/types/accounts/utils/publicKeyToAddress.d.ts +11 -0
- package/dist/types/accounts/utils/publicKeyToAddress.d.ts.map +1 -0
- package/dist/types/accounts/utils/sign.d.ts +16 -0
- package/dist/types/accounts/utils/sign.d.ts.map +1 -0
- package/dist/types/accounts/utils/signMessage.d.ts +16 -0
- package/dist/types/accounts/utils/signMessage.d.ts.map +1 -0
- package/dist/types/accounts/utils/signTransaction.d.ts +12 -0
- package/dist/types/accounts/utils/signTransaction.d.ts.map +1 -0
- package/dist/types/accounts/utils/signTypedData.d.ts +20 -0
- package/dist/types/accounts/utils/signTypedData.d.ts.map +1 -0
- package/dist/types/accounts/wordlists/czech.d.ts +2 -0
- package/dist/types/accounts/wordlists/czech.d.ts.map +1 -0
- package/dist/types/accounts/wordlists/english.d.ts +2 -0
- package/dist/types/accounts/wordlists/english.d.ts.map +1 -0
- package/dist/types/accounts/wordlists/french.d.ts +2 -0
- package/dist/types/accounts/wordlists/french.d.ts.map +1 -0
- package/dist/types/accounts/wordlists/italian.d.ts +2 -0
- package/dist/types/accounts/wordlists/italian.d.ts.map +1 -0
- package/dist/types/accounts/wordlists/japanese.d.ts +2 -0
- package/dist/types/accounts/wordlists/japanese.d.ts.map +1 -0
- package/dist/types/accounts/wordlists/korean.d.ts +2 -0
- package/dist/types/accounts/wordlists/korean.d.ts.map +1 -0
- package/dist/types/accounts/wordlists/simplifiedChinese.d.ts +2 -0
- package/dist/types/accounts/wordlists/simplifiedChinese.d.ts.map +1 -0
- package/dist/types/accounts/wordlists/spanish.d.ts +2 -0
- package/dist/types/accounts/wordlists/spanish.d.ts.map +1 -0
- package/dist/types/accounts/wordlists/traditionalChinese.d.ts +2 -0
- package/dist/types/accounts/wordlists/traditionalChinese.d.ts.map +1 -0
- package/dist/types/actions/ens/getEnsAddress.d.ts +45 -0
- package/dist/types/actions/ens/getEnsAddress.d.ts.map +1 -0
- package/dist/types/actions/ens/getEnsAvatar.d.ts +41 -0
- package/dist/types/actions/ens/getEnsAvatar.d.ts.map +1 -0
- package/dist/types/actions/ens/getEnsName.d.ts +41 -0
- package/dist/types/actions/ens/getEnsName.d.ts.map +1 -0
- package/dist/types/actions/ens/getEnsResolver.d.ts +43 -0
- package/dist/types/actions/ens/getEnsResolver.d.ts.map +1 -0
- package/dist/types/actions/ens/getEnsText.d.ts +46 -0
- package/dist/types/actions/ens/getEnsText.d.ts.map +1 -0
- package/dist/types/actions/getContract.d.ts +314 -0
- package/dist/types/actions/getContract.d.ts.map +1 -0
- package/dist/types/actions/index.d.ts +80 -0
- package/dist/types/actions/index.d.ts.map +1 -0
- package/dist/types/actions/public/call.d.ts +56 -0
- package/dist/types/actions/public/call.d.ts.map +1 -0
- package/dist/types/actions/public/createBlockFilter.d.ts +28 -0
- package/dist/types/actions/public/createBlockFilter.d.ts.map +1 -0
- package/dist/types/actions/public/createContractEventFilter.d.ts +50 -0
- package/dist/types/actions/public/createContractEventFilter.d.ts.map +1 -0
- package/dist/types/actions/public/createEventFilter.d.ts +76 -0
- package/dist/types/actions/public/createEventFilter.d.ts.map +1 -0
- package/dist/types/actions/public/createPendingTransactionFilter.d.ts +28 -0
- package/dist/types/actions/public/createPendingTransactionFilter.d.ts.map +1 -0
- package/dist/types/actions/public/estimateContractGas.d.ts +39 -0
- package/dist/types/actions/public/estimateContractGas.d.ts.map +1 -0
- package/dist/types/actions/public/estimateGas.d.ts +49 -0
- package/dist/types/actions/public/estimateGas.d.ts.map +1 -0
- package/dist/types/actions/public/getBalance.d.ts +55 -0
- package/dist/types/actions/public/getBalance.d.ts.map +1 -0
- package/dist/types/actions/public/getBlock.d.ts +56 -0
- package/dist/types/actions/public/getBlock.d.ts.map +1 -0
- package/dist/types/actions/public/getBlockNumber.d.ts +57 -0
- package/dist/types/actions/public/getBlockNumber.d.ts.map +1 -0
- package/dist/types/actions/public/getBlockTransactionCount.d.ts +47 -0
- package/dist/types/actions/public/getBlockTransactionCount.d.ts.map +1 -0
- package/dist/types/actions/public/getBytecode.d.ts +41 -0
- package/dist/types/actions/public/getBytecode.d.ts.map +1 -0
- package/dist/types/actions/public/getChainId.d.ts +28 -0
- package/dist/types/actions/public/getChainId.d.ts.map +1 -0
- package/dist/types/actions/public/getFeeHistory.d.ts +53 -0
- package/dist/types/actions/public/getFeeHistory.d.ts.map +1 -0
- package/dist/types/actions/public/getFilterChanges.d.ts +96 -0
- package/dist/types/actions/public/getFilterChanges.d.ts.map +1 -0
- package/dist/types/actions/public/getFilterLogs.d.ts +40 -0
- package/dist/types/actions/public/getFilterLogs.d.ts.map +1 -0
- package/dist/types/actions/public/getGasPrice.d.ts +27 -0
- package/dist/types/actions/public/getGasPrice.d.ts.map +1 -0
- package/dist/types/actions/public/getLogs.d.ts +71 -0
- package/dist/types/actions/public/getLogs.d.ts.map +1 -0
- package/dist/types/actions/public/getStorageAt.d.ts +43 -0
- package/dist/types/actions/public/getStorageAt.d.ts.map +1 -0
- package/dist/types/actions/public/getTransaction.d.ts +65 -0
- package/dist/types/actions/public/getTransaction.d.ts.map +1 -0
- package/dist/types/actions/public/getTransactionConfirmations.d.ts +41 -0
- package/dist/types/actions/public/getTransactionConfirmations.d.ts.map +1 -0
- package/dist/types/actions/public/getTransactionCount.d.ts +44 -0
- package/dist/types/actions/public/getTransactionCount.d.ts.map +1 -0
- package/dist/types/actions/public/getTransactionReceipt.d.ts +36 -0
- package/dist/types/actions/public/getTransactionReceipt.d.ts.map +1 -0
- package/dist/types/actions/public/multicall.d.ts +56 -0
- package/dist/types/actions/public/multicall.d.ts.map +1 -0
- package/dist/types/actions/public/readContract.d.ts +41 -0
- package/dist/types/actions/public/readContract.d.ts.map +1 -0
- package/dist/types/actions/public/simulateContract.d.ts +54 -0
- package/dist/types/actions/public/simulateContract.d.ts.map +1 -0
- package/dist/types/actions/public/uninstallFilter.d.ts +34 -0
- package/dist/types/actions/public/uninstallFilter.d.ts.map +1 -0
- package/dist/types/actions/public/verifyHash.d.ts +24 -0
- package/dist/types/actions/public/verifyHash.d.ts.map +1 -0
- package/dist/types/actions/public/verifyMessage.d.ts +28 -0
- package/dist/types/actions/public/verifyMessage.d.ts.map +1 -0
- package/dist/types/actions/public/verifyTypedData.d.ts +27 -0
- package/dist/types/actions/public/verifyTypedData.d.ts.map +1 -0
- package/dist/types/actions/public/waitForTransactionReceipt.d.ts +72 -0
- package/dist/types/actions/public/waitForTransactionReceipt.d.ts.map +1 -0
- package/dist/types/actions/public/watchBlockNumber.d.ts +59 -0
- package/dist/types/actions/public/watchBlockNumber.d.ts.map +1 -0
- package/dist/types/actions/public/watchBlocks.d.ts +67 -0
- package/dist/types/actions/public/watchBlocks.d.ts.map +1 -0
- package/dist/types/actions/public/watchContractEvent.d.ts +89 -0
- package/dist/types/actions/public/watchContractEvent.d.ts.map +1 -0
- package/dist/types/actions/public/watchEvent.d.ts +104 -0
- package/dist/types/actions/public/watchEvent.d.ts.map +1 -0
- package/dist/types/actions/public/watchPendingTransactions.d.ts +74 -0
- package/dist/types/actions/public/watchPendingTransactions.d.ts.map +1 -0
- package/dist/types/actions/test/dropTransaction.d.ts +33 -0
- package/dist/types/actions/test/dropTransaction.d.ts.map +1 -0
- package/dist/types/actions/test/getAutomine.d.ts +27 -0
- package/dist/types/actions/test/getAutomine.d.ts.map +1 -0
- package/dist/types/actions/test/getTxpoolContent.d.ts +34 -0
- package/dist/types/actions/test/getTxpoolContent.d.ts.map +1 -0
- package/dist/types/actions/test/getTxpoolStatus.d.ts +30 -0
- package/dist/types/actions/test/getTxpoolStatus.d.ts.map +1 -0
- package/dist/types/actions/test/impersonateAccount.d.ts +33 -0
- package/dist/types/actions/test/impersonateAccount.d.ts.map +1 -0
- package/dist/types/actions/test/increaseTime.d.ts +32 -0
- package/dist/types/actions/test/increaseTime.d.ts.map +1 -0
- package/dist/types/actions/test/inspectTxpool.d.ts +31 -0
- package/dist/types/actions/test/inspectTxpool.d.ts.map +1 -0
- package/dist/types/actions/test/mine.d.ts +32 -0
- package/dist/types/actions/test/mine.d.ts.map +1 -0
- package/dist/types/actions/test/removeBlockTimestampInterval.d.ts +25 -0
- package/dist/types/actions/test/removeBlockTimestampInterval.d.ts.map +1 -0
- package/dist/types/actions/test/reset.d.ts +32 -0
- package/dist/types/actions/test/reset.d.ts.map +1 -0
- package/dist/types/actions/test/revert.d.ts +31 -0
- package/dist/types/actions/test/revert.d.ts.map +1 -0
- package/dist/types/actions/test/sendUnsignedTransaction.d.ts +35 -0
- package/dist/types/actions/test/sendUnsignedTransaction.d.ts.map +1 -0
- package/dist/types/actions/test/setAutomine.d.ts +25 -0
- package/dist/types/actions/test/setAutomine.d.ts.map +1 -0
- package/dist/types/actions/test/setBalance.d.ts +36 -0
- package/dist/types/actions/test/setBalance.d.ts.map +1 -0
- package/dist/types/actions/test/setBlockGasLimit.d.ts +30 -0
- package/dist/types/actions/test/setBlockGasLimit.d.ts.map +1 -0
- package/dist/types/actions/test/setBlockTimestampInterval.d.ts +30 -0
- package/dist/types/actions/test/setBlockTimestampInterval.d.ts.map +1 -0
- package/dist/types/actions/test/setCode.d.ts +37 -0
- package/dist/types/actions/test/setCode.d.ts.map +1 -0
- package/dist/types/actions/test/setCoinbase.d.ts +33 -0
- package/dist/types/actions/test/setCoinbase.d.ts.map +1 -0
- package/dist/types/actions/test/setIntervalMining.d.ts +30 -0
- package/dist/types/actions/test/setIntervalMining.d.ts.map +1 -0
- package/dist/types/actions/test/setLoggingEnabled.d.ts +25 -0
- package/dist/types/actions/test/setLoggingEnabled.d.ts.map +1 -0
- package/dist/types/actions/test/setMinGasPrice.d.ts +34 -0
- package/dist/types/actions/test/setMinGasPrice.d.ts.map +1 -0
- package/dist/types/actions/test/setNextBlockBaseFeePerGas.d.ts +32 -0
- package/dist/types/actions/test/setNextBlockBaseFeePerGas.d.ts.map +1 -0
- package/dist/types/actions/test/setNextBlockTimestamp.d.ts +30 -0
- package/dist/types/actions/test/setNextBlockTimestamp.d.ts.map +1 -0
- package/dist/types/actions/test/setNonce.d.ts +36 -0
- package/dist/types/actions/test/setNonce.d.ts.map +1 -0
- package/dist/types/actions/test/setRpcUrl.d.ts +26 -0
- package/dist/types/actions/test/setRpcUrl.d.ts.map +1 -0
- package/dist/types/actions/test/setStorageAt.d.ts +40 -0
- package/dist/types/actions/test/setStorageAt.d.ts.map +1 -0
- package/dist/types/actions/test/snapshot.d.ts +25 -0
- package/dist/types/actions/test/snapshot.d.ts.map +1 -0
- package/dist/types/actions/test/stopImpersonatingAccount.d.ts +33 -0
- package/dist/types/actions/test/stopImpersonatingAccount.d.ts.map +1 -0
- package/dist/types/actions/wallet/addChain.d.ts +29 -0
- package/dist/types/actions/wallet/addChain.d.ts.map +1 -0
- package/dist/types/actions/wallet/deployContract.d.ts +43 -0
- package/dist/types/actions/wallet/deployContract.d.ts.map +1 -0
- package/dist/types/actions/wallet/getAddresses.d.ts +28 -0
- package/dist/types/actions/wallet/getAddresses.d.ts.map +1 -0
- package/dist/types/actions/wallet/getPermissions.d.ts +28 -0
- package/dist/types/actions/wallet/getPermissions.d.ts.map +1 -0
- package/dist/types/actions/wallet/requestAddresses.d.ts +32 -0
- package/dist/types/actions/wallet/requestAddresses.d.ts.map +1 -0
- package/dist/types/actions/wallet/requestPermissions.d.ts +37 -0
- package/dist/types/actions/wallet/requestPermissions.d.ts.map +1 -0
- package/dist/types/actions/wallet/sendTransaction.d.ts +57 -0
- package/dist/types/actions/wallet/sendTransaction.d.ts.map +1 -0
- package/dist/types/actions/wallet/signMessage.d.ts +58 -0
- package/dist/types/actions/wallet/signMessage.d.ts.map +1 -0
- package/dist/types/actions/wallet/signTypedData.d.ts +114 -0
- package/dist/types/actions/wallet/signTypedData.d.ts.map +1 -0
- package/dist/types/actions/wallet/switchChain.d.ts +30 -0
- package/dist/types/actions/wallet/switchChain.d.ts.map +1 -0
- package/dist/types/actions/wallet/watchAsset.d.ts +37 -0
- package/dist/types/actions/wallet/watchAsset.d.ts.map +1 -0
- package/dist/types/actions/wallet/writeContract.d.ts +68 -0
- package/dist/types/actions/wallet/writeContract.d.ts.map +1 -0
- package/dist/types/chains/celo/formatters.d.ts +195 -0
- package/dist/types/chains/celo/formatters.d.ts.map +1 -0
- package/dist/types/chains/celo/parsers.d.ts +6 -0
- package/dist/types/chains/celo/parsers.d.ts.map +1 -0
- package/dist/types/chains/celo/serializers.d.ts +9 -0
- package/dist/types/chains/celo/serializers.d.ts.map +1 -0
- package/dist/types/chains/celo/types.d.ts +74 -0
- package/dist/types/chains/celo/types.d.ts.map +1 -0
- package/dist/types/chains/index.d.ts +5329 -0
- package/dist/types/chains/index.d.ts.map +1 -0
- package/dist/types/chains/optimism/fees.d.ts +4 -0
- package/dist/types/chains/optimism/fees.d.ts.map +1 -0
- package/dist/types/chains/optimism/formatters.d.ts +299 -0
- package/dist/types/chains/optimism/formatters.d.ts.map +1 -0
- package/dist/types/chains/optimism/types.d.ts +53 -0
- package/dist/types/chains/optimism/types.d.ts.map +1 -0
- package/dist/types/chains/utils.d.ts +7 -0
- package/dist/types/chains/utils.d.ts.map +1 -0
- package/dist/types/clients/createClient.d.ts +79 -0
- package/dist/types/clients/createClient.d.ts.map +1 -0
- package/dist/types/clients/createPublicClient.d.ts +29 -0
- package/dist/types/clients/createPublicClient.d.ts.map +1 -0
- package/dist/types/clients/createTestClient.d.ts +43 -0
- package/dist/types/clients/createTestClient.d.ts.map +1 -0
- package/dist/types/clients/createWalletClient.d.ts +49 -0
- package/dist/types/clients/createWalletClient.d.ts.map +1 -0
- package/dist/types/clients/decorators/public.d.ts +1087 -0
- package/dist/types/clients/decorators/public.d.ts.map +1 -0
- package/dist/types/clients/decorators/test.d.ts +599 -0
- package/dist/types/clients/decorators/test.d.ts.map +1 -0
- package/dist/types/clients/decorators/wallet.d.ts +449 -0
- package/dist/types/clients/decorators/wallet.d.ts.map +1 -0
- package/dist/types/clients/transports/createTransport.d.ts +34 -0
- package/dist/types/clients/transports/createTransport.d.ts.map +1 -0
- package/dist/types/clients/transports/custom.d.ts +21 -0
- package/dist/types/clients/transports/custom.d.ts.map +1 -0
- package/dist/types/clients/transports/fallback.d.ts +75 -0
- package/dist/types/clients/transports/fallback.d.ts.map +1 -0
- package/dist/types/clients/transports/http.d.ts +40 -0
- package/dist/types/clients/transports/http.d.ts.map +1 -0
- package/dist/types/clients/transports/webSocket.d.ts +46 -0
- package/dist/types/clients/transports/webSocket.d.ts.map +1 -0
- package/dist/types/constants/abis.d.ts +165 -0
- package/dist/types/constants/abis.d.ts.map +1 -0
- package/dist/types/constants/address.d.ts +2 -0
- package/dist/types/constants/address.d.ts.map +1 -0
- package/dist/types/constants/contract.d.ts +2 -0
- package/dist/types/constants/contract.d.ts.map +1 -0
- package/dist/types/constants/contracts.d.ts +2 -0
- package/dist/types/constants/contracts.d.ts.map +1 -0
- package/dist/types/constants/number.d.ts +97 -0
- package/dist/types/constants/number.d.ts.map +1 -0
- package/dist/types/constants/solidity.d.ts +15 -0
- package/dist/types/constants/solidity.d.ts.map +1 -0
- package/dist/types/constants/unit.d.ts +13 -0
- package/dist/types/constants/unit.d.ts.map +1 -0
- package/dist/types/contract.d.ts +30 -0
- package/dist/types/contract.d.ts.map +1 -0
- package/dist/types/ens.d.ts +9 -0
- package/dist/types/ens.d.ts.map +1 -0
- package/dist/types/errors/abi.d.ts +169 -0
- package/dist/types/errors/abi.d.ts.map +1 -0
- package/dist/types/errors/account.d.ts +8 -0
- package/dist/types/errors/account.d.ts.map +1 -0
- package/dist/types/errors/address.d.ts +8 -0
- package/dist/types/errors/address.d.ts.map +1 -0
- package/dist/types/errors/base.d.ts +24 -0
- package/dist/types/errors/base.d.ts.map +1 -0
- package/dist/types/errors/block.d.ts +10 -0
- package/dist/types/errors/block.d.ts.map +1 -0
- package/dist/types/errors/ccip.d.ts +29 -0
- package/dist/types/errors/ccip.d.ts.map +1 -0
- package/dist/types/errors/chain.d.ts +35 -0
- package/dist/types/errors/chain.d.ts.map +1 -0
- package/dist/types/errors/contract.d.ts +64 -0
- package/dist/types/errors/contract.d.ts.map +1 -0
- package/dist/types/errors/data.d.ts +18 -0
- package/dist/types/errors/data.d.ts.map +1 -0
- package/dist/types/errors/encoding.d.ts +53 -0
- package/dist/types/errors/encoding.d.ts.map +1 -0
- package/dist/types/errors/ens.d.ts +26 -0
- package/dist/types/errors/ens.d.ts.map +1 -0
- package/dist/types/errors/estimateGas.d.ts +14 -0
- package/dist/types/errors/estimateGas.d.ts.map +1 -0
- package/dist/types/errors/log.d.ts +6 -0
- package/dist/types/errors/log.d.ts.map +1 -0
- package/dist/types/errors/node.d.ts +105 -0
- package/dist/types/errors/node.d.ts.map +1 -0
- package/dist/types/errors/request.d.ts +61 -0
- package/dist/types/errors/request.d.ts.map +1 -0
- package/dist/types/errors/rpc.d.ts +221 -0
- package/dist/types/errors/rpc.d.ts.map +1 -0
- package/dist/types/errors/transaction.d.ts +79 -0
- package/dist/types/errors/transaction.d.ts.map +1 -0
- package/dist/types/errors/transport.d.ts +5 -0
- package/dist/types/errors/transport.d.ts.map +1 -0
- package/dist/types/errors/utils.d.ts +5 -0
- package/dist/types/errors/utils.d.ts.map +1 -0
- package/dist/types/errors/version.d.ts +2 -0
- package/dist/types/errors/version.d.ts.map +1 -0
- package/dist/types/index.d.ts +211 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/public.d.ts +31 -0
- package/dist/types/public.d.ts.map +1 -0
- package/dist/types/test.d.ts +29 -0
- package/dist/types/test.d.ts.map +1 -0
- package/dist/types/types/account.d.ts +12 -0
- package/dist/types/types/account.d.ts.map +1 -0
- package/dist/types/types/block.d.ts +62 -0
- package/dist/types/types/block.d.ts.map +1 -0
- package/dist/types/types/chain.d.ts +62 -0
- package/dist/types/types/chain.d.ts.map +1 -0
- package/dist/types/types/contract.d.ts +138 -0
- package/dist/types/types/contract.d.ts.map +1 -0
- package/dist/types/types/eip1193.d.ts +1216 -0
- package/dist/types/types/eip1193.d.ts.map +1 -0
- package/dist/types/types/ens.d.ts +5 -0
- package/dist/types/types/ens.d.ts.map +1 -0
- package/dist/types/types/fee.d.ts +29 -0
- package/dist/types/types/fee.d.ts.map +1 -0
- package/dist/types/types/filter.d.ts +40 -0
- package/dist/types/types/filter.d.ts.map +1 -0
- package/dist/types/types/log.d.ts +55 -0
- package/dist/types/types/log.d.ts.map +1 -0
- package/dist/types/types/misc.d.ts +14 -0
- package/dist/types/types/misc.d.ts.map +1 -0
- package/dist/types/types/multicall.d.ts +48 -0
- package/dist/types/types/multicall.d.ts.map +1 -0
- package/dist/types/types/rpc.d.ts +20 -0
- package/dist/types/types/rpc.d.ts.map +1 -0
- package/dist/types/types/transaction.d.ts +147 -0
- package/dist/types/types/transaction.d.ts.map +1 -0
- package/dist/types/types/transport.d.ts +3 -0
- package/dist/types/types/transport.d.ts.map +1 -0
- package/dist/types/types/typedData.d.ts +47 -0
- package/dist/types/types/typedData.d.ts.map +1 -0
- package/dist/types/types/utils.d.ts +188 -0
- package/dist/types/types/utils.d.ts.map +1 -0
- package/dist/types/types/window.d.ts +7 -0
- package/dist/types/types/window.d.ts.map +1 -0
- package/dist/types/utils/abi/decodeAbiParameters.d.ts +5 -0
- package/dist/types/utils/abi/decodeAbiParameters.d.ts.map +1 -0
- package/dist/types/utils/abi/decodeDeployData.d.ts +13 -0
- package/dist/types/utils/abi/decodeDeployData.d.ts.map +1 -0
- package/dist/types/utils/abi/decodeErrorResult.d.ts +16 -0
- package/dist/types/utils/abi/decodeErrorResult.d.ts.map +1 -0
- package/dist/types/utils/abi/decodeEventLog.d.ts +20 -0
- package/dist/types/utils/abi/decodeEventLog.d.ts.map +1 -0
- package/dist/types/utils/abi/decodeFunctionData.d.ts +15 -0
- package/dist/types/utils/abi/decodeFunctionData.d.ts.map +1 -0
- package/dist/types/utils/abi/decodeFunctionResult.d.ts +14 -0
- package/dist/types/utils/abi/decodeFunctionResult.d.ts.map +1 -0
- package/dist/types/utils/abi/encodeAbiParameters.d.ts +9 -0
- package/dist/types/utils/abi/encodeAbiParameters.d.ts.map +1 -0
- package/dist/types/utils/abi/encodeDeployData.d.ts +9 -0
- package/dist/types/utils/abi/encodeDeployData.d.ts.map +1 -0
- package/dist/types/utils/abi/encodeErrorResult.d.ts +11 -0
- package/dist/types/utils/abi/encodeErrorResult.d.ts.map +1 -0
- package/dist/types/utils/abi/encodeEventTopics.d.ts +13 -0
- package/dist/types/utils/abi/encodeEventTopics.d.ts.map +1 -0
- package/dist/types/utils/abi/encodeFunctionData.d.ts +11 -0
- package/dist/types/utils/abi/encodeFunctionData.d.ts.map +1 -0
- package/dist/types/utils/abi/encodeFunctionResult.d.ts +13 -0
- package/dist/types/utils/abi/encodeFunctionResult.d.ts.map +1 -0
- package/dist/types/utils/abi/encodePacked.d.ts +11 -0
- package/dist/types/utils/abi/encodePacked.d.ts.map +1 -0
- package/dist/types/utils/abi/formatAbiItem.d.ts +9 -0
- package/dist/types/utils/abi/formatAbiItem.d.ts.map +1 -0
- package/dist/types/utils/abi/formatAbiItemWithArgs.d.ts +8 -0
- package/dist/types/utils/abi/formatAbiItemWithArgs.d.ts.map +1 -0
- package/dist/types/utils/abi/getAbiItem.d.ts +12 -0
- package/dist/types/utils/abi/getAbiItem.d.ts.map +1 -0
- package/dist/types/utils/accounts.d.ts +3 -0
- package/dist/types/utils/accounts.d.ts.map +1 -0
- package/dist/types/utils/address/getAddress.d.ts +4 -0
- package/dist/types/utils/address/getAddress.d.ts.map +1 -0
- package/dist/types/utils/address/getContractAddress.d.ts +20 -0
- package/dist/types/utils/address/getContractAddress.d.ts.map +1 -0
- package/dist/types/utils/address/isAddress.d.ts +3 -0
- package/dist/types/utils/address/isAddress.d.ts.map +1 -0
- package/dist/types/utils/address/isAddressEqual.d.ts +3 -0
- package/dist/types/utils/address/isAddressEqual.d.ts.map +1 -0
- package/dist/types/utils/buildRequest.d.ts +6 -0
- package/dist/types/utils/buildRequest.d.ts.map +1 -0
- package/dist/types/utils/ccip.d.ts +37 -0
- package/dist/types/utils/ccip.d.ts.map +1 -0
- package/dist/types/utils/chain.d.ts +14 -0
- package/dist/types/utils/chain.d.ts.map +1 -0
- package/dist/types/utils/contract/extractFunctionParts.d.ts +13 -0
- package/dist/types/utils/contract/extractFunctionParts.d.ts.map +1 -0
- package/dist/types/utils/data/concat.d.ts +6 -0
- package/dist/types/utils/data/concat.d.ts.map +1 -0
- package/dist/types/utils/data/isBytes.d.ts +3 -0
- package/dist/types/utils/data/isBytes.d.ts.map +1 -0
- package/dist/types/utils/data/isBytesEqual.d.ts +3 -0
- package/dist/types/utils/data/isBytesEqual.d.ts.map +1 -0
- package/dist/types/utils/data/isHex.d.ts +5 -0
- package/dist/types/utils/data/isHex.d.ts.map +1 -0
- package/dist/types/utils/data/pad.d.ts +11 -0
- package/dist/types/utils/data/pad.d.ts.map +1 -0
- package/dist/types/utils/data/size.d.ts +9 -0
- package/dist/types/utils/data/size.d.ts.map +1 -0
- package/dist/types/utils/data/slice.d.ts +33 -0
- package/dist/types/utils/data/slice.d.ts.map +1 -0
- package/dist/types/utils/data/trim.d.ts +8 -0
- package/dist/types/utils/data/trim.d.ts.map +1 -0
- package/dist/types/utils/encoding/fromBytes.d.ts +109 -0
- package/dist/types/utils/encoding/fromBytes.d.ts.map +1 -0
- package/dist/types/utils/encoding/fromHex.d.ts +138 -0
- package/dist/types/utils/encoding/fromHex.d.ts.map +1 -0
- package/dist/types/utils/encoding/fromRlp.d.ts +6 -0
- package/dist/types/utils/encoding/fromRlp.d.ts.map +1 -0
- package/dist/types/utils/encoding/toBytes.d.ts +125 -0
- package/dist/types/utils/encoding/toBytes.d.ts.map +1 -0
- package/dist/types/utils/encoding/toHex.d.ts +139 -0
- package/dist/types/utils/encoding/toHex.d.ts.map +1 -0
- package/dist/types/utils/encoding/toRlp.d.ts +8 -0
- package/dist/types/utils/encoding/toRlp.d.ts.map +1 -0
- package/dist/types/utils/ens/avatar/parseAvatarRecord.d.ts +9 -0
- package/dist/types/utils/ens/avatar/parseAvatarRecord.d.ts.map +1 -0
- package/dist/types/utils/ens/avatar/utils.d.ts +37 -0
- package/dist/types/utils/ens/avatar/utils.d.ts.map +1 -0
- 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/errors.d.ts +2 -0
- package/dist/types/utils/ens/errors.d.ts.map +1 -0
- package/dist/types/utils/ens/labelhash.d.ts +11 -0
- package/dist/types/utils/ens/labelhash.d.ts.map +1 -0
- package/dist/types/utils/ens/namehash.d.ts +13 -0
- package/dist/types/utils/ens/namehash.d.ts.map +1 -0
- package/dist/types/utils/ens/normalize.d.ts +12 -0
- package/dist/types/utils/ens/normalize.d.ts.map +1 -0
- package/dist/types/utils/ens/packetToBytes.d.ts +3 -0
- package/dist/types/utils/ens/packetToBytes.d.ts.map +1 -0
- package/dist/types/utils/errors/getCallError.d.ts +9 -0
- package/dist/types/utils/errors/getCallError.d.ts.map +1 -0
- package/dist/types/utils/errors/getContractError.d.ts +12 -0
- package/dist/types/utils/errors/getContractError.d.ts.map +1 -0
- package/dist/types/utils/errors/getEstimateGasError.d.ts +11 -0
- package/dist/types/utils/errors/getEstimateGasError.d.ts.map +1 -0
- package/dist/types/utils/errors/getNodeError.d.ts +7 -0
- package/dist/types/utils/errors/getNodeError.d.ts.map +1 -0
- package/dist/types/utils/errors/getTransactionError.d.ts +12 -0
- package/dist/types/utils/errors/getTransactionError.d.ts.map +1 -0
- package/dist/types/utils/filters/createFilterRequestScope.d.ts +22 -0
- package/dist/types/utils/filters/createFilterRequestScope.d.ts.map +1 -0
- package/dist/types/utils/formatters/block.d.ts +28 -0
- package/dist/types/utils/formatters/block.d.ts.map +1 -0
- package/dist/types/utils/formatters/extract.d.ts +8 -0
- package/dist/types/utils/formatters/extract.d.ts.map +1 -0
- package/dist/types/utils/formatters/feeHistory.d.ts +4 -0
- package/dist/types/utils/formatters/feeHistory.d.ts.map +1 -0
- package/dist/types/utils/formatters/formatter.d.ts +10 -0
- package/dist/types/utils/formatters/formatter.d.ts.map +1 -0
- package/dist/types/utils/formatters/log.d.ts +7 -0
- package/dist/types/utils/formatters/log.d.ts.map +1 -0
- package/dist/types/utils/formatters/transaction.d.ts +30 -0
- package/dist/types/utils/formatters/transaction.d.ts.map +1 -0
- package/dist/types/utils/formatters/transactionReceipt.d.ts +14 -0
- package/dist/types/utils/formatters/transactionReceipt.d.ts.map +1 -0
- package/dist/types/utils/formatters/transactionRequest.d.ts +14 -0
- package/dist/types/utils/formatters/transactionRequest.d.ts.map +1 -0
- package/dist/types/utils/hash/getEventSelector.d.ts +4 -0
- package/dist/types/utils/hash/getEventSelector.d.ts.map +1 -0
- package/dist/types/utils/hash/getFunctionSelector.d.ts +3 -0
- package/dist/types/utils/hash/getFunctionSelector.d.ts.map +1 -0
- package/dist/types/utils/hash/hashFunction.d.ts +4 -0
- package/dist/types/utils/hash/hashFunction.d.ts.map +1 -0
- package/dist/types/utils/hash/isHash.d.ts +3 -0
- package/dist/types/utils/hash/isHash.d.ts.map +1 -0
- package/dist/types/utils/hash/keccak256.d.ts +6 -0
- package/dist/types/utils/hash/keccak256.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +82 -0
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/types/utils/observe.d.ts +17 -0
- package/dist/types/utils/observe.d.ts.map +1 -0
- package/dist/types/utils/poll.d.ts +13 -0
- package/dist/types/utils/poll.d.ts.map +1 -0
- package/dist/types/utils/promise/createBatchScheduler.d.ts +17 -0
- package/dist/types/utils/promise/createBatchScheduler.d.ts.map +1 -0
- package/dist/types/utils/promise/withCache.d.ts +36 -0
- package/dist/types/utils/promise/withCache.d.ts.map +1 -0
- package/dist/types/utils/promise/withRetry.d.ts +12 -0
- package/dist/types/utils/promise/withRetry.d.ts.map +1 -0
- package/dist/types/utils/promise/withTimeout.d.ts +8 -0
- package/dist/types/utils/promise/withTimeout.d.ts.map +1 -0
- package/dist/types/utils/regex.d.ts +4 -0
- package/dist/types/utils/regex.d.ts.map +1 -0
- package/dist/types/utils/rpc.d.ts +72 -0
- package/dist/types/utils/rpc.d.ts.map +1 -0
- package/dist/types/utils/signature/hashMessage.d.ts +6 -0
- package/dist/types/utils/signature/hashMessage.d.ts.map +1 -0
- package/dist/types/utils/signature/hashTypedData.d.ts +11 -0
- package/dist/types/utils/signature/hashTypedData.d.ts.map +1 -0
- package/dist/types/utils/signature/hexToSignature.d.ts +13 -0
- package/dist/types/utils/signature/hexToSignature.d.ts.map +1 -0
- package/dist/types/utils/signature/recoverAddress.d.ts +9 -0
- package/dist/types/utils/signature/recoverAddress.d.ts.map +1 -0
- package/dist/types/utils/signature/recoverMessageAddress.d.ts +9 -0
- package/dist/types/utils/signature/recoverMessageAddress.d.ts.map +1 -0
- package/dist/types/utils/signature/recoverPublicKey.d.ts +8 -0
- package/dist/types/utils/signature/recoverPublicKey.d.ts.map +1 -0
- package/dist/types/utils/signature/recoverTypedDataAddress.d.ts +13 -0
- package/dist/types/utils/signature/recoverTypedDataAddress.d.ts.map +1 -0
- package/dist/types/utils/signature/signatureToHex.d.ts +17 -0
- package/dist/types/utils/signature/signatureToHex.d.ts.map +1 -0
- package/dist/types/utils/signature/verifyMessage.d.ts +25 -0
- package/dist/types/utils/signature/verifyMessage.d.ts.map +1 -0
- package/dist/types/utils/signature/verifyTypedData.d.ts +28 -0
- package/dist/types/utils/signature/verifyTypedData.d.ts.map +1 -0
- package/dist/types/utils/stringify.d.ts +2 -0
- package/dist/types/utils/stringify.d.ts.map +1 -0
- package/dist/types/utils/transaction/assertRequest.d.ts +5 -0
- package/dist/types/utils/transaction/assertRequest.d.ts.map +1 -0
- package/dist/types/utils/transaction/assertTransaction.d.ts +5 -0
- package/dist/types/utils/transaction/assertTransaction.d.ts.map +1 -0
- package/dist/types/utils/transaction/getSerializedTransactionType.d.ts +4 -0
- package/dist/types/utils/transaction/getSerializedTransactionType.d.ts.map +1 -0
- package/dist/types/utils/transaction/getTransactionType.d.ts +4 -0
- package/dist/types/utils/transaction/getTransactionType.d.ts.map +1 -0
- package/dist/types/utils/transaction/parseTransaction.d.ts +9 -0
- package/dist/types/utils/transaction/parseTransaction.d.ts.map +1 -0
- package/dist/types/utils/transaction/prepareRequest.d.ts +20 -0
- package/dist/types/utils/transaction/prepareRequest.d.ts.map +1 -0
- package/dist/types/utils/transaction/serializeAccessList.d.ts +5 -0
- package/dist/types/utils/transaction/serializeAccessList.d.ts.map +1 -0
- package/dist/types/utils/transaction/serializeTransaction.d.ts +7 -0
- package/dist/types/utils/transaction/serializeTransaction.d.ts.map +1 -0
- package/dist/types/utils/typedData.d.ts +6 -0
- package/dist/types/utils/typedData.d.ts.map +1 -0
- package/dist/types/utils/uid.d.ts +2 -0
- package/dist/types/utils/uid.d.ts.map +1 -0
- package/dist/types/utils/unit/formatEther.d.ts +2 -0
- package/dist/types/utils/unit/formatEther.d.ts.map +1 -0
- package/dist/types/utils/unit/formatGwei.d.ts +2 -0
- package/dist/types/utils/unit/formatGwei.d.ts.map +1 -0
- package/dist/types/utils/unit/formatUnits.d.ts +2 -0
- package/dist/types/utils/unit/formatUnits.d.ts.map +1 -0
- package/dist/types/utils/unit/parseEther.d.ts +2 -0
- package/dist/types/utils/unit/parseEther.d.ts.map +1 -0
- package/dist/types/utils/unit/parseGwei.d.ts +2 -0
- package/dist/types/utils/unit/parseGwei.d.ts.map +1 -0
- package/dist/types/utils/unit/parseUnits.d.ts +2 -0
- package/dist/types/utils/unit/parseUnits.d.ts.map +1 -0
- package/dist/types/utils/wait.d.ts +2 -0
- package/dist/types/utils/wait.d.ts.map +1 -0
- package/dist/types/wallet.d.ts +11 -0
- package/dist/types/wallet.d.ts.map +1 -0
- package/dist/types/window.d.ts +2 -0
- package/dist/types/window.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/errors/version.ts +1 -1
@@ -0,0 +1,188 @@
|
|
1
|
+
/**
|
2
|
+
* Filters out all members of {@link T} that are not {@link P}
|
3
|
+
*
|
4
|
+
* @param T - Items to filter
|
5
|
+
* @param P - Type to filter out
|
6
|
+
* @returns Filtered items
|
7
|
+
*
|
8
|
+
* @example
|
9
|
+
* type Result = Filter<['a', 'b', 'c'], 'b'>
|
10
|
+
* // ^? type Result = ['a', 'c']
|
11
|
+
*/
|
12
|
+
export type Filter<T extends readonly unknown[], P, Acc extends readonly unknown[] = []> = T extends readonly [infer F, ...infer Rest extends readonly unknown[]] ? [F] extends [P] ? Filter<Rest, P, [...Acc, F]> : Filter<Rest, P, Acc> : readonly [...Acc];
|
13
|
+
/**
|
14
|
+
* @description Checks if {@link T} can be narrowed further than {@link U}
|
15
|
+
* @param T - Type to check
|
16
|
+
* @param U - Type to against
|
17
|
+
* @example
|
18
|
+
* type Result = IsNarrowable<'foo', string>
|
19
|
+
* // ^? true
|
20
|
+
*/
|
21
|
+
export type IsNarrowable<T, U> = IsNever<(T extends U ? true : false) & (U extends T ? false : true)> extends true ? false : true;
|
22
|
+
/**
|
23
|
+
* @description Checks if {@link T} is `never`
|
24
|
+
* @param T - Type to check
|
25
|
+
* @example
|
26
|
+
* type Result = IsNever<never>
|
27
|
+
* // ^? type Result = true
|
28
|
+
*/
|
29
|
+
export type IsNever<T> = [T] extends [never] ? true : false;
|
30
|
+
/**
|
31
|
+
* @description Evaluates boolean "or" condition for {@link T} properties.
|
32
|
+
* @param T - Type to check
|
33
|
+
*
|
34
|
+
* * @example
|
35
|
+
* type Result = Or<[false, true, false]>
|
36
|
+
* // ^? type Result = true
|
37
|
+
*
|
38
|
+
* @example
|
39
|
+
* type Result = Or<[false, false, false]>
|
40
|
+
* // ^? type Result = false
|
41
|
+
*/
|
42
|
+
export type Or<T extends readonly unknown[]> = T extends readonly [
|
43
|
+
infer Head,
|
44
|
+
...infer Tail
|
45
|
+
] ? Head extends true ? true : Or<Tail> : false;
|
46
|
+
/**
|
47
|
+
* @description Checks if {@link T} is `undefined`
|
48
|
+
* @param T - Type to check
|
49
|
+
* @example
|
50
|
+
* type Result = IsUndefined<undefined>
|
51
|
+
* // ^? type Result = true
|
52
|
+
*/
|
53
|
+
export type IsUndefined<T> = [undefined] extends [T] ? true : false;
|
54
|
+
/**
|
55
|
+
* Excludes empty attributes from T if TMaybeExclude is true.
|
56
|
+
*
|
57
|
+
* @example
|
58
|
+
* type Result = MaybeExcludeEmpty<{ a: string, b: number, c: [] }, true>
|
59
|
+
* // ^? type Result = { a: string, b: number }
|
60
|
+
* @example
|
61
|
+
* type Result = MaybeExcludeEmpty<{ a: string, b: number, c: [] }, false>
|
62
|
+
* // ^? type Result = { a: string, b: number, c: [] }
|
63
|
+
* @example
|
64
|
+
* type Result = MaybeExcludeEmpty<{ a: string, b: number, c: undefined }, true>
|
65
|
+
* // ^? type Result = { a: string, b: number }
|
66
|
+
*/
|
67
|
+
export type MaybeExcludeEmpty<T, TMaybeExclude extends boolean> = TMaybeExclude extends true ? Exclude<T, [] | null | undefined> : T;
|
68
|
+
export type MaybePromise<T> = T | Promise<T>;
|
69
|
+
/**
|
70
|
+
* @description Makes attributes on the type T required if TRequired is true.
|
71
|
+
*
|
72
|
+
* @example
|
73
|
+
* MaybeRequired<{ a: string, b?: number }, true>
|
74
|
+
* => { a: string, b: number }
|
75
|
+
*
|
76
|
+
* MaybeRequired<{ a: string, b?: number }, false>
|
77
|
+
* => { a: string, b?: number }
|
78
|
+
*/
|
79
|
+
export type MaybeRequired<T, TRequired extends boolean> = TRequired extends true ? Required<T> : T;
|
80
|
+
/**
|
81
|
+
* @description Makes the attribute on the type T allow undefined if TUndefinedish is true.
|
82
|
+
*
|
83
|
+
* @example
|
84
|
+
* MaybeUndefined<string, true>
|
85
|
+
* => string | undefined
|
86
|
+
*
|
87
|
+
* MaybeUndefined<string, false>
|
88
|
+
* => string
|
89
|
+
*/
|
90
|
+
export type MaybeUndefined<T, TUndefinedish extends boolean> = TUndefinedish extends true ? T | undefined : T;
|
91
|
+
/**
|
92
|
+
* @private Helper for `Assign`. This is a workaround for tsc generating errorneous type definitions.
|
93
|
+
*/
|
94
|
+
export type Assign_<T, U> = {
|
95
|
+
[K in keyof T as K extends keyof U ? U[K] extends void ? never : K : K]: K extends keyof U ? U[K] : T[K];
|
96
|
+
};
|
97
|
+
/**
|
98
|
+
* @description Assigns the properties of U onto T.
|
99
|
+
*
|
100
|
+
* @example
|
101
|
+
* Assign<{ a: string, b: number }, { a: undefined, c: boolean }>
|
102
|
+
* => { a: undefined, b: number, c: boolean }
|
103
|
+
*/
|
104
|
+
export type Assign<T, U> = Assign_<T, U> & U;
|
105
|
+
/**
|
106
|
+
* @description Makes nullable properties from T optional.
|
107
|
+
*
|
108
|
+
* @example
|
109
|
+
* OptionalNullable<{ a: string | undefined, c: number }>
|
110
|
+
* => { a?: string | undefined, c: number }
|
111
|
+
*/
|
112
|
+
export type OptionalNullable<T> = {
|
113
|
+
[K in keyof T as T[K] extends NonNullable<unknown> ? K : never]: T[K];
|
114
|
+
} & {
|
115
|
+
[K in keyof T as T[K] extends NonNullable<unknown> ? never : K]?: T[K];
|
116
|
+
};
|
117
|
+
/**
|
118
|
+
* @description Make properties K of type T never.
|
119
|
+
*
|
120
|
+
* @example
|
121
|
+
* NeverBy<{ a: string, b: boolean, c: number }, 'a' | 'c'>
|
122
|
+
* => { a: never, b: boolean, c: never }
|
123
|
+
*/
|
124
|
+
export type NeverBy<T, K extends keyof T> = {
|
125
|
+
[U in keyof T]: U extends K ? never : T[U];
|
126
|
+
};
|
127
|
+
/**
|
128
|
+
* @description Constructs a type by excluding `undefined` from `T`.
|
129
|
+
*
|
130
|
+
* @example
|
131
|
+
* NoUndefined<string | undefined>
|
132
|
+
* => string
|
133
|
+
*/
|
134
|
+
export type NoUndefined<T> = T extends undefined ? never : T;
|
135
|
+
/**
|
136
|
+
* @description Construct a type with the properties of union type T except for those in type K.
|
137
|
+
* @example
|
138
|
+
* type Result = UnionOmit<{ a: string, b: number } | { a: string, b: undefined, c: number }, 'a'>
|
139
|
+
* => { b: number } | { b: undefined, c: number }
|
140
|
+
*/
|
141
|
+
export type UnionOmit<T, K extends keyof any> = T extends any ? Omit<T, K> : never;
|
142
|
+
/**
|
143
|
+
* @description Creates a type that is a partial of T, but with the required keys K.
|
144
|
+
*
|
145
|
+
* @example
|
146
|
+
* PartialBy<{ a: string, b: number }, 'a'>
|
147
|
+
* => { a?: string, b: number }
|
148
|
+
*/
|
149
|
+
export type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
150
|
+
/**
|
151
|
+
* @description Combines members of an intersection into a readable type.
|
152
|
+
*
|
153
|
+
* @see {@link https://twitter.com/mattpocockuk/status/1622730173446557697?s=20&t=NdpAcmEFXY01xkqU3KO0Mg}
|
154
|
+
* @example
|
155
|
+
* Prettify<{ a: string } & { b: string } & { c: number, d: bigint }>
|
156
|
+
* => { a: string, b: string, c: number, d: bigint }
|
157
|
+
*/
|
158
|
+
export type Prettify<T> = {
|
159
|
+
[K in keyof T]: T[K];
|
160
|
+
} & {};
|
161
|
+
type TrimLeft<T, Chars extends string = ' '> = T extends `${Chars}${infer R}` ? TrimLeft<R> : T;
|
162
|
+
type TrimRight<T, Chars extends string = ' '> = T extends `${infer R}${Chars}` ? TrimRight<R> : T;
|
163
|
+
/**
|
164
|
+
* @description Creates a type with required keys K from T.
|
165
|
+
*
|
166
|
+
* @example
|
167
|
+
* type Result = RequiredBy<{ a?: string, b?: number, c: number }, 'a' | 'c'>
|
168
|
+
* // ^? { a: string, b?: number, c: number }
|
169
|
+
*/
|
170
|
+
export type RequiredBy<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
|
171
|
+
/**
|
172
|
+
* @description Trims empty space from type T.
|
173
|
+
*
|
174
|
+
* @example
|
175
|
+
* Trim<' lol '>
|
176
|
+
* => 'lol'
|
177
|
+
*/
|
178
|
+
export type Trim<T, Chars extends string = ' '> = TrimLeft<TrimRight<T, Chars>, Chars>;
|
179
|
+
/**
|
180
|
+
* @description Creates a type that extracts the values of T.
|
181
|
+
*
|
182
|
+
* @example
|
183
|
+
* ValueOf<{ a: string, b: number }>
|
184
|
+
* => string | number
|
185
|
+
*/
|
186
|
+
export type ValueOf<T> = T[keyof T];
|
187
|
+
export {};
|
188
|
+
//# sourceMappingURL=utils.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/types/utils.ts"],"names":[],"mappings":"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"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../../src/types/window.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAEnD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,QAAQ,CAAC,EAAE,eAAe,CAAA;KAC3B;CACF"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import type { AbiParameter, AbiParametersToPrimitiveTypes } from 'abitype';
|
2
|
+
import type { Hex } from '../../types/misc.js';
|
3
|
+
export type DecodeAbiParametersReturnType<TParams extends readonly AbiParameter[] | readonly unknown[] = readonly AbiParameter[]> = AbiParametersToPrimitiveTypes<TParams extends readonly AbiParameter[] ? TParams : AbiParameter[]>;
|
4
|
+
export declare function decodeAbiParameters<const TParams extends readonly AbiParameter[] | readonly unknown[]>(params: TParams, data: Hex): DecodeAbiParametersReturnType<TParams>;
|
5
|
+
//# sourceMappingURL=decodeAbiParameters.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"decodeAbiParameters.d.ts","sourceRoot":"","sources":["../../../../src/utils/abi/decodeAbiParameters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EAEZ,6BAA6B,EAC9B,MAAM,SAAS,CAAA;AAOhB,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAc9C,MAAM,MAAM,6BAA6B,CACvC,OAAO,SACH,SAAS,YAAY,EAAE,GACvB,SAAS,OAAO,EAAE,GAAG,SAAS,YAAY,EAAE,IAC9C,6BAA6B,CAC/B,OAAO,SAAS,SAAS,YAAY,EAAE,GAAG,OAAO,GAAG,YAAY,EAAE,CACnE,CAAA;AAED,wBAAgB,mBAAmB,CACjC,KAAK,CAAC,OAAO,SAAS,SAAS,YAAY,EAAE,GAAG,SAAS,OAAO,EAAE,EAClE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,GAAG,6BAA6B,CAAC,OAAO,CAAC,CAapE"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import type { Abi } from 'abitype';
|
2
|
+
import type { GetConstructorArgs } from '../../types/contract.js';
|
3
|
+
import type { Hex } from '../../types/misc.js';
|
4
|
+
export type DecodeDeployDataParameters<TAbi extends Abi | readonly unknown[] = Abi> = {
|
5
|
+
abi: TAbi;
|
6
|
+
bytecode: Hex;
|
7
|
+
data: Hex;
|
8
|
+
};
|
9
|
+
export type DecodeDeployDataReturnType<TAbi extends Abi | readonly unknown[] = Abi> = {
|
10
|
+
bytecode: Hex;
|
11
|
+
} & GetConstructorArgs<TAbi>;
|
12
|
+
export declare function decodeDeployData<const TAbi extends Abi | readonly unknown[]>({ abi, bytecode, data, }: DecodeDeployDataParameters<TAbi>): DecodeDeployDataReturnType<TAbi>;
|
13
|
+
//# sourceMappingURL=decodeDeployData.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"decodeDeployData.d.ts","sourceRoot":"","sources":["../../../../src/utils/abi/decodeDeployData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAMlC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AACjE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAM9C,MAAM,MAAM,0BAA0B,CACpC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,GAAG,IACzC;IACF,GAAG,EAAE,IAAI,CAAA;IACT,QAAQ,EAAE,GAAG,CAAA;IACb,IAAI,EAAE,GAAG,CAAA;CACV,CAAA;AACD,MAAM,MAAM,0BAA0B,CACpC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,GAAG,IACzC;IACF,QAAQ,EAAE,GAAG,CAAA;CACd,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAA;AAE5B,wBAAgB,gBAAgB,CAAC,KAAK,CAAC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,EAAE,EAC5E,GAAG,EACH,QAAQ,EACR,IAAI,GACL,EAAE,0BAA0B,CAAC,IAAI,CAAC,GAAG,0BAA0B,CAAC,IAAI,CAAC,CAiBrE"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import type { Abi, ExtractAbiError, ExtractAbiErrorNames } from 'abitype';
|
2
|
+
import type { AbiItem, GetErrorArgs } from '../../types/contract.js';
|
3
|
+
import type { Hex } from '../../types/misc.js';
|
4
|
+
export type DecodeErrorResultParameters<TAbi extends Abi | readonly unknown[] = Abi> = {
|
5
|
+
abi?: TAbi;
|
6
|
+
data: Hex;
|
7
|
+
};
|
8
|
+
export type DecodeErrorResultReturnType<TAbi extends Abi | readonly unknown[] = Abi, _ErrorNames extends string = TAbi extends Abi ? Abi extends TAbi ? string : ExtractAbiErrorNames<TAbi> : string> = {
|
9
|
+
[TName in _ErrorNames]: {
|
10
|
+
abiItem: TAbi extends Abi ? ExtractAbiError<TAbi, TName> : AbiItem;
|
11
|
+
args: GetErrorArgs<TAbi, TName>['args'];
|
12
|
+
errorName: TName;
|
13
|
+
};
|
14
|
+
}[_ErrorNames];
|
15
|
+
export declare function decodeErrorResult<const TAbi extends Abi | readonly unknown[]>({ abi, data, }: DecodeErrorResultParameters<TAbi>): DecodeErrorResultReturnType<TAbi>;
|
16
|
+
//# sourceMappingURL=decodeErrorResult.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"decodeErrorResult.d.ts","sourceRoot":"","sources":["../../../../src/utils/abi/decodeErrorResult.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAOzE,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AACpE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAO9C,MAAM,MAAM,2BAA2B,CACrC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,GAAG,IACzC;IAAE,GAAG,CAAC,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,GAAG,CAAA;CAAE,CAAA;AAE7B,MAAM,MAAM,2BAA2B,CACrC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,GAAG,EAC3C,WAAW,SAAS,MAAM,GAAG,IAAI,SAAS,GAAG,GACzC,GAAG,SAAS,IAAI,GACd,MAAM,GACN,oBAAoB,CAAC,IAAI,CAAC,GAC5B,MAAM,IACR;KACD,KAAK,IAAI,WAAW,GAAG;QACtB,OAAO,EAAE,IAAI,SAAS,GAAG,GAAG,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,OAAO,CAAA;QAClE,IAAI,EAAE,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,MAAM,CAAC,CAAA;QACvC,SAAS,EAAE,KAAK,CAAA;KACjB;CACF,CAAC,WAAW,CAAC,CAAA;AAEd,wBAAgB,iBAAiB,CAAC,KAAK,CAAC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,EAAE,EAC7E,GAAG,EACH,IAAI,GACL,EAAE,2BAA2B,CAAC,IAAI,CAAC,GAAG,2BAA2B,CAAC,IAAI,CAAC,CAoBvE"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import type { Abi, ExtractAbiEventNames } from 'abitype';
|
2
|
+
import type { GetEventArgsFromTopics, InferEventName } from '../../types/contract.js';
|
3
|
+
import type { Hex } from '../../types/misc.js';
|
4
|
+
import type { Prettify } from '../../types/utils.js';
|
5
|
+
export type DecodeEventLogParameters<TAbi extends Abi | readonly unknown[] = Abi, TEventName extends string | undefined = string, TTopics extends Hex[] = Hex[], TData extends Hex | undefined = undefined, TStrict extends boolean = true> = {
|
6
|
+
abi: TAbi;
|
7
|
+
data?: TData;
|
8
|
+
eventName?: InferEventName<TAbi, TEventName>;
|
9
|
+
strict?: TStrict;
|
10
|
+
topics: [signature: Hex, ...args: TTopics] | [];
|
11
|
+
};
|
12
|
+
export type DecodeEventLogReturnType<TAbi extends Abi | readonly unknown[] = Abi, TEventName extends string | undefined = string, TTopics extends Hex[] = Hex[], TData extends Hex | undefined = undefined, TStrict extends boolean = true, _EventNames extends string = TAbi extends Abi ? Abi extends TAbi ? string : ExtractAbiEventNames<TAbi> : string> = TEventName extends _EventNames[number] ? Prettify<{
|
13
|
+
eventName: TEventName;
|
14
|
+
} & GetEventArgsFromTopics<TAbi, TEventName, TTopics, TData, TStrict>> : {
|
15
|
+
[TName in _EventNames]: Prettify<{
|
16
|
+
eventName: TName;
|
17
|
+
} & GetEventArgsFromTopics<TAbi, TName, TTopics, TData, TStrict>>;
|
18
|
+
}[_EventNames];
|
19
|
+
export declare function decodeEventLog<const TAbi extends Abi | readonly unknown[], TEventName extends string | undefined = undefined, TTopics extends Hex[] = Hex[], TData extends Hex | undefined = undefined, TStrict extends boolean = true>({ abi, data, strict: strict_, topics, }: DecodeEventLogParameters<TAbi, TEventName, TTopics, TData, TStrict>): DecodeEventLogReturnType<TAbi, TEventName, TTopics, TData, TStrict>;
|
20
|
+
//# sourceMappingURL=decodeEventLog.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"decodeEventLog.d.ts","sourceRoot":"","sources":["../../../../src/utils/abi/decodeEventLog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAgB,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAStE,OAAO,KAAK,EAEV,sBAAsB,EACtB,cAAc,EACf,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAMpD,MAAM,MAAM,wBAAwB,CAClC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,GAAG,EAC3C,UAAU,SAAS,MAAM,GAAG,SAAS,GAAG,MAAM,EAC9C,OAAO,SAAS,GAAG,EAAE,GAAG,GAAG,EAAE,EAC7B,KAAK,SAAS,GAAG,GAAG,SAAS,GAAG,SAAS,EACzC,OAAO,SAAS,OAAO,GAAG,IAAI,IAC5B;IACF,GAAG,EAAE,IAAI,CAAA;IACT,IAAI,CAAC,EAAE,KAAK,CAAA;IACZ,SAAS,CAAC,EAAE,cAAc,CAAC,IAAI,EAAE,UAAU,CAAC,CAAA;IAC5C,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,OAAO,CAAC,GAAG,EAAE,CAAA;CAChD,CAAA;AAED,MAAM,MAAM,wBAAwB,CAClC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,GAAG,EAC3C,UAAU,SAAS,MAAM,GAAG,SAAS,GAAG,MAAM,EAC9C,OAAO,SAAS,GAAG,EAAE,GAAG,GAAG,EAAE,EAC7B,KAAK,SAAS,GAAG,GAAG,SAAS,GAAG,SAAS,EACzC,OAAO,SAAS,OAAO,GAAG,IAAI,EAC9B,WAAW,SAAS,MAAM,GAAG,IAAI,SAAS,GAAG,GACzC,GAAG,SAAS,IAAI,GACd,MAAM,GACN,oBAAoB,CAAC,IAAI,CAAC,GAC5B,MAAM,IACR,UAAU,SAAS,WAAW,CAAC,MAAM,CAAC,GACtC,QAAQ,CACN;IACE,SAAS,EAAE,UAAU,CAAA;CACtB,GAAG,sBAAsB,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CACtE,GACD;KACG,KAAK,IAAI,WAAW,GAAG,QAAQ,CAC9B;QACE,SAAS,EAAE,KAAK,CAAA;KACjB,GAAG,sBAAsB,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CACjE;CACF,CAAC,WAAW,CAAC,CAAA;AAIlB,wBAAgB,cAAc,CAC5B,KAAK,CAAC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,EAC3C,UAAU,SAAS,MAAM,GAAG,SAAS,GAAG,SAAS,EACjD,OAAO,SAAS,GAAG,EAAE,GAAG,GAAG,EAAE,EAC7B,KAAK,SAAS,GAAG,GAAG,SAAS,GAAG,SAAS,EACzC,OAAO,SAAS,OAAO,GAAG,IAAI,EAC9B,EACA,GAAG,EACH,IAAI,EACJ,MAAM,EAAE,OAAO,EACf,MAAM,GACP,EAAE,wBAAwB,CACzB,IAAI,EACJ,UAAU,EACV,OAAO,EACP,KAAK,EACL,OAAO,CACR,GAAG,wBAAwB,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAmFtE"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import type { Abi, ExtractAbiFunctionNames } from 'abitype';
|
2
|
+
import type { GetFunctionArgs } from '../../types/contract.js';
|
3
|
+
import type { Hex } from '../../types/misc.js';
|
4
|
+
export type DecodeFunctionDataParameters<TAbi extends Abi | readonly unknown[] = Abi> = {
|
5
|
+
abi: TAbi;
|
6
|
+
data: Hex;
|
7
|
+
};
|
8
|
+
export type DecodeFunctionDataReturnType<TAbi extends Abi | readonly unknown[] = Abi, _FunctionNames extends string = TAbi extends Abi ? Abi extends TAbi ? string : ExtractAbiFunctionNames<TAbi> : string> = {
|
9
|
+
[TName in _FunctionNames]: {
|
10
|
+
args: GetFunctionArgs<TAbi, TName>['args'];
|
11
|
+
functionName: TName;
|
12
|
+
};
|
13
|
+
}[_FunctionNames];
|
14
|
+
export declare function decodeFunctionData<TAbi extends Abi | readonly unknown[]>({ abi, data, }: DecodeFunctionDataParameters<TAbi>): DecodeFunctionDataReturnType<TAbi, TAbi extends Abi ? Abi extends TAbi ? string : ExtractAbiFunctionNames<TAbi> : string>;
|
15
|
+
//# sourceMappingURL=decodeFunctionData.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"decodeFunctionData.d.ts","sourceRoot":"","sources":["../../../../src/utils/abi/decodeFunctionData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA;AAG3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAO9C,MAAM,MAAM,4BAA4B,CACtC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,GAAG,IACzC;IACF,GAAG,EAAE,IAAI,CAAA;IACT,IAAI,EAAE,GAAG,CAAA;CACV,CAAA;AAED,MAAM,MAAM,4BAA4B,CACtC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,GAAG,EAC3C,cAAc,SAAS,MAAM,GAAG,IAAI,SAAS,GAAG,GAC5C,GAAG,SAAS,IAAI,GACd,MAAM,GACN,uBAAuB,CAAC,IAAI,CAAC,GAC/B,MAAM,IACR;KACD,KAAK,IAAI,cAAc,GAAG;QACzB,IAAI,EAAE,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,MAAM,CAAC,CAAA;QAC1C,YAAY,EAAE,KAAK,CAAA;KACpB;CACF,CAAC,cAAc,CAAC,CAAA;AAEjB,wBAAgB,kBAAkB,CAAC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,EAAE,EACxE,GAAG,EACH,IAAI,GACL,EAAE,4BAA4B,CAAC,IAAI,CAAC,6HAmBpC"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import type { Abi, ExtractAbiFunctionNames } from 'abitype';
|
2
|
+
import type { ContractFunctionResult, GetFunctionArgs, InferFunctionName } from '../../types/contract.js';
|
3
|
+
import type { Hex } from '../../types/misc.js';
|
4
|
+
export type DecodeFunctionResultParameters<TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string | undefined = string, _FunctionName = InferFunctionName<TAbi, TFunctionName>> = {
|
5
|
+
functionName?: _FunctionName;
|
6
|
+
data: Hex;
|
7
|
+
} & (TFunctionName extends string ? {
|
8
|
+
abi: TAbi;
|
9
|
+
} & Partial<GetFunctionArgs<TAbi, TFunctionName>> : _FunctionName extends string ? {
|
10
|
+
abi: [TAbi[number]];
|
11
|
+
} & Partial<GetFunctionArgs<TAbi, _FunctionName>> : never);
|
12
|
+
export type DecodeFunctionResultReturnType<TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string | undefined = string, _FunctionName extends string = TAbi extends Abi ? Abi extends TAbi ? string : ExtractAbiFunctionNames<TAbi>[number] : string> = TFunctionName extends string ? ContractFunctionResult<TAbi, TFunctionName> : ContractFunctionResult<TAbi, _FunctionName>;
|
13
|
+
export declare function decodeFunctionResult<const TAbi extends Abi | readonly unknown[], TFunctionName extends string | undefined = undefined>({ abi, args, functionName, data, }: DecodeFunctionResultParameters<TAbi, TFunctionName>): DecodeFunctionResultReturnType<TAbi, TFunctionName>;
|
14
|
+
//# sourceMappingURL=decodeFunctionResult.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"decodeFunctionResult.d.ts","sourceRoot":"","sources":["../../../../src/utils/abi/decodeFunctionResult.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA;AAM3D,OAAO,KAAK,EAEV,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EAClB,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAO9C,MAAM,MAAM,8BAA8B,CACxC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,GAAG,EAC3C,aAAa,SAAS,MAAM,GAAG,SAAS,GAAG,MAAM,EACjD,aAAa,GAAG,iBAAiB,CAAC,IAAI,EAAE,aAAa,CAAC,IACpD;IACF,YAAY,CAAC,EAAE,aAAa,CAAA;IAC5B,IAAI,EAAE,GAAG,CAAA;CACV,GAAG,CAAC,aAAa,SAAS,MAAM,GAC7B;IAAE,GAAG,EAAE,IAAI,CAAA;CAAE,GAAG,OAAO,CAAC,eAAe,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,GAC7D,aAAa,SAAS,MAAM,GAC5B;IAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA;CAAE,GAAG,OAAO,CAAC,eAAe,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,GACvE,KAAK,CAAC,CAAA;AAEV,MAAM,MAAM,8BAA8B,CACxC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,GAAG,EAC3C,aAAa,SAAS,MAAM,GAAG,SAAS,GAAG,MAAM,EACjD,aAAa,SAAS,MAAM,GAAG,IAAI,SAAS,GAAG,GAC3C,GAAG,SAAS,IAAI,GACd,MAAM,GACN,uBAAuB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,GACvC,MAAM,IACR,aAAa,SAAS,MAAM,GAC5B,sBAAsB,CAAC,IAAI,EAAE,aAAa,CAAC,GAC3C,sBAAsB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAA;AAE/C,wBAAgB,oBAAoB,CAClC,KAAK,CAAC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,EAC3C,aAAa,SAAS,MAAM,GAAG,SAAS,GAAG,SAAS,EACpD,EACA,GAAG,EACH,IAAI,EACJ,YAAY,EACZ,IAAI,GACL,EAAE,8BAA8B,CAC/B,IAAI,EACJ,aAAa,CACd,GAAG,8BAA8B,CAAC,IAAI,EAAE,aAAa,CAAC,CAoBtD"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { AbiParameter, AbiParametersToPrimitiveTypes } from 'abitype';
|
2
|
+
import type { Hex } from '../../types/misc.js';
|
3
|
+
export type EncodeAbiParametersReturnType = Hex;
|
4
|
+
/**
|
5
|
+
* @description Encodes a list of primitive values into an ABI-encoded hex value.
|
6
|
+
*/
|
7
|
+
export declare function encodeAbiParameters<const TParams extends readonly AbiParameter[] | readonly unknown[]>(params: TParams, values: TParams extends readonly AbiParameter[] ? AbiParametersToPrimitiveTypes<TParams> : never): EncodeAbiParametersReturnType;
|
8
|
+
export declare function getArrayComponents(type: string): [length: number | null, innerType: string] | undefined;
|
9
|
+
//# sourceMappingURL=encodeAbiParameters.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"encodeAbiParameters.d.ts","sourceRoot":"","sources":["../../../../src/utils/abi/encodeAbiParameters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EAEZ,6BAA6B,EAC9B,MAAM,SAAS,CAAA;AAUhB,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAQ9C,MAAM,MAAM,6BAA6B,GAAG,GAAG,CAAA;AAE/C;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,CAAC,OAAO,SAAS,SAAS,YAAY,EAAE,GAAG,SAAS,OAAO,EAAE,EAElE,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,OAAO,SAAS,SAAS,YAAY,EAAE,GAC3C,6BAA6B,CAAC,OAAO,CAAC,GACtC,KAAK,GACR,6BAA6B,CAc/B;AA0OD,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,GACX,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,GAAG,SAAS,CAMxD"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { Abi } from 'abitype';
|
2
|
+
import type { GetConstructorArgs } from '../../types/contract.js';
|
3
|
+
import type { Hex } from '../../types/misc.js';
|
4
|
+
export type EncodeDeployDataParameters<TAbi extends Abi | readonly unknown[] = Abi> = {
|
5
|
+
abi: TAbi;
|
6
|
+
bytecode: Hex;
|
7
|
+
} & GetConstructorArgs<TAbi>;
|
8
|
+
export declare function encodeDeployData<const TAbi extends Abi | readonly unknown[]>({ abi, args, bytecode, }: EncodeDeployDataParameters<TAbi>): `0x${string}`;
|
9
|
+
//# sourceMappingURL=encodeDeployData.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"encodeDeployData.d.ts","sourceRoot":"","sources":["../../../../src/utils/abi/encodeDeployData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAMlC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AACjE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAO9C,MAAM,MAAM,0BAA0B,CACpC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,GAAG,IACzC;IACF,GAAG,EAAE,IAAI,CAAA;IACT,QAAQ,EAAE,GAAG,CAAA;CACd,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAA;AAE5B,wBAAgB,gBAAgB,CAAC,KAAK,CAAC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,EAAE,EAC5E,GAAG,EACH,IAAI,EACJ,QAAQ,GACT,EAAE,0BAA0B,CAAC,IAAI,CAAC,iBAiBlC"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { Abi } from 'abitype';
|
2
|
+
import type { GetErrorArgs, InferErrorName } from '../../types/contract.js';
|
3
|
+
export type EncodeErrorResultParameters<TAbi extends Abi | readonly unknown[] = Abi, TErrorName extends string | undefined = string, _ErrorName = InferErrorName<TAbi, TErrorName>> = {
|
4
|
+
errorName?: _ErrorName;
|
5
|
+
} & (TErrorName extends string ? {
|
6
|
+
abi: TAbi;
|
7
|
+
} & GetErrorArgs<TAbi, TErrorName> : _ErrorName extends string ? {
|
8
|
+
abi: [TAbi[number]];
|
9
|
+
} & GetErrorArgs<TAbi, _ErrorName> : never);
|
10
|
+
export declare function encodeErrorResult<const TAbi extends Abi | readonly unknown[], TErrorName extends string | undefined = undefined>({ abi, errorName, args }: EncodeErrorResultParameters<TAbi, TErrorName>): `0x${string}`;
|
11
|
+
//# sourceMappingURL=encodeErrorResult.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"encodeErrorResult.d.ts","sourceRoot":"","sources":["../../../../src/utils/abi/encodeErrorResult.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAMlC,OAAO,KAAK,EAEV,YAAY,EACZ,cAAc,EACf,MAAM,yBAAyB,CAAA;AAWhC,MAAM,MAAM,2BAA2B,CACrC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,GAAG,EAC3C,UAAU,SAAS,MAAM,GAAG,SAAS,GAAG,MAAM,EAC9C,UAAU,GAAG,cAAc,CAAC,IAAI,EAAE,UAAU,CAAC,IAC3C;IACF,SAAS,CAAC,EAAE,UAAU,CAAA;CACvB,GAAG,CAAC,UAAU,SAAS,MAAM,GAC1B;IAAE,GAAG,EAAE,IAAI,CAAA;CAAE,GAAG,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC,GAC9C,UAAU,SAAS,MAAM,GACzB;IAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA;CAAE,GAAG,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC,GACxD,KAAK,CAAC,CAAA;AAEV,wBAAgB,iBAAiB,CAC/B,KAAK,CAAC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,EAC3C,UAAU,SAAS,MAAM,GAAG,SAAS,GAAG,SAAS,EACjD,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,2BAA2B,CAAC,IAAI,EAAE,UAAU,CAAC,iBAwBxE"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import type { Abi } from 'abitype';
|
2
|
+
import type { GetEventArgs, InferEventName } from '../../types/contract.js';
|
3
|
+
export type EncodeEventTopicsParameters<TAbi extends Abi | readonly unknown[] = Abi, TEventName extends string | undefined = string, _EventName = InferEventName<TAbi, TEventName>> = {
|
4
|
+
eventName?: _EventName;
|
5
|
+
} & (TEventName extends string ? {
|
6
|
+
abi: TAbi;
|
7
|
+
args?: GetEventArgs<TAbi, TEventName>;
|
8
|
+
} : _EventName extends string ? {
|
9
|
+
abi: [TAbi[number]];
|
10
|
+
args?: GetEventArgs<TAbi, _EventName>;
|
11
|
+
} : never);
|
12
|
+
export declare function encodeEventTopics<const TAbi extends Abi | readonly unknown[], TEventName extends string | undefined = undefined>({ abi, eventName, args }: EncodeEventTopicsParameters<TAbi, TEventName>): `0x${string}`[];
|
13
|
+
//# sourceMappingURL=encodeEventTopics.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"encodeEventTopics.d.ts","sourceRoot":"","sources":["../../../../src/utils/abi/encodeEventTopics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAA6C,MAAM,SAAS,CAAA;AAI7E,OAAO,KAAK,EAGV,YAAY,EACZ,cAAc,EACf,MAAM,yBAAyB,CAAA;AAUhC,MAAM,MAAM,2BAA2B,CACrC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,GAAG,EAC3C,UAAU,SAAS,MAAM,GAAG,SAAS,GAAG,MAAM,EAC9C,UAAU,GAAG,cAAc,CAAC,IAAI,EAAE,UAAU,CAAC,IAC3C;IACF,SAAS,CAAC,EAAE,UAAU,CAAA;CACvB,GAAG,CAAC,UAAU,SAAS,MAAM,GAC1B;IAAE,GAAG,EAAE,IAAI,CAAC;IAAC,IAAI,CAAC,EAAE,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC,CAAA;CAAE,GACpD,UAAU,SAAS,MAAM,GACzB;IAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAAC,IAAI,CAAC,EAAE,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC,CAAA;CAAE,GAC9D,KAAK,CAAC,CAAA;AAEV,wBAAgB,iBAAiB,CAC/B,KAAK,CAAC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,EAC3C,UAAU,SAAS,MAAM,GAAG,SAAS,GAAG,SAAS,EACjD,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,2BAA2B,CAAC,IAAI,EAAE,UAAU,CAAC,mBA+CxE"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { Abi } from 'abitype';
|
2
|
+
import type { GetFunctionArgs, InferFunctionName } from '../../types/contract.js';
|
3
|
+
export type EncodeFunctionDataParameters<TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string | undefined = string, _FunctionName = InferFunctionName<TAbi, TFunctionName>> = {
|
4
|
+
functionName?: _FunctionName;
|
5
|
+
} & (TFunctionName extends string ? {
|
6
|
+
abi: TAbi;
|
7
|
+
} & GetFunctionArgs<TAbi, TFunctionName> : _FunctionName extends string ? {
|
8
|
+
abi: [TAbi[number]];
|
9
|
+
} & GetFunctionArgs<TAbi, _FunctionName> : never);
|
10
|
+
export declare function encodeFunctionData<const TAbi extends Abi | readonly unknown[], TFunctionName extends string | undefined = undefined>({ abi, args, functionName, }: EncodeFunctionDataParameters<TAbi, TFunctionName>): `0x${string}`;
|
11
|
+
//# sourceMappingURL=encodeFunctionData.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"encodeFunctionData.d.ts","sourceRoot":"","sources":["../../../../src/utils/abi/encodeFunctionData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAGlC,OAAO,KAAK,EAEV,eAAe,EACf,iBAAiB,EAClB,MAAM,yBAAyB,CAAA;AAQhC,MAAM,MAAM,4BAA4B,CACtC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,GAAG,EAC3C,aAAa,SAAS,MAAM,GAAG,SAAS,GAAG,MAAM,EACjD,aAAa,GAAG,iBAAiB,CAAC,IAAI,EAAE,aAAa,CAAC,IACpD;IACF,YAAY,CAAC,EAAE,aAAa,CAAA;CAC7B,GAAG,CAAC,aAAa,SAAS,MAAM,GAC7B;IAAE,GAAG,EAAE,IAAI,CAAA;CAAE,GAAG,eAAe,CAAC,IAAI,EAAE,aAAa,CAAC,GACpD,aAAa,SAAS,MAAM,GAC5B;IAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA;CAAE,GAAG,eAAe,CAAC,IAAI,EAAE,aAAa,CAAC,GAC9D,KAAK,CAAC,CAAA;AAEV,wBAAgB,kBAAkB,CAChC,KAAK,CAAC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,EAC3C,aAAa,SAAS,MAAM,GAAG,SAAS,GAAG,SAAS,EACpD,EACA,GAAG,EACH,IAAI,EACJ,YAAY,GACb,EAAE,4BAA4B,CAAC,IAAI,EAAE,aAAa,CAAC,iBA0BnD"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import type { Abi } from 'abitype';
|
2
|
+
import type { ContractFunctionResult, InferFunctionName } from '../../types/contract.js';
|
3
|
+
export type EncodeFunctionResultParameters<TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string | undefined = string, _FunctionName = InferFunctionName<TAbi, TFunctionName>> = {
|
4
|
+
functionName?: _FunctionName;
|
5
|
+
} & (TFunctionName extends string ? {
|
6
|
+
abi: TAbi;
|
7
|
+
result?: ContractFunctionResult<TAbi, TFunctionName>;
|
8
|
+
} : _FunctionName extends string ? {
|
9
|
+
abi: [TAbi[number]];
|
10
|
+
result?: ContractFunctionResult<TAbi, _FunctionName>;
|
11
|
+
} : never);
|
12
|
+
export declare function encodeFunctionResult<const TAbi extends Abi | readonly unknown[], TFunctionName extends string | undefined = undefined>({ abi, functionName, result, }: EncodeFunctionResultParameters<TAbi, TFunctionName>): `0x${string}`;
|
13
|
+
//# sourceMappingURL=encodeFunctionResult.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"encodeFunctionResult.d.ts","sourceRoot":"","sources":["../../../../src/utils/abi/encodeFunctionResult.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAMlC,OAAO,KAAK,EAEV,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,yBAAyB,CAAA;AAOhC,MAAM,MAAM,8BAA8B,CACxC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,GAAG,EAC3C,aAAa,SAAS,MAAM,GAAG,SAAS,GAAG,MAAM,EACjD,aAAa,GAAG,iBAAiB,CAAC,IAAI,EAAE,aAAa,CAAC,IACpD;IACF,YAAY,CAAC,EAAE,aAAa,CAAA;CAC7B,GAAG,CAAC,aAAa,SAAS,MAAM,GAC7B;IAAE,GAAG,EAAE,IAAI,CAAC;IAAC,MAAM,CAAC,EAAE,sBAAsB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAA;CAAE,GACnE,aAAa,SAAS,MAAM,GAC5B;IACE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA;IACnB,MAAM,CAAC,EAAE,sBAAsB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAA;CACrD,GACD,KAAK,CAAC,CAAA;AAEV,wBAAgB,oBAAoB,CAClC,KAAK,CAAC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,EAC3C,aAAa,SAAS,MAAM,GAAG,SAAS,GAAG,SAAS,EACpD,EACA,GAAG,EACH,YAAY,EACZ,MAAM,GACP,EAAE,8BAA8B,CAAC,IAAI,EAAE,aAAa,CAAC,iBAyBrD"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { AbiParameterToPrimitiveType, AbiType, SolidityAddress, SolidityArrayWithoutTuple, SolidityBool, SolidityBytes, SolidityInt, SolidityString } from 'abitype';
|
2
|
+
import type { Hex } from '../../types/misc.js';
|
3
|
+
type PackedAbiType = SolidityAddress | SolidityBool | SolidityBytes | SolidityInt | SolidityString | SolidityArrayWithoutTuple;
|
4
|
+
type EncodePackedValues<TPackedAbiTypes extends readonly PackedAbiType[] | readonly unknown[]> = {
|
5
|
+
[K in keyof TPackedAbiTypes]: TPackedAbiTypes[K] extends AbiType ? AbiParameterToPrimitiveType<{
|
6
|
+
type: TPackedAbiTypes[K];
|
7
|
+
}> : unknown;
|
8
|
+
};
|
9
|
+
export declare function encodePacked<const TPackedAbiTypes extends readonly PackedAbiType[] | readonly unknown[]>(types: TPackedAbiTypes, values: EncodePackedValues<TPackedAbiTypes>): Hex;
|
10
|
+
export {};
|
11
|
+
//# sourceMappingURL=encodePacked.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"encodePacked.d.ts","sourceRoot":"","sources":["../../../../src/utils/abi/encodePacked.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC3B,OAAO,EAEP,eAAe,EACf,yBAAyB,EACzB,YAAY,EACZ,aAAa,EACb,WAAW,EACX,cAAc,EACf,MAAM,SAAS,CAAA;AAQhB,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAO9C,KAAK,aAAa,GACd,eAAe,GACf,YAAY,GACZ,aAAa,GACb,WAAW,GACX,cAAc,GACd,yBAAyB,CAAA;AAE7B,KAAK,kBAAkB,CACrB,eAAe,SAAS,SAAS,aAAa,EAAE,GAAG,SAAS,OAAO,EAAE,IACnE;KACD,CAAC,IAAI,MAAM,eAAe,GAAG,eAAe,CAAC,CAAC,CAAC,SAAS,OAAO,GAC5D,2BAA2B,CAAC;QAAE,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,CAAA;KAAE,CAAC,GACzD,OAAO;CACZ,CAAA;AAED,wBAAgB,YAAY,CAC1B,KAAK,CAAC,eAAe,SAAS,SAAS,aAAa,EAAE,GAAG,SAAS,OAAO,EAAE,EAC3E,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,kBAAkB,CAAC,eAAe,CAAC,GAAG,GAAG,CAc1E"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { AbiParameter } from 'abitype';
|
2
|
+
import type { AbiItem } from '../../types/contract.js';
|
3
|
+
export declare function formatAbiItem(abiItem: AbiItem, { includeName }?: {
|
4
|
+
includeName?: boolean;
|
5
|
+
}): string;
|
6
|
+
export declare function formatAbiParams(params: readonly AbiParameter[] | undefined, { includeName }?: {
|
7
|
+
includeName?: boolean;
|
8
|
+
}): string;
|
9
|
+
//# sourceMappingURL=formatAbiItem.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"formatAbiItem.d.ts","sourceRoot":"","sources":["../../../../src/utils/abi/formatAbiItem.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAG3C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEtD,wBAAgB,aAAa,CAC3B,OAAO,EAAE,OAAO,EAChB,EAAE,WAAmB,EAAE,GAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAO,UAUxD;AAED,wBAAgB,eAAe,CAC7B,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,SAAS,EAC3C,EAAE,WAAmB,EAAE,GAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAO,GACtD,MAAM,CAKR"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import type { AbiItem } from '../../types/contract.js';
|
2
|
+
export declare function formatAbiItemWithArgs({ abiItem, args, includeFunctionName, includeName, }: {
|
3
|
+
abiItem: AbiItem;
|
4
|
+
args: readonly unknown[];
|
5
|
+
includeFunctionName?: boolean;
|
6
|
+
includeName?: boolean;
|
7
|
+
}): string | undefined;
|
8
|
+
//# sourceMappingURL=formatAbiItemWithArgs.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"formatAbiItemWithArgs.d.ts","sourceRoot":"","sources":["../../../../src/utils/abi/formatAbiItemWithArgs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGtD,wBAAgB,qBAAqB,CAAC,EACpC,OAAO,EACP,IAAI,EACJ,mBAA0B,EAC1B,WAAmB,GACpB,EAAE;IACD,OAAO,EAAE,OAAO,CAAA;IAChB,IAAI,EAAE,SAAS,OAAO,EAAE,CAAA;IACxB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,sBAYA"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import type { Abi, AbiParameter } from 'abitype';
|
2
|
+
import type { GetFunctionArgs, InferItemName } from '../../types/contract.js';
|
3
|
+
export type GetAbiItemParameters<TAbi extends Abi | readonly unknown[] = Abi, TItemName extends string = string> = {
|
4
|
+
abi: TAbi;
|
5
|
+
name: InferItemName<TAbi, TItemName>;
|
6
|
+
} & Partial<GetFunctionArgs<TAbi, TItemName>>;
|
7
|
+
export type GetAbiItemReturnType<TAbi extends Abi | readonly unknown[] = Abi, TItemName extends string = string> = Extract<TAbi[number], {
|
8
|
+
name: TItemName;
|
9
|
+
}>;
|
10
|
+
export declare function getAbiItem<const TAbi extends Abi | readonly unknown[], TItemName extends string>({ abi, args, name, }: GetAbiItemParameters<TAbi, TItemName>): GetAbiItemReturnType<TAbi, TItemName>;
|
11
|
+
export declare function isArgOfType(arg: unknown, abiParameter: AbiParameter): boolean;
|
12
|
+
//# sourceMappingURL=getAbiItem.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getAbiItem.d.ts","sourceRoot":"","sources":["../../../../src/utils/abi/getAbiItem.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,YAAY,EAAW,MAAM,SAAS,CAAA;AAEzD,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAG7E,MAAM,MAAM,oBAAoB,CAC9B,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,GAAG,EAC3C,SAAS,SAAS,MAAM,GAAG,MAAM,IAC/B;IACF,GAAG,EAAE,IAAI,CAAA;IACT,IAAI,EAAE,aAAa,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;CACrC,GAAG,OAAO,CAAC,eAAe,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAA;AAE7C,MAAM,MAAM,oBAAoB,CAC9B,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,GAAG,EAC3C,SAAS,SAAS,MAAM,GAAG,MAAM,IAC/B,OAAO,CACT,IAAI,CAAC,MAAM,CAAC,EACZ;IACE,IAAI,EAAE,SAAS,CAAA;CAChB,CACF,CAAA;AAED,wBAAgB,UAAU,CACxB,KAAK,CAAC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,EAC3C,SAAS,SAAS,MAAM,EACxB,EACA,GAAG,EACH,IAAS,EACT,IAAI,GACL,EAAE,oBAAoB,CAAC,IAAI,EAAE,SAAS,CAAC,GAAG,oBAAoB,CAC7D,IAAI,EACJ,SAAS,CACV,CAuBA;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,GAAG,OAAO,CAuD7E"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../../src/utils/accounts.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAA;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getAddress.d.ts","sourceRoot":"","sources":["../../../../src/utils/address/getAddress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAQtC,wBAAgB,eAAe,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAmB5E;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAGrE"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import type { Address } from 'abitype';
|
2
|
+
import type { ByteArray, Hex } from '../../types/misc.js';
|
3
|
+
export type GetCreateAddressOptions = {
|
4
|
+
from: Address;
|
5
|
+
nonce: bigint;
|
6
|
+
};
|
7
|
+
export type GetCreate2AddressOptions = {
|
8
|
+
bytecode: ByteArray | Hex;
|
9
|
+
from: Address;
|
10
|
+
salt: ByteArray | Hex;
|
11
|
+
};
|
12
|
+
export type GetContractAddressOptions = ({
|
13
|
+
opcode?: 'CREATE';
|
14
|
+
} & GetCreateAddressOptions) | ({
|
15
|
+
opcode: 'CREATE2';
|
16
|
+
} & GetCreate2AddressOptions);
|
17
|
+
export declare function getContractAddress(opts: GetContractAddressOptions): `0x${string}`;
|
18
|
+
export declare function getCreateAddress(opts: GetCreateAddressOptions): `0x${string}`;
|
19
|
+
export declare function getCreate2Address(opts: GetCreate2AddressOptions): `0x${string}`;
|
20
|
+
//# sourceMappingURL=getContractAddress.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getContractAddress.d.ts","sourceRoot":"","sources":["../../../../src/utils/address/getContractAddress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEtC,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAWzD,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,EAAE,SAAS,GAAG,GAAG,CAAA;IACzB,IAAI,EAAE,OAAO,CAAA;IACb,IAAI,EAAE,SAAS,GAAG,GAAG,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,yBAAyB,GACjC,CAAC;IACC,MAAM,CAAC,EAAE,QAAQ,CAAA;CAClB,GAAG,uBAAuB,CAAC,GAC5B,CAAC;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,GAAG,wBAAwB,CAAC,CAAA;AAEtD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,yBAAyB,iBAGjE;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,uBAAuB,iBAS7D;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,wBAAwB,iBAe/D"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"isAddress.d.ts","sourceRoot":"","sources":["../../../../src/utils/address/isAddress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAItC,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,IAAI,OAAO,CAE7D"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"isAddressEqual.d.ts","sourceRoot":"","sources":["../../../../src/utils/address/isAddressEqual.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAMtC,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,WAIpD"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
export declare const isDeterministicError: (error: Error) => boolean;
|
2
|
+
export declare function buildRequest<TRequest extends (args: any) => Promise<any>>(request: TRequest, { retryDelay, retryCount, }?: {
|
3
|
+
retryDelay?: number;
|
4
|
+
retryCount?: number;
|
5
|
+
}): TRequest;
|
6
|
+
//# sourceMappingURL=buildRequest.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"buildRequest.d.ts","sourceRoot":"","sources":["../../../src/utils/buildRequest.ts"],"names":[],"mappings":"AA6BA,eAAO,MAAM,oBAAoB,UAAW,KAAK,YAqBhD,CAAA;AAED,wBAAgB,YAAY,CAAC,QAAQ,SAAS,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,EACvE,OAAO,EAAE,QAAQ,EACjB,EACE,UAAgB,EAChB,UAAc,GACf,GAAE;IAED,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB,UAAU,CAAC,EAAE,MAAM,CAAA;CACf,YAuFP"}
|