superstack-wallet-sdk 0.4.2
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 +114 -0
- package/dist/esm/_virtual/_commonjsHelpers.js +2 -0
- package/dist/esm/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/esm/_virtual/_polyfill-node.buffer.js +2 -0
- package/dist/esm/_virtual/_polyfill-node.buffer.js.map +1 -0
- package/dist/esm/_virtual/index.js +2 -0
- package/dist/esm/_virtual/index.js.map +1 -0
- package/dist/esm/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js +2 -0
- package/dist/esm/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js.map +1 -0
- package/dist/esm/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js +2 -0
- package/dist/esm/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js.map +1 -0
- package/dist/esm/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js +2 -0
- package/dist/esm/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js.map +1 -0
- package/dist/esm/node_modules/@noble/hashes/esm/_md.js +2 -0
- package/dist/esm/node_modules/@noble/hashes/esm/_md.js.map +1 -0
- package/dist/esm/node_modules/@noble/hashes/esm/_u64.js +2 -0
- package/dist/esm/node_modules/@noble/hashes/esm/_u64.js.map +1 -0
- package/dist/esm/node_modules/@noble/hashes/esm/crypto.js +2 -0
- package/dist/esm/node_modules/@noble/hashes/esm/crypto.js.map +1 -0
- package/dist/esm/node_modules/@noble/hashes/esm/hmac.js +2 -0
- package/dist/esm/node_modules/@noble/hashes/esm/hmac.js.map +1 -0
- package/dist/esm/node_modules/@noble/hashes/esm/sha2.js +2 -0
- package/dist/esm/node_modules/@noble/hashes/esm/sha2.js.map +1 -0
- package/dist/esm/node_modules/@noble/hashes/esm/sha256.js +2 -0
- package/dist/esm/node_modules/@noble/hashes/esm/sha256.js.map +1 -0
- package/dist/esm/node_modules/@noble/hashes/esm/sha3.js +2 -0
- package/dist/esm/node_modules/@noble/hashes/esm/sha3.js.map +1 -0
- package/dist/esm/node_modules/@noble/hashes/esm/utils.js +4 -0
- package/dist/esm/node_modules/@noble/hashes/esm/utils.js.map +1 -0
- package/dist/esm/node_modules/@solana/wallet-adapter-base/lib/esm/adapter.js +2 -0
- package/dist/esm/node_modules/@solana/wallet-adapter-base/lib/esm/adapter.js.map +1 -0
- package/dist/esm/node_modules/@solana/wallet-adapter-base/lib/esm/errors.js +2 -0
- package/dist/esm/node_modules/@solana/wallet-adapter-base/lib/esm/errors.js.map +1 -0
- package/dist/esm/node_modules/@solana/wallet-adapter-base/lib/esm/signer.js +2 -0
- package/dist/esm/node_modules/@solana/wallet-adapter-base/lib/esm/signer.js.map +1 -0
- package/dist/esm/node_modules/@solana/wallet-adapter-base/lib/esm/transaction.js +2 -0
- package/dist/esm/node_modules/@solana/wallet-adapter-base/lib/esm/transaction.js.map +1 -0
- package/dist/esm/node_modules/abitype/dist/esm/errors.js +2 -0
- package/dist/esm/node_modules/abitype/dist/esm/errors.js.map +1 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/errors/abiItem.js +2 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/errors/abiItem.js.map +1 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/errors/abiParameter.js +2 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/errors/abiParameter.js.map +1 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/errors/signature.js +2 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/errors/signature.js.map +1 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/errors/splitParameters.js +2 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/errors/splitParameters.js.map +1 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/errors/struct.js +2 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/errors/struct.js.map +1 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/formatAbiItem.js +2 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/formatAbiItem.js.map +1 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js +2 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js.map +1 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js +2 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js.map +1 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/parseAbi.js +2 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/parseAbi.js.map +1 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/parseAbiItem.js +2 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/parseAbiItem.js.map +1 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/parseAbiParameters.js +2 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/parseAbiParameters.js.map +1 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/runtime/cache.js +2 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/runtime/cache.js.map +1 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/runtime/signatures.js +2 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/runtime/signatures.js.map +1 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/runtime/structs.js +2 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/runtime/structs.js.map +1 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/runtime/utils.js +2 -0
- package/dist/esm/node_modules/abitype/dist/esm/human-readable/runtime/utils.js.map +1 -0
- package/dist/esm/node_modules/abitype/dist/esm/regex.js +2 -0
- package/dist/esm/node_modules/abitype/dist/esm/regex.js.map +1 -0
- package/dist/esm/node_modules/abitype/dist/esm/version.js +2 -0
- package/dist/esm/node_modules/abitype/dist/esm/version.js.map +1 -0
- package/dist/esm/node_modules/ethers/lib.esm/_version.js +2 -0
- package/dist/esm/node_modules/ethers/lib.esm/_version.js.map +1 -0
- package/dist/esm/node_modules/ethers/lib.esm/utils/data.js +2 -0
- package/dist/esm/node_modules/ethers/lib.esm/utils/data.js.map +1 -0
- package/dist/esm/node_modules/ethers/lib.esm/utils/errors.js +2 -0
- package/dist/esm/node_modules/ethers/lib.esm/utils/errors.js.map +1 -0
- package/dist/esm/node_modules/ethers/lib.esm/utils/fixednumber.js +2 -0
- package/dist/esm/node_modules/ethers/lib.esm/utils/fixednumber.js.map +1 -0
- package/dist/esm/node_modules/ethers/lib.esm/utils/maths.js +2 -0
- package/dist/esm/node_modules/ethers/lib.esm/utils/maths.js.map +1 -0
- package/dist/esm/node_modules/ethers/lib.esm/utils/properties.js +2 -0
- package/dist/esm/node_modules/ethers/lib.esm/utils/properties.js.map +1 -0
- package/dist/esm/node_modules/ethers/lib.esm/utils/units.js +2 -0
- package/dist/esm/node_modules/ethers/lib.esm/utils/units.js.map +1 -0
- package/dist/esm/node_modules/eventemitter3/index.js +2 -0
- package/dist/esm/node_modules/eventemitter3/index.js.map +1 -0
- package/dist/esm/node_modules/eventemitter3/index2.js +2 -0
- package/dist/esm/node_modules/eventemitter3/index2.js.map +1 -0
- package/dist/esm/node_modules/ox/_esm/core/AbiConstructor.js +2 -0
- package/dist/esm/node_modules/ox/_esm/core/AbiConstructor.js.map +1 -0
- package/dist/esm/node_modules/ox/_esm/core/AbiFunction.js +2 -0
- package/dist/esm/node_modules/ox/_esm/core/AbiFunction.js.map +1 -0
- package/dist/esm/node_modules/ox/_esm/core/AbiItem.js +2 -0
- package/dist/esm/node_modules/ox/_esm/core/AbiItem.js.map +1 -0
- package/dist/esm/node_modules/ox/_esm/core/AbiParameters.js +2 -0
- package/dist/esm/node_modules/ox/_esm/core/AbiParameters.js.map +1 -0
- package/dist/esm/node_modules/ox/_esm/core/Address.js +2 -0
- package/dist/esm/node_modules/ox/_esm/core/Address.js.map +1 -0
- package/dist/esm/node_modules/ox/_esm/core/Authorization.js +2 -0
- package/dist/esm/node_modules/ox/_esm/core/Authorization.js.map +1 -0
- package/dist/esm/node_modules/ox/_esm/core/BlockOverrides.js +2 -0
- package/dist/esm/node_modules/ox/_esm/core/BlockOverrides.js.map +1 -0
- package/dist/esm/node_modules/ox/_esm/core/Bytes.js +2 -0
- package/dist/esm/node_modules/ox/_esm/core/Bytes.js.map +1 -0
- package/dist/esm/node_modules/ox/_esm/core/Caches.js +2 -0
- package/dist/esm/node_modules/ox/_esm/core/Caches.js.map +1 -0
- package/dist/esm/node_modules/ox/_esm/core/Errors.js +2 -0
- package/dist/esm/node_modules/ox/_esm/core/Errors.js.map +1 -0
- package/dist/esm/node_modules/ox/_esm/core/Hash.js +2 -0
- package/dist/esm/node_modules/ox/_esm/core/Hash.js.map +1 -0
- package/dist/esm/node_modules/ox/_esm/core/Hex.js +2 -0
- package/dist/esm/node_modules/ox/_esm/core/Hex.js.map +1 -0
- package/dist/esm/node_modules/ox/_esm/core/Json.js +2 -0
- package/dist/esm/node_modules/ox/_esm/core/Json.js.map +1 -0
- package/dist/esm/node_modules/ox/_esm/core/Signature.js +2 -0
- package/dist/esm/node_modules/ox/_esm/core/Signature.js.map +1 -0
- package/dist/esm/node_modules/ox/_esm/core/Solidity.js +2 -0
- package/dist/esm/node_modules/ox/_esm/core/Solidity.js.map +1 -0
- package/dist/esm/node_modules/ox/_esm/core/Withdrawal.js +2 -0
- package/dist/esm/node_modules/ox/_esm/core/Withdrawal.js.map +1 -0
- package/dist/esm/node_modules/ox/_esm/core/internal/abiItem.js +2 -0
- package/dist/esm/node_modules/ox/_esm/core/internal/abiItem.js.map +1 -0
- package/dist/esm/node_modules/ox/_esm/core/internal/abiParameters.js +2 -0
- package/dist/esm/node_modules/ox/_esm/core/internal/abiParameters.js.map +1 -0
- package/dist/esm/node_modules/ox/_esm/core/internal/bytes.js +2 -0
- package/dist/esm/node_modules/ox/_esm/core/internal/bytes.js.map +1 -0
- package/dist/esm/node_modules/ox/_esm/core/internal/cursor.js +2 -0
- package/dist/esm/node_modules/ox/_esm/core/internal/cursor.js.map +1 -0
- package/dist/esm/node_modules/ox/_esm/core/internal/errors.js +2 -0
- package/dist/esm/node_modules/ox/_esm/core/internal/errors.js.map +1 -0
- package/dist/esm/node_modules/ox/_esm/core/internal/hex.js +2 -0
- package/dist/esm/node_modules/ox/_esm/core/internal/hex.js.map +1 -0
- package/dist/esm/node_modules/ox/_esm/core/internal/lru.js +2 -0
- package/dist/esm/node_modules/ox/_esm/core/internal/lru.js.map +1 -0
- package/dist/esm/node_modules/ox/_esm/core/version.js +2 -0
- package/dist/esm/node_modules/ox/_esm/core/version.js.map +1 -0
- package/dist/esm/node_modules/ox/_esm/erc6492/SignatureErc6492.js +2 -0
- package/dist/esm/node_modules/ox/_esm/erc6492/SignatureErc6492.js.map +1 -0
- package/dist/esm/node_modules/ox/_esm/erc8010/SignatureErc8010.js +2 -0
- package/dist/esm/node_modules/ox/_esm/erc8010/SignatureErc8010.js.map +1 -0
- package/dist/esm/node_modules/styled-components/dist/styled-components.browser.esm.js +2 -0
- package/dist/esm/node_modules/styled-components/dist/styled-components.browser.esm.js.map +1 -0
- package/dist/esm/node_modules/stylis/src/Enum.js +2 -0
- package/dist/esm/node_modules/stylis/src/Enum.js.map +1 -0
- package/dist/esm/node_modules/stylis/src/Middleware.js +2 -0
- package/dist/esm/node_modules/stylis/src/Middleware.js.map +1 -0
- package/dist/esm/node_modules/stylis/src/Parser.js +2 -0
- package/dist/esm/node_modules/stylis/src/Parser.js.map +1 -0
- package/dist/esm/node_modules/stylis/src/Prefixer.js +2 -0
- package/dist/esm/node_modules/stylis/src/Prefixer.js.map +1 -0
- package/dist/esm/node_modules/stylis/src/Serializer.js +2 -0
- package/dist/esm/node_modules/stylis/src/Serializer.js.map +1 -0
- package/dist/esm/node_modules/stylis/src/Tokenizer.js +2 -0
- package/dist/esm/node_modules/stylis/src/Tokenizer.js.map +1 -0
- package/dist/esm/node_modules/stylis/src/Utility.js +2 -0
- package/dist/esm/node_modules/stylis/src/Utility.js.map +1 -0
- package/dist/esm/node_modules/tslib/tslib.es6.js +2 -0
- package/dist/esm/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/accounts/utils/parseAccount.js +2 -0
- package/dist/esm/node_modules/viem/_esm/accounts/utils/parseAccount.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/accounts/utils/publicKeyToAddress.js +2 -0
- package/dist/esm/node_modules/viem/_esm/accounts/utils/publicKeyToAddress.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/ens/getEnsAddress.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/ens/getEnsAddress.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/ens/getEnsAvatar.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/ens/getEnsAvatar.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/ens/getEnsName.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/ens/getEnsName.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/ens/getEnsResolver.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/ens/getEnsResolver.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/ens/getEnsText.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/ens/getEnsText.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/call.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/call.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/createAccessList.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/createAccessList.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/createBlockFilter.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/createBlockFilter.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/createContractEventFilter.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/createContractEventFilter.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/createEventFilter.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/createEventFilter.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/createPendingTransactionFilter.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/createPendingTransactionFilter.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/estimateContractGas.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/estimateContractGas.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/estimateFeesPerGas.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/estimateFeesPerGas.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/estimateGas.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/estimateGas.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/estimateMaxPriorityFeePerGas.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/estimateMaxPriorityFeePerGas.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getBalance.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getBalance.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getBlobBaseFee.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getBlobBaseFee.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getBlock.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getBlock.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getBlockNumber.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getBlockNumber.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getBlockTransactionCount.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getBlockTransactionCount.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getChainId.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getChainId.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getCode.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getCode.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getContractEvents.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getContractEvents.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getEip712Domain.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getEip712Domain.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getFeeHistory.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getFeeHistory.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getFilterChanges.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getFilterChanges.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getFilterLogs.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getFilterLogs.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getGasPrice.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getGasPrice.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getLogs.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getLogs.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getProof.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getProof.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getStorageAt.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getStorageAt.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getTransaction.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getTransaction.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getTransactionConfirmations.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getTransactionConfirmations.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getTransactionCount.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getTransactionCount.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getTransactionReceipt.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/getTransactionReceipt.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/multicall.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/multicall.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/readContract.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/readContract.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/simulateBlocks.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/simulateBlocks.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/simulateCalls.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/simulateCalls.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/simulateContract.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/simulateContract.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/uninstallFilter.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/uninstallFilter.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/verifyHash.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/verifyHash.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/verifyMessage.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/verifyMessage.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/verifyTypedData.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/verifyTypedData.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/waitForTransactionReceipt.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/waitForTransactionReceipt.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/watchBlockNumber.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/watchBlockNumber.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/watchBlocks.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/watchBlocks.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/watchContractEvent.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/watchContractEvent.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/watchEvent.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/watchEvent.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/watchPendingTransactions.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/public/watchPendingTransactions.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/siwe/verifySiweMessage.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/siwe/verifySiweMessage.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/wallet/prepareTransactionRequest.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/wallet/prepareTransactionRequest.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/actions/wallet/sendRawTransaction.js +2 -0
- package/dist/esm/node_modules/viem/_esm/actions/wallet/sendRawTransaction.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/clients/createClient.js +2 -0
- package/dist/esm/node_modules/viem/_esm/clients/createClient.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/clients/createPublicClient.js +2 -0
- package/dist/esm/node_modules/viem/_esm/clients/createPublicClient.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/clients/decorators/public.js +2 -0
- package/dist/esm/node_modules/viem/_esm/clients/decorators/public.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/clients/transports/createTransport.js +2 -0
- package/dist/esm/node_modules/viem/_esm/clients/transports/createTransport.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/clients/transports/http.js +2 -0
- package/dist/esm/node_modules/viem/_esm/clients/transports/http.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/constants/abis.js +2 -0
- package/dist/esm/node_modules/viem/_esm/constants/abis.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/constants/address.js +2 -0
- package/dist/esm/node_modules/viem/_esm/constants/address.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/constants/blob.js +2 -0
- package/dist/esm/node_modules/viem/_esm/constants/blob.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/constants/contract.js +2 -0
- package/dist/esm/node_modules/viem/_esm/constants/contract.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/constants/contracts.js +2 -0
- package/dist/esm/node_modules/viem/_esm/constants/contracts.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/constants/number.js +2 -0
- package/dist/esm/node_modules/viem/_esm/constants/number.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/constants/solidity.js +2 -0
- package/dist/esm/node_modules/viem/_esm/constants/solidity.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/constants/strings.js +2 -0
- package/dist/esm/node_modules/viem/_esm/constants/strings.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/constants/unit.js +2 -0
- package/dist/esm/node_modules/viem/_esm/constants/unit.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/errors/abi.js +2 -0
- package/dist/esm/node_modules/viem/_esm/errors/abi.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/errors/address.js +2 -0
- package/dist/esm/node_modules/viem/_esm/errors/address.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/errors/base.js +2 -0
- package/dist/esm/node_modules/viem/_esm/errors/base.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/errors/blob.js +2 -0
- package/dist/esm/node_modules/viem/_esm/errors/blob.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/errors/block.js +2 -0
- package/dist/esm/node_modules/viem/_esm/errors/block.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/errors/ccip.js +2 -0
- package/dist/esm/node_modules/viem/_esm/errors/ccip.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/errors/chain.js +2 -0
- package/dist/esm/node_modules/viem/_esm/errors/chain.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/errors/contract.js +2 -0
- package/dist/esm/node_modules/viem/_esm/errors/contract.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/errors/cursor.js +2 -0
- package/dist/esm/node_modules/viem/_esm/errors/cursor.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/errors/data.js +2 -0
- package/dist/esm/node_modules/viem/_esm/errors/data.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/errors/eip712.js +2 -0
- package/dist/esm/node_modules/viem/_esm/errors/eip712.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/errors/encoding.js +2 -0
- package/dist/esm/node_modules/viem/_esm/errors/encoding.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/errors/ens.js +2 -0
- package/dist/esm/node_modules/viem/_esm/errors/ens.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/errors/estimateGas.js +2 -0
- package/dist/esm/node_modules/viem/_esm/errors/estimateGas.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/errors/fee.js +2 -0
- package/dist/esm/node_modules/viem/_esm/errors/fee.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/errors/log.js +2 -0
- package/dist/esm/node_modules/viem/_esm/errors/log.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/errors/node.js +2 -0
- package/dist/esm/node_modules/viem/_esm/errors/node.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/errors/request.js +2 -0
- package/dist/esm/node_modules/viem/_esm/errors/request.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/errors/rpc.js +2 -0
- package/dist/esm/node_modules/viem/_esm/errors/rpc.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/errors/stateOverride.js +2 -0
- package/dist/esm/node_modules/viem/_esm/errors/stateOverride.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/errors/transaction.js +2 -0
- package/dist/esm/node_modules/viem/_esm/errors/transaction.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/errors/transport.js +2 -0
- package/dist/esm/node_modules/viem/_esm/errors/transport.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/errors/typedData.js +2 -0
- package/dist/esm/node_modules/viem/_esm/errors/typedData.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/errors/utils.js +2 -0
- package/dist/esm/node_modules/viem/_esm/errors/utils.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/errors/version.js +2 -0
- package/dist/esm/node_modules/viem/_esm/errors/version.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/decodeAbiParameters.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/decodeAbiParameters.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/decodeErrorResult.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/decodeErrorResult.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/decodeEventLog.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/decodeEventLog.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/decodeFunctionData.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/decodeFunctionData.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/decodeFunctionResult.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/decodeFunctionResult.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/encodeAbiParameters.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/encodeAbiParameters.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/encodeDeployData.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/encodeDeployData.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/encodeErrorResult.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/encodeErrorResult.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/encodeEventTopics.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/encodeEventTopics.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/encodeFunctionData.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/encodeFunctionData.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/encodeFunctionResult.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/encodeFunctionResult.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/formatAbiItem.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/formatAbiItem.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/formatAbiItemWithArgs.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/formatAbiItemWithArgs.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/getAbiItem.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/getAbiItem.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/parseEventLogs.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/parseEventLogs.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/prepareEncodeFunctionData.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/abi/prepareEncodeFunctionData.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/address/getAddress.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/address/getAddress.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/address/isAddress.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/address/isAddress.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/address/isAddressEqual.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/address/isAddressEqual.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/authorization/hashAuthorization.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/authorization/hashAuthorization.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/authorization/recoverAuthorizationAddress.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/authorization/recoverAuthorizationAddress.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/authorization/verifyAuthorization.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/authorization/verifyAuthorization.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/blob/blobsToCommitments.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/blob/blobsToCommitments.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/blob/blobsToProofs.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/blob/blobsToProofs.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/blob/toBlobSidecars.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/blob/toBlobSidecars.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/blob/toBlobs.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/blob/toBlobs.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/buildRequest.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/buildRequest.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/ccip.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/ccip.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/chain/getChainContractAddress.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/chain/getChainContractAddress.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/cursor.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/cursor.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/data/concat.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/data/concat.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/data/isHex.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/data/isHex.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/data/pad.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/data/pad.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/data/size.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/data/size.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/data/slice.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/data/slice.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/data/trim.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/data/trim.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/encoding/fromBytes.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/encoding/fromBytes.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/encoding/fromHex.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/encoding/fromHex.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/encoding/toBytes.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/encoding/toBytes.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/encoding/toHex.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/encoding/toHex.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/encoding/toRlp.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/encoding/toRlp.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/ens/avatar/parseAvatarRecord.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/ens/avatar/parseAvatarRecord.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/ens/avatar/utils.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/ens/avatar/utils.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/ens/encodeLabelhash.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/ens/encodeLabelhash.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/ens/encodedLabelToLabelhash.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/ens/encodedLabelToLabelhash.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/ens/errors.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/ens/errors.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/ens/labelhash.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/ens/labelhash.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/ens/localBatchGatewayRequest.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/ens/localBatchGatewayRequest.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/ens/namehash.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/ens/namehash.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/ens/packetToBytes.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/ens/packetToBytes.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/errors/getCallError.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/errors/getCallError.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/errors/getContractError.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/errors/getContractError.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/errors/getEstimateGasError.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/errors/getEstimateGasError.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/errors/getNodeError.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/errors/getNodeError.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/filters/createFilterRequestScope.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/filters/createFilterRequestScope.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/formatters/block.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/formatters/block.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/formatters/extract.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/formatters/extract.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/formatters/feeHistory.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/formatters/feeHistory.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/formatters/log.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/formatters/log.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/formatters/proof.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/formatters/proof.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/formatters/transaction.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/formatters/transaction.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/formatters/transactionReceipt.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/formatters/transactionReceipt.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/formatters/transactionRequest.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/formatters/transactionRequest.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/getAction.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/getAction.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/hash/hashSignature.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/hash/hashSignature.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/hash/keccak256.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/hash/keccak256.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/hash/normalizeSignature.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/hash/normalizeSignature.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/hash/sha256.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/hash/sha256.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/hash/toEventSelector.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/hash/toEventSelector.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/hash/toFunctionSelector.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/hash/toFunctionSelector.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/hash/toSignature.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/hash/toSignature.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/hash/toSignatureHash.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/hash/toSignatureHash.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/lru.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/lru.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/observe.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/observe.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/poll.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/poll.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/promise/createBatchScheduler.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/promise/createBatchScheduler.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/promise/withCache.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/promise/withCache.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/promise/withDedupe.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/promise/withDedupe.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/promise/withResolvers.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/promise/withResolvers.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/promise/withRetry.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/promise/withRetry.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/promise/withTimeout.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/promise/withTimeout.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/regex.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/regex.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/rpc/http.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/rpc/http.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/rpc/id.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/rpc/id.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/signature/hashMessage.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/signature/hashMessage.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/signature/hashTypedData.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/signature/hashTypedData.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/signature/recoverAddress.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/signature/recoverAddress.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/signature/recoverPublicKey.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/signature/recoverPublicKey.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/signature/serializeSignature.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/signature/serializeSignature.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/signature/toPrefixedMessage.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/signature/toPrefixedMessage.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/siwe/parseSiweMessage.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/siwe/parseSiweMessage.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/siwe/validateSiweMessage.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/siwe/validateSiweMessage.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/stateOverride.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/stateOverride.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/stringify.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/stringify.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/transaction/assertRequest.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/transaction/assertRequest.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/transaction/getTransactionType.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/transaction/getTransactionType.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/typedData.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/typedData.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/uid.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/uid.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/unit/formatEther.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/unit/formatEther.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/unit/formatGwei.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/unit/formatGwei.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/unit/formatUnits.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/unit/formatUnits.js.map +1 -0
- package/dist/esm/node_modules/viem/_esm/utils/wait.js +2 -0
- package/dist/esm/node_modules/viem/_esm/utils/wait.js.map +1 -0
- package/dist/esm/node_modules/viem/node_modules/@noble/curves/esm/_shortw_utils.js +3 -0
- package/dist/esm/node_modules/viem/node_modules/@noble/curves/esm/_shortw_utils.js.map +1 -0
- package/dist/esm/node_modules/viem/node_modules/@noble/curves/esm/abstract/curve.js +3 -0
- package/dist/esm/node_modules/viem/node_modules/@noble/curves/esm/abstract/curve.js.map +1 -0
- package/dist/esm/node_modules/viem/node_modules/@noble/curves/esm/abstract/modular.js +4 -0
- package/dist/esm/node_modules/viem/node_modules/@noble/curves/esm/abstract/modular.js.map +1 -0
- package/dist/esm/node_modules/viem/node_modules/@noble/curves/esm/abstract/utils.js +3 -0
- package/dist/esm/node_modules/viem/node_modules/@noble/curves/esm/abstract/utils.js.map +1 -0
- package/dist/esm/node_modules/viem/node_modules/@noble/curves/esm/abstract/weierstrass.js +4 -0
- package/dist/esm/node_modules/viem/node_modules/@noble/curves/esm/abstract/weierstrass.js.map +1 -0
- package/dist/esm/node_modules/viem/node_modules/@noble/curves/esm/secp256k1.js +3 -0
- package/dist/esm/node_modules/viem/node_modules/@noble/curves/esm/secp256k1.js.map +1 -0
- package/dist/esm/src/LoginModal.js +2 -0
- package/dist/esm/src/LoginModal.js.map +1 -0
- package/dist/esm/src/LoginModal.styles.js +286 -0
- package/dist/esm/src/LoginModal.styles.js.map +1 -0
- package/dist/esm/src/adapters/phantom.js +2 -0
- package/dist/esm/src/adapters/phantom.js.map +1 -0
- package/dist/esm/src/client.js +2 -0
- package/dist/esm/src/client.js.map +1 -0
- package/dist/esm/src/coinbase.js +2 -0
- package/dist/esm/src/coinbase.js.map +1 -0
- package/dist/esm/src/context.js +2 -0
- package/dist/esm/src/context.js.map +1 -0
- package/dist/esm/src/hooks.js +2 -0
- package/dist/esm/src/hooks.js.map +1 -0
- package/dist/esm/src/index.js +2 -0
- package/dist/esm/src/index.js.map +1 -0
- package/dist/esm/src/modal.js +2 -0
- package/dist/esm/src/modal.js.map +1 -0
- package/dist/esm/src/polyfills.js +2 -0
- package/dist/esm/src/polyfills.js.map +1 -0
- package/dist/esm/src/storage.js +2 -0
- package/dist/esm/src/storage.js.map +1 -0
- package/dist/esm/src/styles/index.js +2 -0
- package/dist/esm/src/styles/index.js.map +1 -0
- package/dist/esm/src/styles/theme.js +2 -0
- package/dist/esm/src/styles/theme.js.map +1 -0
- package/dist/esm/src/types.js +2 -0
- package/dist/esm/src/types.js.map +1 -0
- package/dist/esm/src/utils/coinbaseUtils.js +2 -0
- package/dist/esm/src/utils/coinbaseUtils.js.map +1 -0
- package/dist/esm/src/utils/oauth.js +2 -0
- package/dist/esm/src/utils/oauth.js.map +1 -0
- package/dist/esm/types/LoginModal.d.ts +3 -0
- package/dist/esm/types/LoginModal.styles.d.ts +29 -0
- package/dist/esm/types/adapters/phantom.d.ts +30 -0
- package/dist/esm/types/client.d.ts +170 -0
- package/dist/esm/types/coinbase.d.ts +3 -0
- package/dist/esm/types/context.d.ts +28 -0
- package/dist/esm/types/hooks.d.ts +56 -0
- package/dist/esm/types/index.d.ts +8 -0
- package/dist/esm/types/modal.d.ts +20 -0
- package/dist/esm/types/polyfills.d.ts +1 -0
- package/dist/esm/types/storage.d.ts +9 -0
- package/dist/esm/types/styles/globalStyles.d.ts +2 -0
- package/dist/esm/types/styles/index.d.ts +2 -0
- package/dist/esm/types/styles/theme.d.ts +103 -0
- package/dist/esm/types/types.d.ts +132 -0
- package/dist/esm/types/utils/coinbaseUtils.d.ts +9 -0
- package/dist/esm/types/utils/oauth.d.ts +21 -0
- package/dist/esm/types/utils/twitter.d.ts +35 -0
- package/dist/index.cjs +296 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +530 -0
- package/package.json +97 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slice.js","sources":["../../../../../../../node_modules/viem/_esm/utils/data/slice.js"],"sourcesContent":["import { SliceOffsetOutOfBoundsError, } from '../../errors/data.js';\nimport { isHex } from './isHex.js';\nimport { size } from './size.js';\n/**\n * @description Returns a section of the hex or byte array given a start/end bytes offset.\n *\n * @param value The hex or byte array to slice.\n * @param start The start offset (in bytes).\n * @param end The end offset (in bytes).\n */\nexport function slice(value, start, end, { strict } = {}) {\n if (isHex(value, { strict: false }))\n return sliceHex(value, start, end, {\n strict,\n });\n return sliceBytes(value, start, end, {\n strict,\n });\n}\nfunction assertStartOffset(value, start) {\n if (typeof start === 'number' && start > 0 && start > size(value) - 1)\n throw new SliceOffsetOutOfBoundsError({\n offset: start,\n position: 'start',\n size: size(value),\n });\n}\nfunction assertEndOffset(value, start, end) {\n if (typeof start === 'number' &&\n typeof end === 'number' &&\n size(value) !== end - start) {\n throw new SliceOffsetOutOfBoundsError({\n offset: end,\n position: 'end',\n size: size(value),\n });\n }\n}\n/**\n * @description Returns a section of the byte array given a start/end bytes offset.\n *\n * @param value The byte array to slice.\n * @param start The start offset (in bytes).\n * @param end The end offset (in bytes).\n */\nexport function sliceBytes(value_, start, end, { strict } = {}) {\n assertStartOffset(value_, start);\n const value = value_.slice(start, end);\n if (strict)\n assertEndOffset(value, start, end);\n return value;\n}\n/**\n * @description Returns a section of the hex value given a start/end bytes offset.\n *\n * @param value The hex value to slice.\n * @param start The start offset (in bytes).\n * @param end The end offset (in bytes).\n */\nexport function sliceHex(value_, start, end, { strict } = {}) {\n assertStartOffset(value_, start);\n const value = `0x${value_\n .replace('0x', '')\n .slice((start ?? 0) * 2, (end ?? value_.length) * 2)}`;\n if (strict)\n assertEndOffset(value, start, end);\n return value;\n}\n//# sourceMappingURL=slice.js.map"],"names":["slice","value","start","end","strict","isHex","sliceHex","sliceBytes","assertStartOffset","size","SliceOffsetOutOfBoundsError","offset","position","assertEndOffset","value_","replace","length"],"mappings":"uIAUO,SAASA,EAAMC,EAAOC,EAAOC,GAAKC,OAAEA,GAAW,IAClD,OAAIC,EAAMJ,EAAO,CAAEG,QAAQ,IAChBE,EAASL,EAAOC,EAAOC,EAAK,CAC/BC,WAEDG,EAAWN,EAAOC,EAAOC,EAAK,CACjCC,UAER,CACA,SAASI,EAAkBP,EAAOC,GAC9B,GAAqB,iBAAVA,GAAsBA,EAAQ,GAAKA,EAAQO,EAAKR,GAAS,EAChE,MAAM,IAAIS,EAA4B,CAClCC,OAAQT,EACRU,SAAU,QACVH,KAAMA,EAAKR,IAEvB,CACA,SAASY,EAAgBZ,EAAOC,EAAOC,GACnC,GAAqB,iBAAVD,GACQ,iBAARC,GACPM,EAAKR,KAAWE,EAAMD,EACtB,MAAM,IAAIQ,EAA4B,CAClCC,OAAQR,EACRS,SAAU,MACVH,KAAMA,EAAKR,IAGvB,CAQO,SAASM,EAAWO,EAAQZ,EAAOC,GAAKC,OAAEA,GAAW,IACxDI,EAAkBM,EAAQZ,GAC1B,MAAMD,EAAQa,EAAOd,MAAME,EAAOC,GAGlC,OAFIC,GACAS,EAAgBZ,EAAOC,EAAOC,GAC3BF,CACX,CAQO,SAASK,EAASQ,EAAQZ,EAAOC,GAAKC,OAAEA,GAAW,IACtDI,EAAkBM,EAAQZ,GAC1B,MAAMD,EAAQ,KAAKa,EACdC,QAAQ,KAAM,IACdf,MAAqB,GAAdE,GAAS,GAAiC,GAAxBC,GAAOW,EAAOE,WAG5C,OAFIZ,GACAS,EAAgBZ,EAAOC,EAAOC,GAC3BF,CACX","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function t(t,{dir:e="left"}={}){let l="string"==typeof t?t.replace("0x",""):t,n=0;for(let t=0;t<l.length-1&&"0"===l["left"===e?t:l.length-t-1].toString();t++)n++;return l="left"===e?l.slice(n):l.slice(0,l.length-n),"string"==typeof t?(1===l.length&&"right"===e&&(l=`${l}0`),`0x${l.length%2==1?`0${l}`:l}`):l}export{t as trim};
|
|
2
|
+
//# sourceMappingURL=trim.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trim.js","sources":["../../../../../../../node_modules/viem/_esm/utils/data/trim.js"],"sourcesContent":["export function trim(hexOrBytes, { dir = 'left' } = {}) {\n let data = typeof hexOrBytes === 'string' ? hexOrBytes.replace('0x', '') : hexOrBytes;\n let sliceLength = 0;\n for (let i = 0; i < data.length - 1; i++) {\n if (data[dir === 'left' ? i : data.length - i - 1].toString() === '0')\n sliceLength++;\n else\n break;\n }\n data =\n dir === 'left'\n ? data.slice(sliceLength)\n : data.slice(0, data.length - sliceLength);\n if (typeof hexOrBytes === 'string') {\n if (data.length === 1 && dir === 'right')\n data = `${data}0`;\n return `0x${data.length % 2 === 1 ? `0${data}` : data}`;\n }\n return data;\n}\n//# sourceMappingURL=trim.js.map"],"names":["trim","hexOrBytes","dir","data","replace","sliceLength","i","length","toString","slice"],"mappings":"AAAO,SAASA,EAAKC,GAAYC,IAAEA,EAAM,QAAW,CAAA,GAChD,IAAIC,EAA6B,iBAAfF,EAA0BA,EAAWG,QAAQ,KAAM,IAAMH,EACvEI,EAAc,EAClB,IAAK,IAAIC,EAAI,EAAGA,EAAIH,EAAKI,OAAS,GACoC,MAA9DJ,EAAa,SAARD,EAAiBI,EAAIH,EAAKI,OAASD,EAAI,GAAGE,WADlBF,IAE7BD,IAQR,OAJAF,EACY,SAARD,EACMC,EAAKM,MAAMJ,GACXF,EAAKM,MAAM,EAAGN,EAAKI,OAASF,GACZ,iBAAfJ,GACa,IAAhBE,EAAKI,QAAwB,UAARL,IACrBC,EAAO,GAAGA,MACP,KAAKA,EAAKI,OAAS,GAAM,EAAI,IAAIJ,IAASA,KAE9CA,CACX","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{InvalidBytesBooleanError as e}from"../../errors/encoding.js";import{trim as i}from"../data/trim.js";import{assertSize as o,hexToNumber as r,hexToBigInt as t}from"./fromHex.js";import{bytesToHex as n}from"./toHex.js";function s(e,i={}){void 0!==i.size&&o(e,{size:i.size});const r=n(e,i);return t(r,i)}function z(r,t={}){let n=r;if(void 0!==t.size&&(o(n,{size:t.size}),n=i(n)),n.length>1||n[0]>1)throw new e(n);return Boolean(n[0])}function d(e,i={}){void 0!==i.size&&o(e,{size:i.size});const t=n(e,i);return r(t,i)}function f(e,r={}){let t=e;return void 0!==r.size&&(o(t,{size:r.size}),t=i(t,{dir:"right"})),(new TextDecoder).decode(t)}export{s as bytesToBigInt,z as bytesToBool,d as bytesToNumber,f as bytesToString};
|
|
2
|
+
//# sourceMappingURL=fromBytes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fromBytes.js","sources":["../../../../../../../node_modules/viem/_esm/utils/encoding/fromBytes.js"],"sourcesContent":["import { InvalidBytesBooleanError } from '../../errors/encoding.js';\nimport { trim } from '../data/trim.js';\nimport { assertSize, hexToBigInt, hexToNumber, } from './fromHex.js';\nimport { bytesToHex } from './toHex.js';\n/**\n * Decodes a byte array into a UTF-8 string, hex value, number, bigint or boolean.\n *\n * - Docs: https://viem.sh/docs/utilities/fromBytes\n * - Example: https://viem.sh/docs/utilities/fromBytes#usage\n *\n * @param bytes Byte array to decode.\n * @param toOrOpts Type to convert to or options.\n * @returns Decoded value.\n *\n * @example\n * import { fromBytes } from 'viem'\n * const data = fromBytes(new Uint8Array([1, 164]), 'number')\n * // 420\n *\n * @example\n * import { fromBytes } from 'viem'\n * const data = fromBytes(\n * new Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33]),\n * 'string'\n * )\n * // 'Hello world'\n */\nexport function fromBytes(bytes, toOrOpts) {\n const opts = typeof toOrOpts === 'string' ? { to: toOrOpts } : toOrOpts;\n const to = opts.to;\n if (to === 'number')\n return bytesToNumber(bytes, opts);\n if (to === 'bigint')\n return bytesToBigInt(bytes, opts);\n if (to === 'boolean')\n return bytesToBool(bytes, opts);\n if (to === 'string')\n return bytesToString(bytes, opts);\n return bytesToHex(bytes, opts);\n}\n/**\n * Decodes a byte array into a bigint.\n *\n * - Docs: https://viem.sh/docs/utilities/fromBytes#bytestobigint\n *\n * @param bytes Byte array to decode.\n * @param opts Options.\n * @returns BigInt value.\n *\n * @example\n * import { bytesToBigInt } from 'viem'\n * const data = bytesToBigInt(new Uint8Array([1, 164]))\n * // 420n\n */\nexport function bytesToBigInt(bytes, opts = {}) {\n if (typeof opts.size !== 'undefined')\n assertSize(bytes, { size: opts.size });\n const hex = bytesToHex(bytes, opts);\n return hexToBigInt(hex, opts);\n}\n/**\n * Decodes a byte array into a boolean.\n *\n * - Docs: https://viem.sh/docs/utilities/fromBytes#bytestobool\n *\n * @param bytes Byte array to decode.\n * @param opts Options.\n * @returns Boolean value.\n *\n * @example\n * import { bytesToBool } from 'viem'\n * const data = bytesToBool(new Uint8Array([1]))\n * // true\n */\nexport function bytesToBool(bytes_, opts = {}) {\n let bytes = bytes_;\n if (typeof opts.size !== 'undefined') {\n assertSize(bytes, { size: opts.size });\n bytes = trim(bytes);\n }\n if (bytes.length > 1 || bytes[0] > 1)\n throw new InvalidBytesBooleanError(bytes);\n return Boolean(bytes[0]);\n}\n/**\n * Decodes a byte array into a number.\n *\n * - Docs: https://viem.sh/docs/utilities/fromBytes#bytestonumber\n *\n * @param bytes Byte array to decode.\n * @param opts Options.\n * @returns Number value.\n *\n * @example\n * import { bytesToNumber } from 'viem'\n * const data = bytesToNumber(new Uint8Array([1, 164]))\n * // 420\n */\nexport function bytesToNumber(bytes, opts = {}) {\n if (typeof opts.size !== 'undefined')\n assertSize(bytes, { size: opts.size });\n const hex = bytesToHex(bytes, opts);\n return hexToNumber(hex, opts);\n}\n/**\n * Decodes a byte array into a UTF-8 string.\n *\n * - Docs: https://viem.sh/docs/utilities/fromBytes#bytestostring\n *\n * @param bytes Byte array to decode.\n * @param opts Options.\n * @returns String value.\n *\n * @example\n * import { bytesToString } from 'viem'\n * const data = bytesToString(new Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33]))\n * // 'Hello world'\n */\nexport function bytesToString(bytes_, opts = {}) {\n let bytes = bytes_;\n if (typeof opts.size !== 'undefined') {\n assertSize(bytes, { size: opts.size });\n bytes = trim(bytes, { dir: 'right' });\n }\n return new TextDecoder().decode(bytes);\n}\n//# sourceMappingURL=fromBytes.js.map"],"names":["bytesToBigInt","bytes","opts","size","assertSize","hex","bytesToHex","hexToBigInt","bytesToBool","bytes_","trim","length","InvalidBytesBooleanError","Boolean","bytesToNumber","hexToNumber","bytesToString","dir","TextDecoder","decode"],"mappings":"+NAsDO,SAASA,EAAcC,EAAOC,EAAO,SACf,IAAdA,EAAKC,MACZC,EAAWH,EAAO,CAAEE,KAAMD,EAAKC,OACnC,MAAME,EAAMC,EAAWL,EAAOC,GAC9B,OAAOK,EAAYF,EAAKH,EAC5B,CAeO,SAASM,EAAYC,EAAQP,EAAO,IACvC,IAAID,EAAQQ,EAKZ,QAJyB,IAAdP,EAAKC,OACZC,EAAWH,EAAO,CAAEE,KAAMD,EAAKC,OAC/BF,EAAQS,EAAKT,IAEbA,EAAMU,OAAS,GAAKV,EAAM,GAAK,EAC/B,MAAM,IAAIW,EAAyBX,GACvC,OAAOY,QAAQZ,EAAM,GACzB,CAeO,SAASa,EAAcb,EAAOC,EAAO,SACf,IAAdA,EAAKC,MACZC,EAAWH,EAAO,CAAEE,KAAMD,EAAKC,OACnC,MAAME,EAAMC,EAAWL,EAAOC,GAC9B,OAAOa,EAAYV,EAAKH,EAC5B,CAeO,SAASc,EAAcP,EAAQP,EAAO,IACzC,IAAID,EAAQQ,EAKZ,YAJyB,IAAdP,EAAKC,OACZC,EAAWH,EAAO,CAAEE,KAAMD,EAAKC,OAC/BF,EAAQS,EAAKT,EAAO,CAAEgB,IAAK,YAExB,IAAIC,aAAcC,OAAOlB,EACpC","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{SizeOverflowError as n,InvalidHexBooleanError as i}from"../../errors/encoding.js";import{size as t}from"../data/size.js";import{trim as e}from"../data/trim.js";function r(i,{size:e}){if(t(i)>e)throw new n({givenSize:t(i),maxSize:e})}function o(n,i={}){const{signed:t}=i;i.size&&r(n,{size:i.size});const e=BigInt(n);if(!t)return e;const o=(n.length-2)/2;return e<=(1n<<8n*BigInt(o)-1n)-1n?e:e-BigInt(`0x${"f".padStart(2*o,"f")}`)-1n}function s(n,t={}){let o=n;if(t.size&&(r(o,{size:t.size}),o=e(o)),"0x00"===e(o))return!1;if("0x01"===e(o))return!0;throw new i(o)}function f(n,i={}){return Number(o(n,i))}export{r as assertSize,o as hexToBigInt,s as hexToBool,f as hexToNumber};
|
|
2
|
+
//# sourceMappingURL=fromHex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fromHex.js","sources":["../../../../../../../node_modules/viem/_esm/utils/encoding/fromHex.js"],"sourcesContent":["import { InvalidHexBooleanError, SizeOverflowError, } from '../../errors/encoding.js';\nimport { size as size_ } from '../data/size.js';\nimport { trim } from '../data/trim.js';\nimport { hexToBytes } from './toBytes.js';\nexport function assertSize(hexOrBytes, { size }) {\n if (size_(hexOrBytes) > size)\n throw new SizeOverflowError({\n givenSize: size_(hexOrBytes),\n maxSize: size,\n });\n}\n/**\n * Decodes a hex string into a string, number, bigint, boolean, or byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/fromHex\n * - Example: https://viem.sh/docs/utilities/fromHex#usage\n *\n * @param hex Hex string to decode.\n * @param toOrOpts Type to convert to or options.\n * @returns Decoded value.\n *\n * @example\n * import { fromHex } from 'viem'\n * const data = fromHex('0x1a4', 'number')\n * // 420\n *\n * @example\n * import { fromHex } from 'viem'\n * const data = fromHex('0x48656c6c6f20576f726c6421', 'string')\n * // 'Hello world'\n *\n * @example\n * import { fromHex } from 'viem'\n * const data = fromHex('0x48656c6c6f20576f726c64210000000000000000000000000000000000000000', {\n * size: 32,\n * to: 'string'\n * })\n * // 'Hello world'\n */\nexport function fromHex(hex, toOrOpts) {\n const opts = typeof toOrOpts === 'string' ? { to: toOrOpts } : toOrOpts;\n const to = opts.to;\n if (to === 'number')\n return hexToNumber(hex, opts);\n if (to === 'bigint')\n return hexToBigInt(hex, opts);\n if (to === 'string')\n return hexToString(hex, opts);\n if (to === 'boolean')\n return hexToBool(hex, opts);\n return hexToBytes(hex, opts);\n}\n/**\n * Decodes a hex value into a bigint.\n *\n * - Docs: https://viem.sh/docs/utilities/fromHex#hextobigint\n *\n * @param hex Hex value to decode.\n * @param opts Options.\n * @returns BigInt value.\n *\n * @example\n * import { hexToBigInt } from 'viem'\n * const data = hexToBigInt('0x1a4', { signed: true })\n * // 420n\n *\n * @example\n * import { hexToBigInt } from 'viem'\n * const data = hexToBigInt('0x00000000000000000000000000000000000000000000000000000000000001a4', { size: 32 })\n * // 420n\n */\nexport function hexToBigInt(hex, opts = {}) {\n const { signed } = opts;\n if (opts.size)\n assertSize(hex, { size: opts.size });\n const value = BigInt(hex);\n if (!signed)\n return value;\n const size = (hex.length - 2) / 2;\n const max = (1n << (BigInt(size) * 8n - 1n)) - 1n;\n if (value <= max)\n return value;\n return value - BigInt(`0x${'f'.padStart(size * 2, 'f')}`) - 1n;\n}\n/**\n * Decodes a hex value into a boolean.\n *\n * - Docs: https://viem.sh/docs/utilities/fromHex#hextobool\n *\n * @param hex Hex value to decode.\n * @param opts Options.\n * @returns Boolean value.\n *\n * @example\n * import { hexToBool } from 'viem'\n * const data = hexToBool('0x01')\n * // true\n *\n * @example\n * import { hexToBool } from 'viem'\n * const data = hexToBool('0x0000000000000000000000000000000000000000000000000000000000000001', { size: 32 })\n * // true\n */\nexport function hexToBool(hex_, opts = {}) {\n let hex = hex_;\n if (opts.size) {\n assertSize(hex, { size: opts.size });\n hex = trim(hex);\n }\n if (trim(hex) === '0x00')\n return false;\n if (trim(hex) === '0x01')\n return true;\n throw new InvalidHexBooleanError(hex);\n}\n/**\n * Decodes a hex string into a number.\n *\n * - Docs: https://viem.sh/docs/utilities/fromHex#hextonumber\n *\n * @param hex Hex value to decode.\n * @param opts Options.\n * @returns Number value.\n *\n * @example\n * import { hexToNumber } from 'viem'\n * const data = hexToNumber('0x1a4')\n * // 420\n *\n * @example\n * import { hexToNumber } from 'viem'\n * const data = hexToBigInt('0x00000000000000000000000000000000000000000000000000000000000001a4', { size: 32 })\n * // 420\n */\nexport function hexToNumber(hex, opts = {}) {\n return Number(hexToBigInt(hex, opts));\n}\n/**\n * Decodes a hex value into a UTF-8 string.\n *\n * - Docs: https://viem.sh/docs/utilities/fromHex#hextostring\n *\n * @param hex Hex value to decode.\n * @param opts Options.\n * @returns String value.\n *\n * @example\n * import { hexToString } from 'viem'\n * const data = hexToString('0x48656c6c6f20576f726c6421')\n * // 'Hello world!'\n *\n * @example\n * import { hexToString } from 'viem'\n * const data = hexToString('0x48656c6c6f20576f726c64210000000000000000000000000000000000000000', {\n * size: 32,\n * })\n * // 'Hello world'\n */\nexport function hexToString(hex, opts = {}) {\n let bytes = hexToBytes(hex);\n if (opts.size) {\n assertSize(bytes, { size: opts.size });\n bytes = trim(bytes, { dir: 'right' });\n }\n return new TextDecoder().decode(bytes);\n}\n//# sourceMappingURL=fromHex.js.map"],"names":["assertSize","hexOrBytes","size","size_","SizeOverflowError","givenSize","maxSize","hexToBigInt","hex","opts","signed","value","BigInt","length","padStart","hexToBool","hex_","trim","InvalidHexBooleanError","hexToNumber","Number"],"mappings":"uKAIO,SAASA,EAAWC,GAAYC,KAAEA,IACrC,GAAIC,EAAMF,GAAcC,EACpB,MAAM,IAAIE,EAAkB,CACxBC,UAAWF,EAAMF,GACjBK,QAASJ,GAErB,CA6DO,SAASK,EAAYC,EAAKC,EAAO,IACpC,MAAMC,OAAEA,GAAWD,EACfA,EAAKP,MACLF,EAAWQ,EAAK,CAAEN,KAAMO,EAAKP,OACjC,MAAMS,EAAQC,OAAOJ,GACrB,IAAKE,EACD,OAAOC,EACX,MAAMT,GAAQM,EAAIK,OAAS,GAAK,EAEhC,OAAIF,IADS,IAAsB,GAAfC,OAAOV,GAAa,IAAO,GAEpCS,EACJA,EAAQC,OAAO,KAAK,IAAIE,SAAgB,EAAPZ,EAAU,QAAU,EAChE,CAoBO,SAASa,EAAUC,EAAMP,EAAO,IACnC,IAAID,EAAMQ,EAKV,GAJIP,EAAKP,OACLF,EAAWQ,EAAK,CAAEN,KAAMO,EAAKP,OAC7BM,EAAMS,EAAKT,IAEG,SAAdS,EAAKT,GACL,OAAO,EACX,GAAkB,SAAdS,EAAKT,GACL,OAAO,EACX,MAAM,IAAIU,EAAuBV,EACrC,CAoBO,SAASW,EAAYX,EAAKC,EAAO,IACpC,OAAOW,OAAOb,EAAYC,EAAKC,GACnC","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{BaseError as e}from"../../errors/base.js";import{isHex as r}from"../data/isHex.js";import{pad as t}from"../data/pad.js";import{assertSize as n}from"./fromHex.js";import{numberToHex as o}from"./toHex.js";const i=new TextEncoder;function s(e,t={}){return"number"==typeof e||"bigint"==typeof e?a(e,t):"boolean"==typeof e?f(e,t):r(e)?u(e,t):m(e,t)}function f(e,r={}){const o=new Uint8Array(1);return o[0]=Number(e),"number"==typeof r.size?(n(o,{size:r.size}),t(o,{size:r.size})):o}const c={zero:48,nine:57,A:65,F:70,a:97,f:102};function z(e){return e>=c.zero&&e<=c.nine?e-c.zero:e>=c.A&&e<=c.F?e-(c.A-10):e>=c.a&&e<=c.f?e-(c.a-10):void 0}function u(r,o={}){let i=r;o.size&&(n(i,{size:o.size}),i=t(i,{dir:"right",size:o.size}));let s=i.slice(2);s.length%2&&(s=`0${s}`);const f=s.length/2,c=new Uint8Array(f);for(let r=0,t=0;r<f;r++){const n=z(s.charCodeAt(t++)),o=z(s.charCodeAt(t++));if(void 0===n||void 0===o)throw new e(`Invalid byte sequence ("${s[t-2]}${s[t-1]}" in "${s}").`);c[r]=16*n+o}return c}function a(e,r){return u(o(e,r))}function m(e,r={}){const o=i.encode(e);return"number"==typeof r.size?(n(o,{size:r.size}),t(o,{dir:"right",size:r.size})):o}export{f as boolToBytes,u as hexToBytes,a as numberToBytes,m as stringToBytes,s as toBytes};
|
|
2
|
+
//# sourceMappingURL=toBytes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toBytes.js","sources":["../../../../../../../node_modules/viem/_esm/utils/encoding/toBytes.js"],"sourcesContent":["import { BaseError } from '../../errors/base.js';\nimport { isHex } from '../data/isHex.js';\nimport { pad } from '../data/pad.js';\nimport { assertSize } from './fromHex.js';\nimport { numberToHex, } from './toHex.js';\nconst encoder = /*#__PURE__*/ new TextEncoder();\n/**\n * Encodes a UTF-8 string, hex value, bigint, number or boolean to a byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/toBytes\n * - Example: https://viem.sh/docs/utilities/toBytes#usage\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Byte array value.\n *\n * @example\n * import { toBytes } from 'viem'\n * const data = toBytes('Hello world')\n * // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33])\n *\n * @example\n * import { toBytes } from 'viem'\n * const data = toBytes(420)\n * // Uint8Array([1, 164])\n *\n * @example\n * import { toBytes } from 'viem'\n * const data = toBytes(420, { size: 4 })\n * // Uint8Array([0, 0, 1, 164])\n */\nexport function toBytes(value, opts = {}) {\n if (typeof value === 'number' || typeof value === 'bigint')\n return numberToBytes(value, opts);\n if (typeof value === 'boolean')\n return boolToBytes(value, opts);\n if (isHex(value))\n return hexToBytes(value, opts);\n return stringToBytes(value, opts);\n}\n/**\n * Encodes a boolean into a byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/toBytes#booltobytes\n *\n * @param value Boolean value to encode.\n * @param opts Options.\n * @returns Byte array value.\n *\n * @example\n * import { boolToBytes } from 'viem'\n * const data = boolToBytes(true)\n * // Uint8Array([1])\n *\n * @example\n * import { boolToBytes } from 'viem'\n * const data = boolToBytes(true, { size: 32 })\n * // Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1])\n */\nexport function boolToBytes(value, opts = {}) {\n const bytes = new Uint8Array(1);\n bytes[0] = Number(value);\n if (typeof opts.size === 'number') {\n assertSize(bytes, { size: opts.size });\n return pad(bytes, { size: opts.size });\n }\n return bytes;\n}\n// We use very optimized technique to convert hex string to byte array\nconst charCodeMap = {\n zero: 48,\n nine: 57,\n A: 65,\n F: 70,\n a: 97,\n f: 102,\n};\nfunction charCodeToBase16(char) {\n if (char >= charCodeMap.zero && char <= charCodeMap.nine)\n return char - charCodeMap.zero;\n if (char >= charCodeMap.A && char <= charCodeMap.F)\n return char - (charCodeMap.A - 10);\n if (char >= charCodeMap.a && char <= charCodeMap.f)\n return char - (charCodeMap.a - 10);\n return undefined;\n}\n/**\n * Encodes a hex string into a byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/toBytes#hextobytes\n *\n * @param hex Hex string to encode.\n * @param opts Options.\n * @returns Byte array value.\n *\n * @example\n * import { hexToBytes } from 'viem'\n * const data = hexToBytes('0x48656c6c6f20776f726c6421')\n * // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33])\n *\n * @example\n * import { hexToBytes } from 'viem'\n * const data = hexToBytes('0x48656c6c6f20776f726c6421', { size: 32 })\n * // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])\n */\nexport function hexToBytes(hex_, opts = {}) {\n let hex = hex_;\n if (opts.size) {\n assertSize(hex, { size: opts.size });\n hex = pad(hex, { dir: 'right', size: opts.size });\n }\n let hexString = hex.slice(2);\n if (hexString.length % 2)\n hexString = `0${hexString}`;\n const length = hexString.length / 2;\n const bytes = new Uint8Array(length);\n for (let index = 0, j = 0; index < length; index++) {\n const nibbleLeft = charCodeToBase16(hexString.charCodeAt(j++));\n const nibbleRight = charCodeToBase16(hexString.charCodeAt(j++));\n if (nibbleLeft === undefined || nibbleRight === undefined) {\n throw new BaseError(`Invalid byte sequence (\"${hexString[j - 2]}${hexString[j - 1]}\" in \"${hexString}\").`);\n }\n bytes[index] = nibbleLeft * 16 + nibbleRight;\n }\n return bytes;\n}\n/**\n * Encodes a number into a byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/toBytes#numbertobytes\n *\n * @param value Number to encode.\n * @param opts Options.\n * @returns Byte array value.\n *\n * @example\n * import { numberToBytes } from 'viem'\n * const data = numberToBytes(420)\n * // Uint8Array([1, 164])\n *\n * @example\n * import { numberToBytes } from 'viem'\n * const data = numberToBytes(420, { size: 4 })\n * // Uint8Array([0, 0, 1, 164])\n */\nexport function numberToBytes(value, opts) {\n const hex = numberToHex(value, opts);\n return hexToBytes(hex);\n}\n/**\n * Encodes a UTF-8 string into a byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/toBytes#stringtobytes\n *\n * @param value String to encode.\n * @param opts Options.\n * @returns Byte array value.\n *\n * @example\n * import { stringToBytes } from 'viem'\n * const data = stringToBytes('Hello world!')\n * // Uint8Array([72, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100, 33])\n *\n * @example\n * import { stringToBytes } from 'viem'\n * const data = stringToBytes('Hello world!', { size: 32 })\n * // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])\n */\nexport function stringToBytes(value, opts = {}) {\n const bytes = encoder.encode(value);\n if (typeof opts.size === 'number') {\n assertSize(bytes, { size: opts.size });\n return pad(bytes, { dir: 'right', size: opts.size });\n }\n return bytes;\n}\n//# sourceMappingURL=toBytes.js.map"],"names":["encoder","TextEncoder","toBytes","value","opts","numberToBytes","boolToBytes","isHex","hexToBytes","stringToBytes","bytes","Uint8Array","Number","size","assertSize","pad","charCodeMap","zero","nine","A","F","a","f","charCodeToBase16","char","hex_","hex","dir","hexString","slice","length","index","j","nibbleLeft","charCodeAt","nibbleRight","undefined","BaseError","numberToHex","encode"],"mappings":"kNAKA,MAAMA,EAAwB,IAAIC,YA0B3B,SAASC,EAAQC,EAAOC,EAAO,IAClC,MAAqB,iBAAVD,GAAuC,iBAAVA,EAC7BE,EAAcF,EAAOC,GACX,kBAAVD,EACAG,EAAYH,EAAOC,GAC1BG,EAAMJ,GACCK,EAAWL,EAAOC,GACtBK,EAAcN,EAAOC,EAChC,CAoBO,SAASE,EAAYH,EAAOC,EAAO,IACtC,MAAMM,EAAQ,IAAIC,WAAW,GAE7B,OADAD,EAAM,GAAKE,OAAOT,GACO,iBAAdC,EAAKS,MACZC,EAAWJ,EAAO,CAAEG,KAAMT,EAAKS,OACxBE,EAAIL,EAAO,CAAEG,KAAMT,EAAKS,QAE5BH,CACX,CAEA,MAAMM,EAAc,CAChBC,KAAM,GACNC,KAAM,GACNC,EAAG,GACHC,EAAG,GACHC,EAAG,GACHC,EAAG,KAEP,SAASC,EAAiBC,GACtB,OAAIA,GAAQR,EAAYC,MAAQO,GAAQR,EAAYE,KACzCM,EAAOR,EAAYC,KAC1BO,GAAQR,EAAYG,GAAKK,GAAQR,EAAYI,EACtCI,GAAQR,EAAYG,EAAI,IAC/BK,GAAQR,EAAYK,GAAKG,GAAQR,EAAYM,EACtCE,GAAQR,EAAYK,EAAI,SADnC,CAGJ,CAoBO,SAASb,EAAWiB,EAAMrB,EAAO,IACpC,IAAIsB,EAAMD,EACNrB,EAAKS,OACLC,EAAWY,EAAK,CAAEb,KAAMT,EAAKS,OAC7Ba,EAAMX,EAAIW,EAAK,CAAEC,IAAK,QAASd,KAAMT,EAAKS,QAE9C,IAAIe,EAAYF,EAAIG,MAAM,GACtBD,EAAUE,OAAS,IACnBF,EAAY,IAAIA,KACpB,MAAME,EAASF,EAAUE,OAAS,EAC5BpB,EAAQ,IAAIC,WAAWmB,GAC7B,IAAK,IAAIC,EAAQ,EAAGC,EAAI,EAAGD,EAAQD,EAAQC,IAAS,CAChD,MAAME,EAAaV,EAAiBK,EAAUM,WAAWF,MACnDG,EAAcZ,EAAiBK,EAAUM,WAAWF,MAC1D,QAAmBI,IAAfH,QAA4CG,IAAhBD,EAC5B,MAAM,IAAIE,EAAU,2BAA2BT,EAAUI,EAAI,KAAKJ,EAAUI,EAAI,WAAWJ,QAE/FlB,EAAMqB,GAAsB,GAAbE,EAAkBE,CACrC,CACA,OAAOzB,CACX,CAoBO,SAASL,EAAcF,EAAOC,GAEjC,OAAOI,EADK8B,EAAYnC,EAAOC,GAEnC,CAoBO,SAASK,EAAcN,EAAOC,EAAO,IACxC,MAAMM,EAAQV,EAAQuC,OAAOpC,GAC7B,MAAyB,iBAAdC,EAAKS,MACZC,EAAWJ,EAAO,CAAEG,KAAMT,EAAKS,OACxBE,EAAIL,EAAO,CAAEiB,IAAK,QAASd,KAAMT,EAAKS,QAE1CH,CACX","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{IntegerOutOfRangeError as n}from"../../errors/encoding.js";import{pad as t}from"../data/pad.js";import{assertSize as e}from"./fromHex.js";const i=Array.from({length:256},(n,t)=>t.toString(16).padStart(2,"0"));function o(n,t={}){return"number"==typeof n||"bigint"==typeof n?f(n,t):"string"==typeof n?u(n,t):"boolean"==typeof n?r(n,t):s(n,t)}function r(n,i={}){const o=`0x${Number(n)}`;return"number"==typeof i.size?(e(o,{size:i.size}),t(o,{size:i.size})):o}function s(n,o={}){let r="";for(let t=0;t<n.length;t++)r+=i[n[t]];const s=`0x${r}`;return"number"==typeof o.size?(e(s,{size:o.size}),t(s,{dir:"right",size:o.size})):s}function f(e,i={}){const{signed:o,size:r}=i,s=BigInt(e);let f;r?f=o?(1n<<8n*BigInt(r)-1n)-1n:2n**(8n*BigInt(r))-1n:"number"==typeof e&&(f=BigInt(Number.MAX_SAFE_INTEGER));const g="bigint"==typeof f&&o?-f-1n:0;if(f&&s>f||s<g){const t="bigint"==typeof e?"n":"";throw new n({max:f?`${f}${t}`:void 0,min:`${g}${t}`,signed:o,size:r,value:`${e}${t}`})}const u=`0x${(o&&s<0?(1n<<BigInt(8*r))+BigInt(s):s).toString(16)}`;return r?t(u,{size:r}):u}const g=new TextEncoder;function u(n,t={}){return s(g.encode(n),t)}export{r as boolToHex,s as bytesToHex,f as numberToHex,u as stringToHex,o as toHex};
|
|
2
|
+
//# sourceMappingURL=toHex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toHex.js","sources":["../../../../../../../node_modules/viem/_esm/utils/encoding/toHex.js"],"sourcesContent":["import { IntegerOutOfRangeError, } from '../../errors/encoding.js';\nimport { pad } from '../data/pad.js';\nimport { assertSize } from './fromHex.js';\nconst hexes = /*#__PURE__*/ Array.from({ length: 256 }, (_v, i) => i.toString(16).padStart(2, '0'));\n/**\n * Encodes a string, number, bigint, or ByteArray into a hex string\n *\n * - Docs: https://viem.sh/docs/utilities/toHex\n * - Example: https://viem.sh/docs/utilities/toHex#usage\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Hex value.\n *\n * @example\n * import { toHex } from 'viem'\n * const data = toHex('Hello world')\n * // '0x48656c6c6f20776f726c6421'\n *\n * @example\n * import { toHex } from 'viem'\n * const data = toHex(420)\n * // '0x1a4'\n *\n * @example\n * import { toHex } from 'viem'\n * const data = toHex('Hello world', { size: 32 })\n * // '0x48656c6c6f20776f726c64210000000000000000000000000000000000000000'\n */\nexport function toHex(value, opts = {}) {\n if (typeof value === 'number' || typeof value === 'bigint')\n return numberToHex(value, opts);\n if (typeof value === 'string') {\n return stringToHex(value, opts);\n }\n if (typeof value === 'boolean')\n return boolToHex(value, opts);\n return bytesToHex(value, opts);\n}\n/**\n * Encodes a boolean into a hex string\n *\n * - Docs: https://viem.sh/docs/utilities/toHex#booltohex\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Hex value.\n *\n * @example\n * import { boolToHex } from 'viem'\n * const data = boolToHex(true)\n * // '0x1'\n *\n * @example\n * import { boolToHex } from 'viem'\n * const data = boolToHex(false)\n * // '0x0'\n *\n * @example\n * import { boolToHex } from 'viem'\n * const data = boolToHex(true, { size: 32 })\n * // '0x0000000000000000000000000000000000000000000000000000000000000001'\n */\nexport function boolToHex(value, opts = {}) {\n const hex = `0x${Number(value)}`;\n if (typeof opts.size === 'number') {\n assertSize(hex, { size: opts.size });\n return pad(hex, { size: opts.size });\n }\n return hex;\n}\n/**\n * Encodes a bytes array into a hex string\n *\n * - Docs: https://viem.sh/docs/utilities/toHex#bytestohex\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Hex value.\n *\n * @example\n * import { bytesToHex } from 'viem'\n * const data = bytesToHex(Uint8Array.from([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33])\n * // '0x48656c6c6f20576f726c6421'\n *\n * @example\n * import { bytesToHex } from 'viem'\n * const data = bytesToHex(Uint8Array.from([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33]), { size: 32 })\n * // '0x48656c6c6f20576f726c64210000000000000000000000000000000000000000'\n */\nexport function bytesToHex(value, opts = {}) {\n let string = '';\n for (let i = 0; i < value.length; i++) {\n string += hexes[value[i]];\n }\n const hex = `0x${string}`;\n if (typeof opts.size === 'number') {\n assertSize(hex, { size: opts.size });\n return pad(hex, { dir: 'right', size: opts.size });\n }\n return hex;\n}\n/**\n * Encodes a number or bigint into a hex string\n *\n * - Docs: https://viem.sh/docs/utilities/toHex#numbertohex\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Hex value.\n *\n * @example\n * import { numberToHex } from 'viem'\n * const data = numberToHex(420)\n * // '0x1a4'\n *\n * @example\n * import { numberToHex } from 'viem'\n * const data = numberToHex(420, { size: 32 })\n * // '0x00000000000000000000000000000000000000000000000000000000000001a4'\n */\nexport function numberToHex(value_, opts = {}) {\n const { signed, size } = opts;\n const value = BigInt(value_);\n let maxValue;\n if (size) {\n if (signed)\n maxValue = (1n << (BigInt(size) * 8n - 1n)) - 1n;\n else\n maxValue = 2n ** (BigInt(size) * 8n) - 1n;\n }\n else if (typeof value_ === 'number') {\n maxValue = BigInt(Number.MAX_SAFE_INTEGER);\n }\n const minValue = typeof maxValue === 'bigint' && signed ? -maxValue - 1n : 0;\n if ((maxValue && value > maxValue) || value < minValue) {\n const suffix = typeof value_ === 'bigint' ? 'n' : '';\n throw new IntegerOutOfRangeError({\n max: maxValue ? `${maxValue}${suffix}` : undefined,\n min: `${minValue}${suffix}`,\n signed,\n size,\n value: `${value_}${suffix}`,\n });\n }\n const hex = `0x${(signed && value < 0 ? (1n << BigInt(size * 8)) + BigInt(value) : value).toString(16)}`;\n if (size)\n return pad(hex, { size });\n return hex;\n}\nconst encoder = /*#__PURE__*/ new TextEncoder();\n/**\n * Encodes a UTF-8 string into a hex string\n *\n * - Docs: https://viem.sh/docs/utilities/toHex#stringtohex\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Hex value.\n *\n * @example\n * import { stringToHex } from 'viem'\n * const data = stringToHex('Hello World!')\n * // '0x48656c6c6f20576f726c6421'\n *\n * @example\n * import { stringToHex } from 'viem'\n * const data = stringToHex('Hello World!', { size: 32 })\n * // '0x48656c6c6f20576f726c64210000000000000000000000000000000000000000'\n */\nexport function stringToHex(value_, opts = {}) {\n const value = encoder.encode(value_);\n return bytesToHex(value, opts);\n}\n//# sourceMappingURL=toHex.js.map"],"names":["hexes","Array","from","length","_v","i","toString","padStart","toHex","value","opts","numberToHex","stringToHex","boolToHex","bytesToHex","hex","Number","size","assertSize","pad","string","dir","value_","signed","BigInt","maxValue","MAX_SAFE_INTEGER","minValue","suffix","IntegerOutOfRangeError","max","undefined","min","encoder","TextEncoder","encode"],"mappings":"iJAGA,MAAMA,EAAsBC,MAAMC,KAAK,CAAEC,OAAQ,KAAO,CAACC,EAAIC,IAAMA,EAAEC,SAAS,IAAIC,SAAS,EAAG,MA0BvF,SAASC,EAAMC,EAAOC,EAAO,IAChC,MAAqB,iBAAVD,GAAuC,iBAAVA,EAC7BE,EAAYF,EAAOC,GACT,iBAAVD,EACAG,EAAYH,EAAOC,GAET,kBAAVD,EACAI,EAAUJ,EAAOC,GACrBI,EAAWL,EAAOC,EAC7B,CAyBO,SAASG,EAAUJ,EAAOC,EAAO,IACpC,MAAMK,EAAM,KAAKC,OAAOP,KACxB,MAAyB,iBAAdC,EAAKO,MACZC,EAAWH,EAAK,CAAEE,KAAMP,EAAKO,OACtBE,EAAIJ,EAAK,CAAEE,KAAMP,EAAKO,QAE1BF,CACX,CAoBO,SAASD,EAAWL,EAAOC,EAAO,IACrC,IAAIU,EAAS,GACb,IAAK,IAAIf,EAAI,EAAGA,EAAII,EAAMN,OAAQE,IAC9Be,GAAUpB,EAAMS,EAAMJ,IAE1B,MAAMU,EAAM,KAAKK,IACjB,MAAyB,iBAAdV,EAAKO,MACZC,EAAWH,EAAK,CAAEE,KAAMP,EAAKO,OACtBE,EAAIJ,EAAK,CAAEM,IAAK,QAASJ,KAAMP,EAAKO,QAExCF,CACX,CAoBO,SAASJ,EAAYW,EAAQZ,EAAO,IACvC,MAAMa,OAAEA,EAAMN,KAAEA,GAASP,EACnBD,EAAQe,OAAOF,GACrB,IAAIG,EACAR,EAEIQ,EADAF,GACY,IAAsB,GAAfC,OAAOP,GAAa,IAAO,GAEnC,KAAsB,GAAfO,OAAOP,IAAc,GAEpB,iBAAXK,IACZG,EAAWD,OAAOR,OAAOU,mBAE7B,MAAMC,EAA+B,iBAAbF,GAAyBF,GAAUE,EAAW,GAAK,EAC3E,GAAKA,GAAYhB,EAAQgB,GAAahB,EAAQkB,EAAU,CACpD,MAAMC,EAA2B,iBAAXN,EAAsB,IAAM,GAClD,MAAM,IAAIO,EAAuB,CAC7BC,IAAKL,EAAW,GAAGA,IAAWG,SAAWG,EACzCC,IAAK,GAAGL,IAAWC,IACnBL,SACAN,OACAR,MAAO,GAAGa,IAASM,KAE3B,CACA,MAAMb,EAAM,MAAMQ,GAAUd,EAAQ,GAAK,IAAMe,OAAc,EAAPP,IAAaO,OAAOf,GAASA,GAAOH,SAAS,MACnG,OAAIW,EACOE,EAAIJ,EAAK,CAAEE,SACfF,CACX,CACA,MAAMkB,EAAwB,IAAIC,YAoB3B,SAAStB,EAAYU,EAAQZ,EAAO,IAEvC,OAAOI,EADOmB,EAAQE,OAAOb,GACJZ,EAC7B","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{BaseError as t}from"../../errors/base.js";import{createCursor as e}from"../cursor.js";import{hexToBytes as n}from"./toBytes.js";import{bytesToHex as r}from"./toHex.js";function h(t,n="hex"){const h=s(t),o=e(new Uint8Array(h.length));return h.encode(o),"hex"===n?r(o.bytes):o.bytes}function s(t){return Array.isArray(t)?function(t){const e=t.reduce((t,e)=>t+e.length,0),n=o(e);return{length:e<=55?1+e:1+n+e,encode(r){e<=55?r.pushByte(192+e):(r.pushByte(247+n),1===n?r.pushUint8(e):2===n?r.pushUint16(e):3===n?r.pushUint24(e):r.pushUint32(e));for(const{encode:e}of t)e(r)}}}(t.map(t=>s(t))):function(t){const e="string"==typeof t?n(t):t,r=o(e.length),h=1===e.length&&e[0]<128?1:e.length<=55?1+e.length:1+r+e.length;return{length:h,encode(t){1===e.length&&e[0]<128?t.pushBytes(e):e.length<=55?(t.pushByte(128+e.length),t.pushBytes(e)):(t.pushByte(183+r),1===r?t.pushUint8(e.length):2===r?t.pushUint16(e.length):3===r?t.pushUint24(e.length):t.pushUint32(e.length),t.pushBytes(e))}}}(t)}function o(e){if(e<256)return 1;if(e<65536)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new t("Length is too large.")}export{h as toRlp};
|
|
2
|
+
//# sourceMappingURL=toRlp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toRlp.js","sources":["../../../../../../../node_modules/viem/_esm/utils/encoding/toRlp.js"],"sourcesContent":["import { BaseError } from '../../errors/base.js';\nimport { createCursor, } from '../cursor.js';\nimport { hexToBytes } from './toBytes.js';\nimport { bytesToHex } from './toHex.js';\nexport function toRlp(bytes, to = 'hex') {\n const encodable = getEncodable(bytes);\n const cursor = createCursor(new Uint8Array(encodable.length));\n encodable.encode(cursor);\n if (to === 'hex')\n return bytesToHex(cursor.bytes);\n return cursor.bytes;\n}\nexport function bytesToRlp(bytes, to = 'bytes') {\n return toRlp(bytes, to);\n}\nexport function hexToRlp(hex, to = 'hex') {\n return toRlp(hex, to);\n}\nfunction getEncodable(bytes) {\n if (Array.isArray(bytes))\n return getEncodableList(bytes.map((x) => getEncodable(x)));\n return getEncodableBytes(bytes);\n}\nfunction getEncodableList(list) {\n const bodyLength = list.reduce((acc, x) => acc + x.length, 0);\n const sizeOfBodyLength = getSizeOfLength(bodyLength);\n const length = (() => {\n if (bodyLength <= 55)\n return 1 + bodyLength;\n return 1 + sizeOfBodyLength + bodyLength;\n })();\n return {\n length,\n encode(cursor) {\n if (bodyLength <= 55) {\n cursor.pushByte(0xc0 + bodyLength);\n }\n else {\n cursor.pushByte(0xc0 + 55 + sizeOfBodyLength);\n if (sizeOfBodyLength === 1)\n cursor.pushUint8(bodyLength);\n else if (sizeOfBodyLength === 2)\n cursor.pushUint16(bodyLength);\n else if (sizeOfBodyLength === 3)\n cursor.pushUint24(bodyLength);\n else\n cursor.pushUint32(bodyLength);\n }\n for (const { encode } of list) {\n encode(cursor);\n }\n },\n };\n}\nfunction getEncodableBytes(bytesOrHex) {\n const bytes = typeof bytesOrHex === 'string' ? hexToBytes(bytesOrHex) : bytesOrHex;\n const sizeOfBytesLength = getSizeOfLength(bytes.length);\n const length = (() => {\n if (bytes.length === 1 && bytes[0] < 0x80)\n return 1;\n if (bytes.length <= 55)\n return 1 + bytes.length;\n return 1 + sizeOfBytesLength + bytes.length;\n })();\n return {\n length,\n encode(cursor) {\n if (bytes.length === 1 && bytes[0] < 0x80) {\n cursor.pushBytes(bytes);\n }\n else if (bytes.length <= 55) {\n cursor.pushByte(0x80 + bytes.length);\n cursor.pushBytes(bytes);\n }\n else {\n cursor.pushByte(0x80 + 55 + sizeOfBytesLength);\n if (sizeOfBytesLength === 1)\n cursor.pushUint8(bytes.length);\n else if (sizeOfBytesLength === 2)\n cursor.pushUint16(bytes.length);\n else if (sizeOfBytesLength === 3)\n cursor.pushUint24(bytes.length);\n else\n cursor.pushUint32(bytes.length);\n cursor.pushBytes(bytes);\n }\n },\n };\n}\nfunction getSizeOfLength(length) {\n if (length < 2 ** 8)\n return 1;\n if (length < 2 ** 16)\n return 2;\n if (length < 2 ** 24)\n return 3;\n if (length < 2 ** 32)\n return 4;\n throw new BaseError('Length is too large.');\n}\n//# sourceMappingURL=toRlp.js.map"],"names":["toRlp","bytes","to","encodable","getEncodable","cursor","createCursor","Uint8Array","length","encode","bytesToHex","Array","isArray","list","bodyLength","reduce","acc","x","sizeOfBodyLength","getSizeOfLength","pushByte","pushUint8","pushUint16","pushUint24","pushUint32","getEncodableList","map","bytesOrHex","hexToBytes","sizeOfBytesLength","pushBytes","getEncodableBytes","BaseError"],"mappings":"+KAIO,SAASA,EAAMC,EAAOC,EAAK,OAC9B,MAAMC,EAAYC,EAAaH,GACzBI,EAASC,EAAa,IAAIC,WAAWJ,EAAUK,SAErD,OADAL,EAAUM,OAAOJ,GACN,QAAPH,EACOQ,EAAWL,EAAOJ,OACtBI,EAAOJ,KAClB,CAOA,SAASG,EAAaH,GAClB,OAAIU,MAAMC,QAAQX,GAItB,SAA0BY,GACtB,MAAMC,EAAaD,EAAKE,OAAO,CAACC,EAAKC,IAAMD,EAAMC,EAAET,OAAQ,GACrDU,EAAmBC,EAAgBL,GAMzC,MAAO,CACHN,OALIM,GAAc,GACP,EAAIA,EACR,EAAII,EAAmBJ,EAI9B,MAAAL,CAAOJ,GACCS,GAAc,GACdT,EAAOe,SAAS,IAAON,IAGvBT,EAAOe,SAAS,IAAYF,GACH,IAArBA,EACAb,EAAOgB,UAAUP,GACS,IAArBI,EACLb,EAAOiB,WAAWR,GACQ,IAArBI,EACLb,EAAOkB,WAAWT,GAElBT,EAAOmB,WAAWV,IAE1B,IAAK,MAAML,OAAEA,KAAYI,EACrBJ,EAAOJ,EAEf,EAER,CAjCeoB,CAAiBxB,EAAMyB,IAAKT,GAAMb,EAAaa,KAkC9D,SAA2BU,GACvB,MAAM1B,EAA8B,iBAAf0B,EAA0BC,EAAWD,GAAcA,EAClEE,EAAoBV,EAAgBlB,EAAMO,QAC1CA,EACmB,IAAjBP,EAAMO,QAAgBP,EAAM,GAAK,IAC1B,EACPA,EAAMO,QAAU,GACT,EAAIP,EAAMO,OACd,EAAIqB,EAAoB5B,EAAMO,OAEzC,MAAO,CACHA,SACA,MAAAC,CAAOJ,GACkB,IAAjBJ,EAAMO,QAAgBP,EAAM,GAAK,IACjCI,EAAOyB,UAAU7B,GAEZA,EAAMO,QAAU,IACrBH,EAAOe,SAAS,IAAOnB,EAAMO,QAC7BH,EAAOyB,UAAU7B,KAGjBI,EAAOe,SAAS,IAAYS,GACF,IAAtBA,EACAxB,EAAOgB,UAAUpB,EAAMO,QACI,IAAtBqB,EACLxB,EAAOiB,WAAWrB,EAAMO,QACG,IAAtBqB,EACLxB,EAAOkB,WAAWtB,EAAMO,QAExBH,EAAOmB,WAAWvB,EAAMO,QAC5BH,EAAOyB,UAAU7B,GAEzB,EAER,CAnEW8B,CAAkB9B,EAC7B,CAmEA,SAASkB,EAAgBX,GACrB,GAAIA,EAAS,IACT,OAAO,EACX,GAAIA,EAAS,MACT,OAAO,EACX,GAAIA,EAAS,GAAK,GACd,OAAO,EACX,GAAIA,EAAS,GAAK,GACd,OAAO,EACX,MAAM,IAAIwB,EAAU,uBACxB","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{parseAvatarUri as a,parseNftUri as r,getNftTokenUri as t,resolveAvatarUri as e,getJsonImage as s,getMetadataAvatarUri as i}from"./utils.js";async function n(n,{gatewayUrls:c,record:o}){return/eip155:/i.test(o)?async function(n,{gatewayUrls:c,record:o}){const l=r(o),p=await t(n,{nft:l}),{uri:u,isOnChain:d,isEncoded:y}=e({uri:p,gatewayUrls:c});if(d&&(u.includes("data:application/json;base64,")||u.startsWith("{"))){const r=y?atob(u.replace("data:application/json;base64,","")):u,t=JSON.parse(r);return a({uri:s(t),gatewayUrls:c})}let w=l.tokenID;"erc1155"===l.namespace&&(w=w.replace("0x","").padStart(64,"0"));return i({gatewayUrls:c,uri:u.replace(/(?:0x)?{id}/,w)})}(n,{gatewayUrls:c,record:o}):a({uri:o,gatewayUrls:c})}export{n as parseAvatarRecord};
|
|
2
|
+
//# sourceMappingURL=parseAvatarRecord.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseAvatarRecord.js","sources":["../../../../../../../../node_modules/viem/_esm/utils/ens/avatar/parseAvatarRecord.js"],"sourcesContent":["import { getJsonImage, getMetadataAvatarUri, getNftTokenUri, parseAvatarUri, parseNftUri, resolveAvatarUri, } from './utils.js';\n/*\n * @description Parses an ENS avatar record.\n *\n * @example\n * parseAvatarRecord('eip155:1/erc1155:0xb32979486938aa9694bfc898f35dbed459f44424/10063')\n * 'https://ipfs.io/ipfs/QmSP4nq9fnN9dAiCj42ug9Wa79rqmQerZXZch82VqpiH7U/image.gif'\n *\n * @see https://docs.ens.domains/web/avatars\n *\n */\nexport async function parseAvatarRecord(client, { gatewayUrls, record, }) {\n if (/eip155:/i.test(record))\n return parseNftAvatarUri(client, { gatewayUrls, record });\n return parseAvatarUri({ uri: record, gatewayUrls });\n}\nasync function parseNftAvatarUri(client, { gatewayUrls, record, }) {\n // parse NFT URI into properties\n const nft = parseNftUri(record);\n // fetch tokenURI from the NFT contract\n const nftUri = await getNftTokenUri(client, { nft });\n // resolve the URI from the fetched tokenURI\n const { uri: resolvedNftUri, isOnChain, isEncoded, } = resolveAvatarUri({ uri: nftUri, gatewayUrls });\n // if the resolved URI is on chain, return the data\n if (isOnChain &&\n (resolvedNftUri.includes('data:application/json;base64,') ||\n resolvedNftUri.startsWith('{'))) {\n const encodedJson = isEncoded\n ? // if it is encoded, decode it\n atob(resolvedNftUri.replace('data:application/json;base64,', ''))\n : // if it isn't encoded assume it is a JSON string, but it could be anything (it will error if it is)\n resolvedNftUri;\n const decoded = JSON.parse(encodedJson);\n return parseAvatarUri({ uri: getJsonImage(decoded), gatewayUrls });\n }\n let uriTokenId = nft.tokenID;\n if (nft.namespace === 'erc1155')\n uriTokenId = uriTokenId.replace('0x', '').padStart(64, '0');\n return getMetadataAvatarUri({\n gatewayUrls,\n uri: resolvedNftUri.replace(/(?:0x)?{id}/, uriTokenId),\n });\n}\n//# sourceMappingURL=parseAvatarRecord.js.map"],"names":["async","parseAvatarRecord","client","gatewayUrls","record","test","nft","parseNftUri","nftUri","getNftTokenUri","uri","resolvedNftUri","isOnChain","isEncoded","resolveAvatarUri","includes","startsWith","encodedJson","atob","replace","decoded","JSON","parse","parseAvatarUri","getJsonImage","uriTokenId","tokenID","namespace","padStart","getMetadataAvatarUri","parseNftAvatarUri"],"mappings":"mJAWOA,eAAeC,EAAkBC,GAAQC,YAAEA,EAAWC,OAAEA,IAC3D,MAAI,WAAWC,KAAKD,GAIxBJ,eAAiCE,GAAQC,YAAEA,EAAWC,OAAEA,IAEpD,MAAME,EAAMC,EAAYH,GAElBI,QAAeC,EAAeP,EAAQ,CAAEI,SAEtCI,IAAKC,EAAcC,UAAEA,EAASC,UAAEA,GAAeC,EAAiB,CAAEJ,IAAKF,EAAQL,gBAEvF,GAAIS,IACCD,EAAeI,SAAS,kCACrBJ,EAAeK,WAAW,MAAO,CACrC,MAAMC,EAAcJ,EAEZK,KAAKP,EAAeQ,QAAQ,gCAAiC,KAE7DR,EACFS,EAAUC,KAAKC,MAAML,GAC3B,OAAOM,EAAe,CAAEb,IAAKc,EAAaJ,GAAUjB,eACxD,CACA,IAAIsB,EAAanB,EAAIoB,QACC,YAAlBpB,EAAIqB,YACJF,EAAaA,EAAWN,QAAQ,KAAM,IAAIS,SAAS,GAAI,MAC3D,OAAOC,EAAqB,CACxB1B,cACAO,IAAKC,EAAeQ,QAAQ,cAAeM,IAEnD,CA7BeK,CAAkB5B,EAAQ,CAAEC,cAAaC,WAC7CmB,EAAe,CAAEb,IAAKN,EAAQD,eACzC","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{readContract as t}from"../../../actions/public/readContract.js";import{EnsAvatarUriResolutionError as e,EnsAvatarInvalidNftUriError as n,EnsAvatarUnsupportedNamespaceError as a,EnsAvatarInvalidMetadataError as r}from"../../../errors/ens.js";const i=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,s=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,o=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,u=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function c(t){try{const e=await fetch(t,{method:"HEAD"});if(200===e.status){const t=e.headers.get("content-type");return t?.startsWith("image/")}return!1}catch(e){return("object"!=typeof e||void 0===e.response)&&(!!Object.hasOwn(globalThis,"Image")&&new Promise(e=>{const n=new Image;n.onload=()=>{e(!0)},n.onerror=()=>{e(!1)},n.src=t}))}}function p(t,e){return t?t.endsWith("/")?t.slice(0,-1):t:e}function f({uri:t,gatewayUrls:n}){const a=o.test(t);if(a)return{uri:t,isOnChain:!0,isEncoded:a};const r=p(n?.ipfs,"https://ipfs.io"),c=p(n?.arweave,"https://arweave.net"),f=t.match(i),{protocol:d,subpath:w,target:h,subtarget:m=""}=f?.groups||{},g="ipns:/"===d||"ipns/"===w,l="ipfs:/"===d||"ipfs/"===w||s.test(t);if(t.startsWith("http")&&!g&&!l){let e=t;return n?.arweave&&(e=t.replace(/https:\/\/arweave.net/g,n?.arweave)),{uri:e,isOnChain:!1,isEncoded:!1}}if((g||l)&&h)return{uri:`${r}/${g?"ipns":"ipfs"}/${h}${m}`,isOnChain:!1,isEncoded:!1};if("ar:/"===d&&h)return{uri:`${c}/${h}${m||""}`,isOnChain:!1,isEncoded:!1};let y=t.replace(u,"");if(y.startsWith("<svg")&&(y=`data:image/svg+xml;base64,${btoa(y)}`),y.startsWith("data:")||y.startsWith("{"))return{uri:y,isOnChain:!0,isEncoded:!1};throw new e({uri:t})}function d(t){if("object"!=typeof t||!("image"in t)&&!("image_url"in t)&&!("image_data"in t))throw new r({data:t});return t.image||t.image_url||t.image_data}async function w({gatewayUrls:t,uri:n}){try{const e=await fetch(n).then(t=>t.json());return await h({gatewayUrls:t,uri:d(e)})}catch{throw new e({uri:n})}}async function h({gatewayUrls:t,uri:n}){const{uri:a,isOnChain:r}=f({uri:n,gatewayUrls:t});if(r)return a;if(await c(a))return a;throw new e({uri:n})}function m(t){let e=t;e.startsWith("did:nft:")&&(e=e.replace("did:nft:","").replace(/_/g,"/"));const[a,r,i]=e.split("/"),[s,o]=a.split(":"),[u,c]=r.split(":");if(!s||"eip155"!==s.toLowerCase())throw new n({reason:"Only EIP-155 supported"});if(!o)throw new n({reason:"Chain ID not found"});if(!c)throw new n({reason:"Contract address not found"});if(!i)throw new n({reason:"Token ID not found"});if(!u)throw new n({reason:"ERC namespace not found"});return{chainID:Number.parseInt(o,10),namespace:u.toLowerCase(),contractAddress:c,tokenID:i}}async function g(e,{nft:n}){if("erc721"===n.namespace)return t(e,{address:n.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(n.tokenID)]});if("erc1155"===n.namespace)return t(e,{address:n.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(n.tokenID)]});throw new a({namespace:n.namespace})}export{p as getGateway,d as getJsonImage,w as getMetadataAvatarUri,g as getNftTokenUri,c as isImageUri,h as parseAvatarUri,m as parseNftUri,f as resolveAvatarUri};
|
|
2
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../../../../../node_modules/viem/_esm/utils/ens/avatar/utils.js"],"sourcesContent":["import { readContract, } from '../../../actions/public/readContract.js';\nimport { EnsAvatarInvalidMetadataError, EnsAvatarInvalidNftUriError, EnsAvatarUnsupportedNamespaceError, EnsAvatarUriResolutionError, } from '../../../errors/ens.js';\nconst networkRegex = /(?<protocol>https?:\\/\\/[^/]*|ipfs:\\/|ipns:\\/|ar:\\/)?(?<root>\\/)?(?<subpath>ipfs\\/|ipns\\/)?(?<target>[\\w\\-.]+)(?<subtarget>\\/.*)?/;\nconst ipfsHashRegex = /^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\\/(?<target>[\\w\\-.]+))?(?<subtarget>\\/.*)?$/;\nconst base64Regex = /^data:([a-zA-Z\\-/+]*);base64,([^\"].*)/;\nconst dataURIRegex = /^data:([a-zA-Z\\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;\n/** @internal */\nexport async function isImageUri(uri) {\n try {\n const res = await fetch(uri, { method: 'HEAD' });\n // retrieve content type header to check if content is image\n if (res.status === 200) {\n const contentType = res.headers.get('content-type');\n return contentType?.startsWith('image/');\n }\n return false;\n }\n catch (error) {\n // if error is not cors related then fail\n if (typeof error === 'object' && typeof error.response !== 'undefined') {\n return false;\n }\n // fail in NodeJS, since the error is not cors but any other network issue\n if (!Object.hasOwn(globalThis, 'Image'))\n return false;\n // in case of cors, use image api to validate if given url is an actual image\n return new Promise((resolve) => {\n const img = new Image();\n img.onload = () => {\n resolve(true);\n };\n img.onerror = () => {\n resolve(false);\n };\n img.src = uri;\n });\n }\n}\n/** @internal */\nexport function getGateway(custom, defaultGateway) {\n if (!custom)\n return defaultGateway;\n if (custom.endsWith('/'))\n return custom.slice(0, -1);\n return custom;\n}\nexport function resolveAvatarUri({ uri, gatewayUrls, }) {\n const isEncoded = base64Regex.test(uri);\n if (isEncoded)\n return { uri, isOnChain: true, isEncoded };\n const ipfsGateway = getGateway(gatewayUrls?.ipfs, 'https://ipfs.io');\n const arweaveGateway = getGateway(gatewayUrls?.arweave, 'https://arweave.net');\n const networkRegexMatch = uri.match(networkRegex);\n const { protocol, subpath, target, subtarget = '', } = networkRegexMatch?.groups || {};\n const isIPNS = protocol === 'ipns:/' || subpath === 'ipns/';\n const isIPFS = protocol === 'ipfs:/' || subpath === 'ipfs/' || ipfsHashRegex.test(uri);\n if (uri.startsWith('http') && !isIPNS && !isIPFS) {\n let replacedUri = uri;\n if (gatewayUrls?.arweave)\n replacedUri = uri.replace(/https:\\/\\/arweave.net/g, gatewayUrls?.arweave);\n return { uri: replacedUri, isOnChain: false, isEncoded: false };\n }\n if ((isIPNS || isIPFS) && target) {\n return {\n uri: `${ipfsGateway}/${isIPNS ? 'ipns' : 'ipfs'}/${target}${subtarget}`,\n isOnChain: false,\n isEncoded: false,\n };\n }\n if (protocol === 'ar:/' && target) {\n return {\n uri: `${arweaveGateway}/${target}${subtarget || ''}`,\n isOnChain: false,\n isEncoded: false,\n };\n }\n let parsedUri = uri.replace(dataURIRegex, '');\n if (parsedUri.startsWith('<svg')) {\n // if svg, base64 encode\n parsedUri = `data:image/svg+xml;base64,${btoa(parsedUri)}`;\n }\n if (parsedUri.startsWith('data:') || parsedUri.startsWith('{')) {\n return {\n uri: parsedUri,\n isOnChain: true,\n isEncoded: false,\n };\n }\n throw new EnsAvatarUriResolutionError({ uri });\n}\nexport function getJsonImage(data) {\n // validation check for json data, must include one of theses properties\n if (typeof data !== 'object' ||\n (!('image' in data) && !('image_url' in data) && !('image_data' in data))) {\n throw new EnsAvatarInvalidMetadataError({ data });\n }\n return data.image || data.image_url || data.image_data;\n}\nexport async function getMetadataAvatarUri({ gatewayUrls, uri, }) {\n try {\n const res = await fetch(uri).then((res) => res.json());\n const image = await parseAvatarUri({\n gatewayUrls,\n uri: getJsonImage(res),\n });\n return image;\n }\n catch {\n throw new EnsAvatarUriResolutionError({ uri });\n }\n}\nexport async function parseAvatarUri({ gatewayUrls, uri, }) {\n const { uri: resolvedURI, isOnChain } = resolveAvatarUri({ uri, gatewayUrls });\n if (isOnChain)\n return resolvedURI;\n // check if resolvedURI is an image, if it is return the url\n const isImage = await isImageUri(resolvedURI);\n if (isImage)\n return resolvedURI;\n throw new EnsAvatarUriResolutionError({ uri });\n}\nexport function parseNftUri(uri_) {\n let uri = uri_;\n // parse valid nft spec (CAIP-22/CAIP-29)\n // @see: https://github.com/ChainAgnostic/CAIPs/tree/master/CAIPs\n if (uri.startsWith('did:nft:')) {\n // convert DID to CAIP\n uri = uri.replace('did:nft:', '').replace(/_/g, '/');\n }\n const [reference, asset_namespace, tokenID] = uri.split('/');\n const [eip_namespace, chainID] = reference.split(':');\n const [erc_namespace, contractAddress] = asset_namespace.split(':');\n if (!eip_namespace || eip_namespace.toLowerCase() !== 'eip155')\n throw new EnsAvatarInvalidNftUriError({ reason: 'Only EIP-155 supported' });\n if (!chainID)\n throw new EnsAvatarInvalidNftUriError({ reason: 'Chain ID not found' });\n if (!contractAddress)\n throw new EnsAvatarInvalidNftUriError({\n reason: 'Contract address not found',\n });\n if (!tokenID)\n throw new EnsAvatarInvalidNftUriError({ reason: 'Token ID not found' });\n if (!erc_namespace)\n throw new EnsAvatarInvalidNftUriError({ reason: 'ERC namespace not found' });\n return {\n chainID: Number.parseInt(chainID, 10),\n namespace: erc_namespace.toLowerCase(),\n contractAddress: contractAddress,\n tokenID,\n };\n}\nexport async function getNftTokenUri(client, { nft }) {\n if (nft.namespace === 'erc721') {\n return readContract(client, {\n address: nft.contractAddress,\n abi: [\n {\n name: 'tokenURI',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ name: 'tokenId', type: 'uint256' }],\n outputs: [{ name: '', type: 'string' }],\n },\n ],\n functionName: 'tokenURI',\n args: [BigInt(nft.tokenID)],\n });\n }\n if (nft.namespace === 'erc1155') {\n return readContract(client, {\n address: nft.contractAddress,\n abi: [\n {\n name: 'uri',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ name: '_id', type: 'uint256' }],\n outputs: [{ name: '', type: 'string' }],\n },\n ],\n functionName: 'uri',\n args: [BigInt(nft.tokenID)],\n });\n }\n throw new EnsAvatarUnsupportedNamespaceError({ namespace: nft.namespace });\n}\n//# sourceMappingURL=utils.js.map"],"names":["networkRegex","ipfsHashRegex","base64Regex","dataURIRegex","async","isImageUri","uri","res","fetch","method","status","contentType","headers","get","startsWith","error","response","Object","hasOwn","globalThis","Promise","resolve","img","Image","onload","onerror","src","getGateway","custom","defaultGateway","endsWith","slice","resolveAvatarUri","gatewayUrls","isEncoded","test","isOnChain","ipfsGateway","ipfs","arweaveGateway","arweave","networkRegexMatch","match","protocol","subpath","target","subtarget","groups","isIPNS","isIPFS","replacedUri","replace","parsedUri","btoa","EnsAvatarUriResolutionError","getJsonImage","data","EnsAvatarInvalidMetadataError","image","image_url","image_data","getMetadataAvatarUri","then","json","parseAvatarUri","resolvedURI","parseNftUri","uri_","reference","asset_namespace","tokenID","split","eip_namespace","chainID","erc_namespace","contractAddress","toLowerCase","EnsAvatarInvalidNftUriError","reason","Number","parseInt","namespace","getNftTokenUri","client","nft","readContract","address","abi","name","type","stateMutability","inputs","outputs","functionName","args","BigInt","EnsAvatarUnsupportedNamespaceError"],"mappings":"wPAEA,MAAMA,EAAe,mIACfC,EAAgB,wJAChBC,EAAc,wCACdC,EAAe,8CAEdC,eAAeC,EAAWC,GAC7B,IACI,MAAMC,QAAYC,MAAMF,EAAK,CAAEG,OAAQ,SAEvC,GAAmB,MAAfF,EAAIG,OAAgB,CACpB,MAAMC,EAAcJ,EAAIK,QAAQC,IAAI,gBACpC,OAAOF,GAAaG,WAAW,SACnC,CACA,OAAO,CACX,CACA,MAAOC,GAEH,OAAqB,iBAAVA,QAAgD,IAAnBA,EAAMC,cAIzCC,OAAOC,OAAOC,WAAY,UAGxB,IAAIC,QAASC,IAChB,MAAMC,EAAM,IAAIC,MAChBD,EAAIE,OAAS,KACTH,GAAQ,IAEZC,EAAIG,QAAU,KACVJ,GAAQ,IAEZC,EAAII,IAAMpB,IAElB,CACJ,CAEO,SAASqB,EAAWC,EAAQC,GAC/B,OAAKD,EAEDA,EAAOE,SAAS,KACTF,EAAOG,MAAM,MACjBH,EAHIC,CAIf,CACO,SAASG,GAAiB1B,IAAEA,EAAG2B,YAAEA,IACpC,MAAMC,EAAYhC,EAAYiC,KAAK7B,GACnC,GAAI4B,EACA,MAAO,CAAE5B,MAAK8B,WAAW,EAAMF,aACnC,MAAMG,EAAcV,EAAWM,GAAaK,KAAM,mBAC5CC,EAAiBZ,EAAWM,GAAaO,QAAS,uBAClDC,EAAoBnC,EAAIoC,MAAM1C,IAC9B2C,SAAEA,EAAQC,QAAEA,EAAOC,OAAEA,EAAMC,UAAEA,EAAY,IAAQL,GAAmBM,QAAU,CAAA,EAC9EC,EAAsB,WAAbL,GAAqC,UAAZC,EAClCK,EAAsB,WAAbN,GAAqC,UAAZC,GAAuB3C,EAAckC,KAAK7B,GAClF,GAAIA,EAAIQ,WAAW,UAAYkC,IAAWC,EAAQ,CAC9C,IAAIC,EAAc5C,EAGlB,OAFI2B,GAAaO,UACbU,EAAc5C,EAAI6C,QAAQ,yBAA0BlB,GAAaO,UAC9D,CAAElC,IAAK4C,EAAad,WAAW,EAAOF,WAAW,EAC5D,CACA,IAAKc,GAAUC,IAAWJ,EACtB,MAAO,CACHvC,IAAK,GAAG+B,KAAeW,EAAS,OAAS,UAAUH,IAASC,IAC5DV,WAAW,EACXF,WAAW,GAGnB,GAAiB,SAAbS,GAAuBE,EACvB,MAAO,CACHvC,IAAK,GAAGiC,KAAkBM,IAASC,GAAa,KAChDV,WAAW,EACXF,WAAW,GAGnB,IAAIkB,EAAY9C,EAAI6C,QAAQhD,EAAc,IAK1C,GAJIiD,EAAUtC,WAAW,UAErBsC,EAAY,6BAA6BC,KAAKD,MAE9CA,EAAUtC,WAAW,UAAYsC,EAAUtC,WAAW,KACtD,MAAO,CACHR,IAAK8C,EACLhB,WAAW,EACXF,WAAW,GAGnB,MAAM,IAAIoB,EAA4B,CAAEhD,OAC5C,CACO,SAASiD,EAAaC,GAEzB,GAAoB,iBAATA,KACJ,UAAWA,MAAW,cAAeA,MAAW,eAAgBA,GACnE,MAAM,IAAIC,EAA8B,CAAED,SAE9C,OAAOA,EAAKE,OAASF,EAAKG,WAAaH,EAAKI,UAChD,CACOxD,eAAeyD,GAAqB5B,YAAEA,EAAW3B,IAAEA,IACtD,IACI,MAAMC,QAAYC,MAAMF,GAAKwD,KAAMvD,GAAQA,EAAIwD,QAK/C,aAJoBC,EAAe,CAC/B/B,cACA3B,IAAKiD,EAAahD,IAG1B,CACA,MACI,MAAM,IAAI+C,EAA4B,CAAEhD,OAC5C,CACJ,CACOF,eAAe4D,GAAe/B,YAAEA,EAAW3B,IAAEA,IAChD,MAAQA,IAAK2D,EAAW7B,UAAEA,GAAcJ,EAAiB,CAAE1B,MAAK2B,gBAChE,GAAIG,EACA,OAAO6B,EAGX,SADsB5D,EAAW4D,GAE7B,OAAOA,EACX,MAAM,IAAIX,EAA4B,CAAEhD,OAC5C,CACO,SAAS4D,EAAYC,GACxB,IAAI7D,EAAM6D,EAGN7D,EAAIQ,WAAW,cAEfR,EAAMA,EAAI6C,QAAQ,WAAY,IAAIA,QAAQ,KAAM,MAEpD,MAAOiB,EAAWC,EAAiBC,GAAWhE,EAAIiE,MAAM,MACjDC,EAAeC,GAAWL,EAAUG,MAAM,MAC1CG,EAAeC,GAAmBN,EAAgBE,MAAM,KAC/D,IAAKC,GAAiD,WAAhCA,EAAcI,cAChC,MAAM,IAAIC,EAA4B,CAAEC,OAAQ,2BACpD,IAAKL,EACD,MAAM,IAAII,EAA4B,CAAEC,OAAQ,uBACpD,IAAKH,EACD,MAAM,IAAIE,EAA4B,CAClCC,OAAQ,+BAEhB,IAAKR,EACD,MAAM,IAAIO,EAA4B,CAAEC,OAAQ,uBACpD,IAAKJ,EACD,MAAM,IAAIG,EAA4B,CAAEC,OAAQ,4BACpD,MAAO,CACHL,QAASM,OAAOC,SAASP,EAAS,IAClCQ,UAAWP,EAAcE,cACzBD,gBAAiBA,EACjBL,UAER,CACOlE,eAAe8E,EAAeC,GAAQC,IAAEA,IAC3C,GAAsB,WAAlBA,EAAIH,UACJ,OAAOI,EAAaF,EAAQ,CACxBG,QAASF,EAAIT,gBACbY,IAAK,CACD,CACIC,KAAM,WACNC,KAAM,WACNC,gBAAiB,OACjBC,OAAQ,CAAC,CAAEH,KAAM,UAAWC,KAAM,YAClCG,QAAS,CAAC,CAAEJ,KAAM,GAAIC,KAAM,aAGpCI,aAAc,WACdC,KAAM,CAACC,OAAOX,EAAId,YAG1B,GAAsB,YAAlBc,EAAIH,UACJ,OAAOI,EAAaF,EAAQ,CACxBG,QAASF,EAAIT,gBACbY,IAAK,CACD,CACIC,KAAM,MACNC,KAAM,WACNC,gBAAiB,OACjBC,OAAQ,CAAC,CAAEH,KAAM,MAAOC,KAAM,YAC9BG,QAAS,CAAC,CAAEJ,KAAM,GAAIC,KAAM,aAGpCI,aAAc,MACdC,KAAM,CAACC,OAAOX,EAAId,YAG1B,MAAM,IAAI0B,EAAmC,CAAEf,UAAWG,EAAIH,WAClE","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encodeLabelhash.js","sources":["../../../../../../../node_modules/viem/_esm/utils/ens/encodeLabelhash.js"],"sourcesContent":["export function encodeLabelhash(hash) {\n return `[${hash.slice(2)}]`;\n}\n//# sourceMappingURL=encodeLabelhash.js.map"],"names":["encodeLabelhash","hash","slice"],"mappings":"AAAO,SAASA,EAAgBC,GAC5B,MAAO,IAAIA,EAAKC,MAAM,KAC1B","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{isHex as n}from"../data/isHex.js";function r(r){if(66!==r.length)return null;if(0!==r.indexOf("["))return null;if(65!==r.indexOf("]"))return null;const e=`0x${r.slice(1,65)}`;return n(e)?e:null}export{r as encodedLabelToLabelhash};
|
|
2
|
+
//# sourceMappingURL=encodedLabelToLabelhash.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encodedLabelToLabelhash.js","sources":["../../../../../../../node_modules/viem/_esm/utils/ens/encodedLabelToLabelhash.js"],"sourcesContent":["import { isHex } from '../data/isHex.js';\nexport function encodedLabelToLabelhash(label) {\n if (label.length !== 66)\n return null;\n if (label.indexOf('[') !== 0)\n return null;\n if (label.indexOf(']') !== 65)\n return null;\n const hash = `0x${label.slice(1, 65)}`;\n if (!isHex(hash))\n return null;\n return hash;\n}\n//# sourceMappingURL=encodedLabelToLabelhash.js.map"],"names":["encodedLabelToLabelhash","label","length","indexOf","hash","slice","isHex"],"mappings":"yCACO,SAASA,EAAwBC,GACpC,GAAqB,KAAjBA,EAAMC,OACN,OAAO,KACX,GAA2B,IAAvBD,EAAME,QAAQ,KACd,OAAO,KACX,GAA2B,KAAvBF,EAAME,QAAQ,KACd,OAAO,KACX,MAAMC,EAAO,KAAKH,EAAMI,MAAM,EAAG,MACjC,OAAKC,EAAMF,GAEJA,EADI,IAEf","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{BaseError as r}from"../../errors/base.js";import{ContractFunctionRevertedError as e}from"../../errors/contract.js";function o(o){if(!(o instanceof r))return!1;const a=o.walk(r=>r instanceof e);return a instanceof e&&("HttpError"===a.data?.errorName||("ResolverError"===a.data?.errorName||("ResolverNotContract"===a.data?.errorName||("ResolverNotFound"===a.data?.errorName||("ReverseAddressMismatch"===a.data?.errorName||"UnsupportedResolverProfile"===a.data?.errorName)))))}export{o as isNullUniversalResolverError};
|
|
2
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sources":["../../../../../../../node_modules/viem/_esm/utils/ens/errors.js"],"sourcesContent":["import { BaseError } from '../../errors/base.js';\nimport { ContractFunctionRevertedError } from '../../errors/contract.js';\n/*\n * @description Checks if error is a valid null result UniversalResolver error\n */\nexport function isNullUniversalResolverError(err) {\n if (!(err instanceof BaseError))\n return false;\n const cause = err.walk((e) => e instanceof ContractFunctionRevertedError);\n if (!(cause instanceof ContractFunctionRevertedError))\n return false;\n if (cause.data?.errorName === 'HttpError')\n return true;\n if (cause.data?.errorName === 'ResolverError')\n return true;\n if (cause.data?.errorName === 'ResolverNotContract')\n return true;\n if (cause.data?.errorName === 'ResolverNotFound')\n return true;\n if (cause.data?.errorName === 'ReverseAddressMismatch')\n return true;\n if (cause.data?.errorName === 'UnsupportedResolverProfile')\n return true;\n return false;\n}\n//# sourceMappingURL=errors.js.map"],"names":["isNullUniversalResolverError","err","BaseError","cause","walk","e","ContractFunctionRevertedError","data","errorName"],"mappings":"0HAKO,SAASA,EAA6BC,GACzC,KAAMA,aAAeC,GACjB,OAAO,EACX,MAAMC,EAAQF,EAAIG,KAAMC,GAAMA,aAAaC,GAC3C,OAAMH,aAAiBG,IAEO,cAA1BH,EAAMI,MAAMC,YAEc,kBAA1BL,EAAMI,MAAMC,YAEc,wBAA1BL,EAAMI,MAAMC,YAEc,qBAA1BL,EAAMI,MAAMC,YAEc,2BAA1BL,EAAMI,MAAMC,WAEc,+BAA1BL,EAAMI,MAAMC,cAGpB","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{stringToBytes as o}from"../encoding/toBytes.js";import{bytesToHex as r}from"../encoding/toHex.js";import{keccak256 as e}from"../hash/keccak256.js";import{encodedLabelToLabelhash as t}from"./encodedLabelToLabelhash.js";function n(n){const i=new Uint8Array(32).fill(0);return n?t(n)||e(o(n)):r(i)}export{n as labelhash};
|
|
2
|
+
//# sourceMappingURL=labelhash.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"labelhash.js","sources":["../../../../../../../node_modules/viem/_esm/utils/ens/labelhash.js"],"sourcesContent":["import { stringToBytes, } from '../encoding/toBytes.js';\nimport { bytesToHex } from '../encoding/toHex.js';\nimport { keccak256 } from '../hash/keccak256.js';\nimport { encodedLabelToLabelhash, } from './encodedLabelToLabelhash.js';\n/**\n * @description Hashes ENS label\n *\n * - Since ENS labels prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS labels](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `labelhash`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this.\n *\n * @example\n * labelhash('eth')\n * '0x4f5b812789fc606be1b3b16908db13fc7a9adf7ca72641f84d75b47069d3d7f0'\n */\nexport function labelhash(label) {\n const result = new Uint8Array(32).fill(0);\n if (!label)\n return bytesToHex(result);\n return encodedLabelToLabelhash(label) || keccak256(stringToBytes(label));\n}\n//# sourceMappingURL=labelhash.js.map"],"names":["labelhash","label","result","Uint8Array","fill","encodedLabelToLabelhash","keccak256","stringToBytes","bytesToHex"],"mappings":"iOAaO,SAASA,EAAUC,GACtB,MAAMC,EAAS,IAAIC,WAAW,IAAIC,KAAK,GACvC,OAAKH,EAEEI,EAAwBJ,IAAUK,EAAUC,EAAcN,IADtDO,EAAWN,EAE1B","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{batchGatewayAbi as a}from"../../constants/abis.js";import{solidityError as t}from"../../constants/solidity.js";import{decodeFunctionData as r}from"../abi/decodeFunctionData.js";import{encodeErrorResult as s}from"../abi/encodeErrorResult.js";import{encodeFunctionResult as e}from"../abi/encodeFunctionResult.js";const o="x-batch-gateway:true";async function i(n){const{data:c,ccipRequest:m}=n,{args:[u]}=r({abi:a,data:c}),p=[],d=[];return await Promise.all(u.map(async(r,e)=>{try{d[e]=r.urls.includes(o)?await i({data:r.data,ccipRequest:m}):await m(r),p[e]=!1}catch(r){p[e]=!0,d[e]="HttpRequestError"===(n=r).name&&n.status?s({abi:a,errorName:"HttpError",args:[n.status,n.shortMessage]}):s({abi:[t],errorName:"Error",args:["shortMessage"in n?n.shortMessage:n.message]})}var n})),e({abi:a,functionName:"query",result:[p,d]})}export{i as localBatchGatewayRequest,o as localBatchGatewayUrl};
|
|
2
|
+
//# sourceMappingURL=localBatchGatewayRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localBatchGatewayRequest.js","sources":["../../../../../../../node_modules/viem/_esm/utils/ens/localBatchGatewayRequest.js"],"sourcesContent":["import { batchGatewayAbi } from '../../constants/abis.js';\nimport { solidityError } from '../../constants/solidity.js';\nimport { decodeFunctionData } from '../abi/decodeFunctionData.js';\nimport { encodeErrorResult } from '../abi/encodeErrorResult.js';\nimport { encodeFunctionResult } from '../abi/encodeFunctionResult.js';\nexport const localBatchGatewayUrl = 'x-batch-gateway:true';\nexport async function localBatchGatewayRequest(parameters) {\n const { data, ccipRequest } = parameters;\n const { args: [queries], } = decodeFunctionData({ abi: batchGatewayAbi, data });\n const failures = [];\n const responses = [];\n await Promise.all(queries.map(async (query, i) => {\n try {\n responses[i] = query.urls.includes(localBatchGatewayUrl)\n ? await localBatchGatewayRequest({ data: query.data, ccipRequest })\n : await ccipRequest(query);\n failures[i] = false;\n }\n catch (err) {\n failures[i] = true;\n responses[i] = encodeError(err);\n }\n }));\n return encodeFunctionResult({\n abi: batchGatewayAbi,\n functionName: 'query',\n result: [failures, responses],\n });\n}\nfunction encodeError(error) {\n if (error.name === 'HttpRequestError' && error.status)\n return encodeErrorResult({\n abi: batchGatewayAbi,\n errorName: 'HttpError',\n args: [error.status, error.shortMessage],\n });\n return encodeErrorResult({\n abi: [solidityError],\n errorName: 'Error',\n args: ['shortMessage' in error ? error.shortMessage : error.message],\n });\n}\n//# sourceMappingURL=localBatchGatewayRequest.js.map"],"names":["localBatchGatewayUrl","async","localBatchGatewayRequest","parameters","data","ccipRequest","args","queries","decodeFunctionData","abi","batchGatewayAbi","failures","responses","Promise","all","map","query","i","urls","includes","err","error","name","status","encodeErrorResult","errorName","shortMessage","solidityError","message","encodeFunctionResult","functionName","result"],"mappings":"8TAKY,MAACA,EAAuB,uBAC7BC,eAAeC,EAAyBC,GAC3C,MAAMC,KAAEA,EAAIC,YAAEA,GAAgBF,GACtBG,MAAOC,IAAcC,EAAmB,CAAEC,IAAKC,EAAiBN,SAClEO,EAAW,GACXC,EAAY,GAalB,aAZMC,QAAQC,IAAIP,EAAQQ,IAAId,MAAOe,EAAOC,KACxC,IACIL,EAAUK,GAAKD,EAAME,KAAKC,SAASnB,SACvBE,EAAyB,CAAEE,KAAMY,EAAMZ,KAAMC,sBAC7CA,EAAYW,GACxBL,EAASM,IAAK,CAClB,CACA,MAAOG,GACHT,EAASM,IAAK,EACdL,EAAUK,GAUC,sBADFI,EATkBD,GAUzBE,MAA+BD,EAAME,OACpCC,EAAkB,CACrBf,IAAKC,EACLe,UAAW,YACXnB,KAAM,CAACe,EAAME,OAAQF,EAAMK,gBAE5BF,EAAkB,CACrBf,IAAK,CAACkB,GACNF,UAAW,QACXnB,KAAM,CAAC,iBAAkBe,EAAQA,EAAMK,aAAeL,EAAMO,UAlB5D,CAQR,IAAqBP,KANVQ,EAAqB,CACxBpB,IAAKC,EACLoB,aAAc,QACdC,OAAQ,CAACpB,EAAUC,IAE3B","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{concat as t}from"../data/concat.js";import{toBytes as o,stringToBytes as e}from"../encoding/toBytes.js";import{bytesToHex as r}from"../encoding/toHex.js";import{keccak256 as n}from"../hash/keccak256.js";import{encodedLabelToLabelhash as s}from"./encodedLabelToLabelhash.js";function i(i){let c=new Uint8Array(32).fill(0);if(!i)return r(c);const m=i.split(".");for(let r=m.length-1;r>=0;r-=1){const i=s(m[r]),a=i?o(i):n(e(m[r]),"bytes");c=n(t([c,a]),"bytes")}return r(c)}export{i as namehash};
|
|
2
|
+
//# sourceMappingURL=namehash.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"namehash.js","sources":["../../../../../../../node_modules/viem/_esm/utils/ens/namehash.js"],"sourcesContent":["import { concat } from '../data/concat.js';\nimport { stringToBytes, toBytes, } from '../encoding/toBytes.js';\nimport { bytesToHex } from '../encoding/toHex.js';\nimport { keccak256 } from '../hash/keccak256.js';\nimport { encodedLabelToLabelhash, } from './encodedLabelToLabelhash.js';\n/**\n * @description Hashes ENS name\n *\n * - Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `namehash`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this.\n *\n * @example\n * namehash('wevm.eth')\n * '0x08c85f2f4059e930c45a6aeff9dcd3bd95dc3c5c1cddef6a0626b31152248560'\n *\n * @link https://eips.ethereum.org/EIPS/eip-137\n */\nexport function namehash(name) {\n let result = new Uint8Array(32).fill(0);\n if (!name)\n return bytesToHex(result);\n const labels = name.split('.');\n // Iterate in reverse order building up hash\n for (let i = labels.length - 1; i >= 0; i -= 1) {\n const hashFromEncodedLabel = encodedLabelToLabelhash(labels[i]);\n const hashed = hashFromEncodedLabel\n ? toBytes(hashFromEncodedLabel)\n : keccak256(stringToBytes(labels[i]), 'bytes');\n result = keccak256(concat([result, hashed]), 'bytes');\n }\n return bytesToHex(result);\n}\n//# sourceMappingURL=namehash.js.map"],"names":["namehash","name","result","Uint8Array","fill","bytesToHex","labels","split","i","length","hashFromEncodedLabel","encodedLabelToLabelhash","hashed","toBytes","keccak256","stringToBytes","concat"],"mappings":"yRAgBO,SAASA,EAASC,GACrB,IAAIC,EAAS,IAAIC,WAAW,IAAIC,KAAK,GACrC,IAAKH,EACD,OAAOI,EAAWH,GACtB,MAAMI,EAASL,EAAKM,MAAM,KAE1B,IAAK,IAAIC,EAAIF,EAAOG,OAAS,EAAGD,GAAK,EAAGA,GAAK,EAAG,CAC5C,MAAME,EAAuBC,EAAwBL,EAAOE,IACtDI,EAASF,EACTG,EAAQH,GACRI,EAAUC,EAAcT,EAAOE,IAAK,SAC1CN,EAASY,EAAUE,EAAO,CAACd,EAAQU,IAAU,QACjD,CACA,OAAOP,EAAWH,EACtB","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{stringToBytes as t}from"../encoding/toBytes.js";import{encodeLabelhash as e}from"./encodeLabelhash.js";import{labelhash as n}from"./labelhash.js";function r(r){const o=r.replace(/^\.|\.$/gm,"");if(0===o.length)return new Uint8Array(1);const l=new Uint8Array(t(o).byteLength+2);let s=0;const h=o.split(".");for(let r=0;r<h.length;r++){let o=t(h[r]);o.byteLength>255&&(o=t(e(n(h[r])))),l[s]=o.length,l.set(o,s+1),s+=o.length+1}return l.byteLength!==s+1?l.slice(0,s+1):l}export{r as packetToBytes};
|
|
2
|
+
//# sourceMappingURL=packetToBytes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packetToBytes.js","sources":["../../../../../../../node_modules/viem/_esm/utils/ens/packetToBytes.js"],"sourcesContent":["import { stringToBytes, } from '../encoding/toBytes.js';\nimport { encodeLabelhash, } from './encodeLabelhash.js';\nimport { labelhash } from './labelhash.js';\n/*\n * @description Encodes a DNS packet into a ByteArray containing a UDP payload.\n *\n * @example\n * packetToBytes('awkweb.eth')\n * '0x0661776b7765620365746800'\n *\n * @see https://docs.ens.domains/resolution/names#dns\n *\n */\nexport function packetToBytes(packet) {\n // strip leading and trailing `.`\n const value = packet.replace(/^\\.|\\.$/gm, '');\n if (value.length === 0)\n return new Uint8Array(1);\n const bytes = new Uint8Array(stringToBytes(value).byteLength + 2);\n let offset = 0;\n const list = value.split('.');\n for (let i = 0; i < list.length; i++) {\n let encoded = stringToBytes(list[i]);\n // if the length is > 255, make the encoded label value a labelhash\n // this is compatible with the universal resolver\n if (encoded.byteLength > 255)\n encoded = stringToBytes(encodeLabelhash(labelhash(list[i])));\n bytes[offset] = encoded.length;\n bytes.set(encoded, offset + 1);\n offset += encoded.length + 1;\n }\n if (bytes.byteLength !== offset + 1)\n return bytes.slice(0, offset + 1);\n return bytes;\n}\n//# sourceMappingURL=packetToBytes.js.map"],"names":["packetToBytes","packet","value","replace","length","Uint8Array","bytes","stringToBytes","byteLength","offset","list","split","i","encoded","encodeLabelhash","labelhash","set","slice"],"mappings":"yJAaO,SAASA,EAAcC,GAE1B,MAAMC,EAAQD,EAAOE,QAAQ,YAAa,IAC1C,GAAqB,IAAjBD,EAAME,OACN,OAAO,IAAIC,WAAW,GAC1B,MAAMC,EAAQ,IAAID,WAAWE,EAAcL,GAAOM,WAAa,GAC/D,IAAIC,EAAS,EACb,MAAMC,EAAOR,EAAMS,MAAM,KACzB,IAAK,IAAIC,EAAI,EAAGA,EAAIF,EAAKN,OAAQQ,IAAK,CAClC,IAAIC,EAAUN,EAAcG,EAAKE,IAG7BC,EAAQL,WAAa,MACrBK,EAAUN,EAAcO,EAAgBC,EAAUL,EAAKE,OAC3DN,EAAMG,GAAUI,EAAQT,OACxBE,EAAMU,IAAIH,EAASJ,EAAS,GAC5BA,GAAUI,EAAQT,OAAS,CAC/B,CACA,OAAIE,EAAME,aAAeC,EAAS,EACvBH,EAAMW,MAAM,EAAGR,EAAS,GAC5BH,CACX","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{CallExecutionError as r}from"../../errors/contract.js";import{UnknownNodeError as o}from"../../errors/node.js";import{getNodeError as t}from"./getNodeError.js";function n(n,{docsPath:e,...s}){const c=(()=>{const r=t(n,s);return r instanceof o?n:r})();return new r(c,{docsPath:e,...s})}export{n as getCallError};
|
|
2
|
+
//# sourceMappingURL=getCallError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCallError.js","sources":["../../../../../../../node_modules/viem/_esm/utils/errors/getCallError.js"],"sourcesContent":["import { CallExecutionError, } from '../../errors/contract.js';\nimport { UnknownNodeError } from '../../errors/node.js';\nimport { getNodeError, } from './getNodeError.js';\nexport function getCallError(err, { docsPath, ...args }) {\n const cause = (() => {\n const cause = getNodeError(err, args);\n if (cause instanceof UnknownNodeError)\n return err;\n return cause;\n })();\n return new CallExecutionError(cause, {\n docsPath,\n ...args,\n });\n}\n//# sourceMappingURL=getCallError.js.map"],"names":["getCallError","err","docsPath","args","cause","getNodeError","UnknownNodeError","CallExecutionError"],"mappings":"uKAGO,SAASA,EAAaC,GAAKC,SAAEA,KAAaC,IAC7C,MAAMC,EAAQ,MACV,MAAMA,EAAQC,EAAaJ,EAAKE,GAChC,OAAIC,aAAiBE,EACVL,EACJG,CACV,EALa,GAMd,OAAO,IAAIG,EAAmBH,EAAO,CACjCF,cACGC,GAEX","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{AbiDecodingZeroDataError as e}from"../../errors/abi.js";import{BaseError as r}from"../../errors/base.js";import{RawContractError as s,ContractFunctionZeroDataError as o,ContractFunctionRevertedError as a,ContractFunctionExecutionError as t}from"../../errors/contract.js";import{RpcRequestError as n}from"../../errors/request.js";import{InternalRpcError as c}from"../../errors/rpc.js";const i=3;function d(d,{abi:m,address:f,args:p,docsPath:u,functionName:b,sender:j}){const g=d instanceof s?d:d instanceof r?d.walk(e=>"data"in e)||d.walk():{},{code:w,data:l,details:N,message:h,shortMessage:k}=g,P=d instanceof e?new o({functionName:b}):[i,c.code].includes(w)&&(l||N||h||k)?new a({abi:m,data:"object"==typeof l?l.data:l,functionName:b,message:g instanceof n?N:k??h}):d;return new t(P,{abi:m,args:p,contractAddress:f,docsPath:u,functionName:b,sender:j})}export{d as getContractError};
|
|
2
|
+
//# sourceMappingURL=getContractError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getContractError.js","sources":["../../../../../../../node_modules/viem/_esm/utils/errors/getContractError.js"],"sourcesContent":["import { AbiDecodingZeroDataError } from '../../errors/abi.js';\nimport { BaseError } from '../../errors/base.js';\nimport { ContractFunctionExecutionError, ContractFunctionRevertedError, ContractFunctionZeroDataError, RawContractError, } from '../../errors/contract.js';\nimport { RpcRequestError } from '../../errors/request.js';\nimport { InternalRpcError } from '../../errors/rpc.js';\nconst EXECUTION_REVERTED_ERROR_CODE = 3;\nexport function getContractError(err, { abi, address, args, docsPath, functionName, sender, }) {\n const error = (err instanceof RawContractError\n ? err\n : err instanceof BaseError\n ? err.walk((err) => 'data' in err) || err.walk()\n : {});\n const { code, data, details, message, shortMessage } = error;\n const cause = (() => {\n if (err instanceof AbiDecodingZeroDataError)\n return new ContractFunctionZeroDataError({ functionName });\n if ([EXECUTION_REVERTED_ERROR_CODE, InternalRpcError.code].includes(code) &&\n (data || details || message || shortMessage)) {\n return new ContractFunctionRevertedError({\n abi,\n data: typeof data === 'object' ? data.data : data,\n functionName,\n message: error instanceof RpcRequestError\n ? details\n : (shortMessage ?? message),\n });\n }\n return err;\n })();\n return new ContractFunctionExecutionError(cause, {\n abi,\n args,\n contractAddress: address,\n docsPath,\n functionName,\n sender,\n });\n}\n//# sourceMappingURL=getContractError.js.map"],"names":["EXECUTION_REVERTED_ERROR_CODE","getContractError","err","abi","address","args","docsPath","functionName","sender","error","RawContractError","BaseError","walk","code","data","details","message","shortMessage","cause","AbiDecodingZeroDataError","ContractFunctionZeroDataError","InternalRpcError","includes","ContractFunctionRevertedError","RpcRequestError","ContractFunctionExecutionError","contractAddress"],"mappings":"uYAKA,MAAMA,EAAgC,EAC/B,SAASC,EAAiBC,GAAKC,IAAEA,EAAGC,QAAEA,EAAOC,KAAEA,EAAIC,SAAEA,EAAQC,aAAEA,EAAYC,OAAEA,IAChF,MAAMC,EAASP,aAAeQ,EACxBR,EACAA,aAAeS,EACXT,EAAIU,KAAMV,GAAQ,SAAUA,IAAQA,EAAIU,OACxC,IACJC,KAAEA,EAAIC,KAAEA,EAAIC,QAAEA,EAAOC,QAAEA,EAAOC,aAAEA,GAAiBR,EACjDS,EACEhB,aAAeiB,EACR,IAAIC,EAA8B,CAAEb,iBAC3C,CAACP,EAA+BqB,EAAiBR,MAAMS,SAAST,KAC/DC,GAAQC,GAAWC,GAAWC,GACxB,IAAIM,EAA8B,CACrCpB,MACAW,KAAsB,iBAATA,EAAoBA,EAAKA,KAAOA,EAC7CP,eACAS,QAASP,aAAiBe,EACpBT,EACCE,GAAgBD,IAGxBd,EAEX,OAAO,IAAIuB,EAA+BP,EAAO,CAC7Cf,MACAE,OACAqB,gBAAiBtB,EACjBE,WACAC,eACAC,UAER","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{EstimateGasExecutionError as r}from"../../errors/estimateGas.js";import{UnknownNodeError as o}from"../../errors/node.js";import{getNodeError as t}from"./getNodeError.js";function e(e,{docsPath:s,...n}){const m=(()=>{const r=t(e,n);return r instanceof o?e:r})();return new r(m,{docsPath:s,...n})}export{e as getEstimateGasError};
|
|
2
|
+
//# sourceMappingURL=getEstimateGasError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getEstimateGasError.js","sources":["../../../../../../../node_modules/viem/_esm/utils/errors/getEstimateGasError.js"],"sourcesContent":["import { EstimateGasExecutionError, } from '../../errors/estimateGas.js';\nimport { UnknownNodeError } from '../../errors/node.js';\nimport { getNodeError, } from './getNodeError.js';\nexport function getEstimateGasError(err, { docsPath, ...args }) {\n const cause = (() => {\n const cause = getNodeError(err, args);\n if (cause instanceof UnknownNodeError)\n return err;\n return cause;\n })();\n return new EstimateGasExecutionError(cause, {\n docsPath,\n ...args,\n });\n}\n//# sourceMappingURL=getEstimateGasError.js.map"],"names":["getEstimateGasError","err","docsPath","args","cause","getNodeError","UnknownNodeError","EstimateGasExecutionError"],"mappings":"iLAGO,SAASA,EAAoBC,GAAKC,SAAEA,KAAaC,IACpD,MAAMC,EAAQ,MACV,MAAMA,EAAQC,EAAaJ,EAAKE,GAChC,OAAIC,aAAiBE,EACVL,EACJG,CACV,EALa,GAMd,OAAO,IAAIG,EAA0BH,EAAO,CACxCF,cACGC,GAEX","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{BaseError as e}from"../../errors/base.js";import{ExecutionRevertedError as s,FeeCapTooHighError as a,FeeCapTooLowError as n,NonceTooHighError as t,NonceTooLowError as o,NonceMaxValueError as r,InsufficientFundsError as c,IntrinsicGasTooHighError as d,IntrinsicGasTooLowError as g,TransactionTypeNotSupportedError as u,TipAboveFeeCapError as w,UnknownNodeError as m}from"../../errors/node.js";function i(i,M){const P=(i.details||"").toLowerCase(),x=i instanceof e?i.walk(e=>e?.code===s.code):i;return x instanceof e?new s({cause:i,message:x.details}):s.nodeMessage.test(P)?new s({cause:i,message:i.details}):a.nodeMessage.test(P)?new a({cause:i,maxFeePerGas:M?.maxFeePerGas}):n.nodeMessage.test(P)?new n({cause:i,maxFeePerGas:M?.maxFeePerGas}):t.nodeMessage.test(P)?new t({cause:i,nonce:M?.nonce}):o.nodeMessage.test(P)?new o({cause:i,nonce:M?.nonce}):r.nodeMessage.test(P)?new r({cause:i,nonce:M?.nonce}):c.nodeMessage.test(P)?new c({cause:i}):d.nodeMessage.test(P)?new d({cause:i,gas:M?.gas}):g.nodeMessage.test(P)?new g({cause:i,gas:M?.gas}):u.nodeMessage.test(P)?new u({cause:i}):w.nodeMessage.test(P)?new w({cause:i,maxFeePerGas:M?.maxFeePerGas,maxPriorityFeePerGas:M?.maxPriorityFeePerGas}):new m({cause:i})}export{i as getNodeError};
|
|
2
|
+
//# sourceMappingURL=getNodeError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getNodeError.js","sources":["../../../../../../../node_modules/viem/_esm/utils/errors/getNodeError.js"],"sourcesContent":["import { BaseError } from '../../errors/base.js';\nimport { ExecutionRevertedError, FeeCapTooHighError, FeeCapTooLowError, InsufficientFundsError, IntrinsicGasTooHighError, IntrinsicGasTooLowError, NonceMaxValueError, NonceTooHighError, NonceTooLowError, TipAboveFeeCapError, TransactionTypeNotSupportedError, UnknownNodeError, } from '../../errors/node.js';\nimport { RpcRequestError } from '../../errors/request.js';\nimport { InvalidInputRpcError, TransactionRejectedRpcError, } from '../../errors/rpc.js';\nexport function containsNodeError(err) {\n return (err instanceof TransactionRejectedRpcError ||\n err instanceof InvalidInputRpcError ||\n (err instanceof RpcRequestError && err.code === ExecutionRevertedError.code));\n}\nexport function getNodeError(err, args) {\n const message = (err.details || '').toLowerCase();\n const executionRevertedError = err instanceof BaseError\n ? err.walk((e) => e?.code ===\n ExecutionRevertedError.code)\n : err;\n if (executionRevertedError instanceof BaseError)\n return new ExecutionRevertedError({\n cause: err,\n message: executionRevertedError.details,\n });\n if (ExecutionRevertedError.nodeMessage.test(message))\n return new ExecutionRevertedError({\n cause: err,\n message: err.details,\n });\n if (FeeCapTooHighError.nodeMessage.test(message))\n return new FeeCapTooHighError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas,\n });\n if (FeeCapTooLowError.nodeMessage.test(message))\n return new FeeCapTooLowError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas,\n });\n if (NonceTooHighError.nodeMessage.test(message))\n return new NonceTooHighError({ cause: err, nonce: args?.nonce });\n if (NonceTooLowError.nodeMessage.test(message))\n return new NonceTooLowError({ cause: err, nonce: args?.nonce });\n if (NonceMaxValueError.nodeMessage.test(message))\n return new NonceMaxValueError({ cause: err, nonce: args?.nonce });\n if (InsufficientFundsError.nodeMessage.test(message))\n return new InsufficientFundsError({ cause: err });\n if (IntrinsicGasTooHighError.nodeMessage.test(message))\n return new IntrinsicGasTooHighError({ cause: err, gas: args?.gas });\n if (IntrinsicGasTooLowError.nodeMessage.test(message))\n return new IntrinsicGasTooLowError({ cause: err, gas: args?.gas });\n if (TransactionTypeNotSupportedError.nodeMessage.test(message))\n return new TransactionTypeNotSupportedError({ cause: err });\n if (TipAboveFeeCapError.nodeMessage.test(message))\n return new TipAboveFeeCapError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas,\n maxPriorityFeePerGas: args?.maxPriorityFeePerGas,\n });\n return new UnknownNodeError({\n cause: err,\n });\n}\n//# sourceMappingURL=getNodeError.js.map"],"names":["getNodeError","err","args","message","details","toLowerCase","executionRevertedError","BaseError","walk","e","code","ExecutionRevertedError","cause","nodeMessage","test","FeeCapTooHighError","maxFeePerGas","FeeCapTooLowError","NonceTooHighError","nonce","NonceTooLowError","NonceMaxValueError","InsufficientFundsError","IntrinsicGasTooHighError","gas","IntrinsicGasTooLowError","TransactionTypeNotSupportedError","TipAboveFeeCapError","maxPriorityFeePerGas","UnknownNodeError"],"mappings":"+YASO,SAASA,EAAaC,EAAKC,GAC9B,MAAMC,GAAWF,EAAIG,SAAW,IAAIC,cAC9BC,EAAyBL,aAAeM,EACxCN,EAAIO,KAAMC,GAAMA,GAAGC,OACjBC,EAAuBD,MACzBT,EACN,OAAIK,aAAkCC,EAC3B,IAAII,EAAuB,CAC9BC,MAAOX,EACPE,QAASG,EAAuBF,UAEpCO,EAAuBE,YAAYC,KAAKX,GACjC,IAAIQ,EAAuB,CAC9BC,MAAOX,EACPE,QAASF,EAAIG,UAEjBW,EAAmBF,YAAYC,KAAKX,GAC7B,IAAIY,EAAmB,CAC1BH,MAAOX,EACPe,aAAcd,GAAMc,eAExBC,EAAkBJ,YAAYC,KAAKX,GAC5B,IAAIc,EAAkB,CACzBL,MAAOX,EACPe,aAAcd,GAAMc,eAExBE,EAAkBL,YAAYC,KAAKX,GAC5B,IAAIe,EAAkB,CAAEN,MAAOX,EAAKkB,MAAOjB,GAAMiB,QACxDC,EAAiBP,YAAYC,KAAKX,GAC3B,IAAIiB,EAAiB,CAAER,MAAOX,EAAKkB,MAAOjB,GAAMiB,QACvDE,EAAmBR,YAAYC,KAAKX,GAC7B,IAAIkB,EAAmB,CAAET,MAAOX,EAAKkB,MAAOjB,GAAMiB,QACzDG,EAAuBT,YAAYC,KAAKX,GACjC,IAAImB,EAAuB,CAAEV,MAAOX,IAC3CsB,EAAyBV,YAAYC,KAAKX,GACnC,IAAIoB,EAAyB,CAAEX,MAAOX,EAAKuB,IAAKtB,GAAMsB,MAC7DC,EAAwBZ,YAAYC,KAAKX,GAClC,IAAIsB,EAAwB,CAAEb,MAAOX,EAAKuB,IAAKtB,GAAMsB,MAC5DE,EAAiCb,YAAYC,KAAKX,GAC3C,IAAIuB,EAAiC,CAAEd,MAAOX,IACrD0B,EAAoBd,YAAYC,KAAKX,GAC9B,IAAIwB,EAAoB,CAC3Bf,MAAOX,EACPe,aAAcd,GAAMc,aACpBY,qBAAsB1B,GAAM0B,uBAE7B,IAAIC,EAAiB,CACxBjB,MAAOX,GAEf","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function t(t,{method:s}){const e={};return"fallback"===t.transport.type&&t.transport.onResponse?.(({method:t,response:r,status:o,transport:n})=>{"success"===o&&s===t&&(e[r]=n.request)}),s=>e[s]||t.request}export{t as createFilterRequestScope};
|
|
2
|
+
//# sourceMappingURL=createFilterRequestScope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createFilterRequestScope.js","sources":["../../../../../../../node_modules/viem/_esm/utils/filters/createFilterRequestScope.js"],"sourcesContent":["/**\n * Scopes `request` to the filter ID. If the client is a fallback, it will\n * listen for responses and scope the child transport `request` function\n * to the successful filter ID.\n */\nexport function createFilterRequestScope(client, { method }) {\n const requestMap = {};\n if (client.transport.type === 'fallback')\n client.transport.onResponse?.(({ method: method_, response: id, status, transport, }) => {\n if (status === 'success' && method === method_)\n requestMap[id] = transport.request;\n });\n return ((id) => requestMap[id] || client.request);\n}\n//# sourceMappingURL=createFilterRequestScope.js.map"],"names":["createFilterRequestScope","client","method","requestMap","transport","type","onResponse","method_","response","id","status","request"],"mappings":"AAKO,SAASA,EAAyBC,GAAQC,OAAEA,IAC/C,MAAMC,EAAa,CAAA,EAMnB,MAL8B,aAA1BF,EAAOG,UAAUC,MACjBJ,EAAOG,UAAUE,aAAa,EAAGJ,OAAQK,EAASC,SAAUC,EAAIC,SAAQN,gBACrD,YAAXM,GAAwBR,IAAWK,IACnCJ,EAAWM,GAAML,EAAUO,WAE9BF,GAAON,EAAWM,IAAOR,EAAOU,OAC7C","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{formatTransaction as s}from"./transaction.js";function i(i){const t=(i.transactions??[]).map(i=>"string"==typeof i?i:s(i));return{...i,baseFeePerGas:i.baseFeePerGas?BigInt(i.baseFeePerGas):null,blobGasUsed:i.blobGasUsed?BigInt(i.blobGasUsed):void 0,difficulty:i.difficulty?BigInt(i.difficulty):void 0,excessBlobGas:i.excessBlobGas?BigInt(i.excessBlobGas):void 0,gasLimit:i.gasLimit?BigInt(i.gasLimit):void 0,gasUsed:i.gasUsed?BigInt(i.gasUsed):void 0,hash:i.hash?i.hash:null,logsBloom:i.logsBloom?i.logsBloom:null,nonce:i.nonce?i.nonce:null,number:i.number?BigInt(i.number):null,size:i.size?BigInt(i.size):void 0,timestamp:i.timestamp?BigInt(i.timestamp):void 0,transactions:t,totalDifficulty:i.totalDifficulty?BigInt(i.totalDifficulty):null}}export{i as formatBlock};
|
|
2
|
+
//# sourceMappingURL=block.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block.js","sources":["../../../../../../../node_modules/viem/_esm/utils/formatters/block.js"],"sourcesContent":["import { defineFormatter } from './formatter.js';\nimport { formatTransaction } from './transaction.js';\nexport function formatBlock(block) {\n const transactions = (block.transactions ?? []).map((transaction) => {\n if (typeof transaction === 'string')\n return transaction;\n return formatTransaction(transaction);\n });\n return {\n ...block,\n baseFeePerGas: block.baseFeePerGas ? BigInt(block.baseFeePerGas) : null,\n blobGasUsed: block.blobGasUsed ? BigInt(block.blobGasUsed) : undefined,\n difficulty: block.difficulty ? BigInt(block.difficulty) : undefined,\n excessBlobGas: block.excessBlobGas\n ? BigInt(block.excessBlobGas)\n : undefined,\n gasLimit: block.gasLimit ? BigInt(block.gasLimit) : undefined,\n gasUsed: block.gasUsed ? BigInt(block.gasUsed) : undefined,\n hash: block.hash ? block.hash : null,\n logsBloom: block.logsBloom ? block.logsBloom : null,\n nonce: block.nonce ? block.nonce : null,\n number: block.number ? BigInt(block.number) : null,\n size: block.size ? BigInt(block.size) : undefined,\n timestamp: block.timestamp ? BigInt(block.timestamp) : undefined,\n transactions,\n totalDifficulty: block.totalDifficulty\n ? BigInt(block.totalDifficulty)\n : null,\n };\n}\nexport const defineBlock = /*#__PURE__*/ defineFormatter('block', formatBlock);\n//# sourceMappingURL=block.js.map"],"names":["formatBlock","block","transactions","map","transaction","formatTransaction","baseFeePerGas","BigInt","blobGasUsed","undefined","difficulty","excessBlobGas","gasLimit","gasUsed","hash","logsBloom","nonce","number","size","timestamp","totalDifficulty"],"mappings":"qDAEO,SAASA,EAAYC,GACxB,MAAMC,GAAgBD,EAAMC,cAAgB,IAAIC,IAAKC,GACtB,iBAAhBA,EACAA,EACJC,EAAkBD,IAE7B,MAAO,IACAH,EACHK,cAAeL,EAAMK,cAAgBC,OAAON,EAAMK,eAAiB,KACnEE,YAAaP,EAAMO,YAAcD,OAAON,EAAMO,kBAAeC,EAC7DC,WAAYT,EAAMS,WAAaH,OAAON,EAAMS,iBAAcD,EAC1DE,cAAeV,EAAMU,cACfJ,OAAON,EAAMU,oBACbF,EACNG,SAAUX,EAAMW,SAAWL,OAAON,EAAMW,eAAYH,EACpDI,QAASZ,EAAMY,QAAUN,OAAON,EAAMY,cAAWJ,EACjDK,KAAMb,EAAMa,KAAOb,EAAMa,KAAO,KAChCC,UAAWd,EAAMc,UAAYd,EAAMc,UAAY,KAC/CC,MAAOf,EAAMe,MAAQf,EAAMe,MAAQ,KACnCC,OAAQhB,EAAMgB,OAASV,OAAON,EAAMgB,QAAU,KAC9CC,KAAMjB,EAAMiB,KAAOX,OAAON,EAAMiB,WAAQT,EACxCU,UAAWlB,EAAMkB,UAAYZ,OAAON,EAAMkB,gBAAaV,EACvDP,eACAkB,gBAAiBnB,EAAMmB,gBACjBb,OAAON,EAAMmB,iBACb,KAEd","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extract.js","sources":["../../../../../../../node_modules/viem/_esm/utils/formatters/extract.js"],"sourcesContent":["/**\n * @description Picks out the keys from `value` that exist in the formatter..\n */\nexport function extract(value_, { format }) {\n if (!format)\n return {};\n const value = {};\n function extract_(formatted) {\n const keys = Object.keys(formatted);\n for (const key of keys) {\n if (key in value_)\n value[key] = value_[key];\n if (formatted[key] &&\n typeof formatted[key] === 'object' &&\n !Array.isArray(formatted[key]))\n extract_(formatted[key]);\n }\n }\n const formatted = format(value_ || {});\n extract_(formatted);\n return value;\n}\n//# sourceMappingURL=extract.js.map"],"names":["extract","value_","format","value","extract_","formatted","keys","Object","key","Array","isArray"],"mappings":"AAGO,SAASA,EAAQC,GAAQC,OAAEA,IAC9B,IAAKA,EACD,MAAO,CAAA,EACX,MAAMC,EAAQ,CAAA,EAcd,OAbA,SAASC,EAASC,GACd,MAAMC,EAAOC,OAAOD,KAAKD,GACzB,IAAK,MAAMG,KAAOF,EACVE,KAAOP,IACPE,EAAMK,GAAOP,EAAOO,IACpBH,EAAUG,IACgB,iBAAnBH,EAAUG,KAChBC,MAAMC,QAAQL,EAAUG,KACzBJ,EAASC,EAAUG,GAE/B,CAEAJ,CADkBF,EAAOD,GAAU,KAE5BE,CACX","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feeHistory.js","sources":["../../../../../../../node_modules/viem/_esm/utils/formatters/feeHistory.js"],"sourcesContent":["export function formatFeeHistory(feeHistory) {\n return {\n baseFeePerGas: feeHistory.baseFeePerGas.map((value) => BigInt(value)),\n gasUsedRatio: feeHistory.gasUsedRatio,\n oldestBlock: BigInt(feeHistory.oldestBlock),\n reward: feeHistory.reward?.map((reward) => reward.map((value) => BigInt(value))),\n };\n}\n//# sourceMappingURL=feeHistory.js.map"],"names":["formatFeeHistory","feeHistory","baseFeePerGas","map","value","BigInt","gasUsedRatio","oldestBlock","reward"],"mappings":"AAAO,SAASA,EAAiBC,GAC7B,MAAO,CACHC,cAAeD,EAAWC,cAAcC,IAAKC,GAAUC,OAAOD,IAC9DE,aAAcL,EAAWK,aACzBC,YAAaF,OAAOJ,EAAWM,aAC/BC,OAAQP,EAAWO,QAAQL,IAAKK,GAAWA,EAAOL,IAAKC,GAAUC,OAAOD,KAEhF","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function n(n,{args:a,eventName:e}={}){return{...n,blockHash:n.blockHash?n.blockHash:null,blockNumber:n.blockNumber?BigInt(n.blockNumber):null,logIndex:n.logIndex?Number(n.logIndex):null,transactionHash:n.transactionHash?n.transactionHash:null,transactionIndex:n.transactionIndex?Number(n.transactionIndex):null,...e?{args:a,eventName:e}:{}}}export{n as formatLog};
|
|
2
|
+
//# sourceMappingURL=log.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.js","sources":["../../../../../../../node_modules/viem/_esm/utils/formatters/log.js"],"sourcesContent":["export function formatLog(log, { args, eventName, } = {}) {\n return {\n ...log,\n blockHash: log.blockHash ? log.blockHash : null,\n blockNumber: log.blockNumber ? BigInt(log.blockNumber) : null,\n logIndex: log.logIndex ? Number(log.logIndex) : null,\n transactionHash: log.transactionHash ? log.transactionHash : null,\n transactionIndex: log.transactionIndex\n ? Number(log.transactionIndex)\n : null,\n ...(eventName ? { args, eventName } : {}),\n };\n}\n//# sourceMappingURL=log.js.map"],"names":["formatLog","log","args","eventName","blockHash","blockNumber","BigInt","logIndex","Number","transactionHash","transactionIndex"],"mappings":"AAAO,SAASA,EAAUC,GAAKC,KAAEA,EAAIC,UAAEA,GAAe,CAAA,GAClD,MAAO,IACAF,EACHG,UAAWH,EAAIG,UAAYH,EAAIG,UAAY,KAC3CC,YAAaJ,EAAII,YAAcC,OAAOL,EAAII,aAAe,KACzDE,SAAUN,EAAIM,SAAWC,OAAOP,EAAIM,UAAY,KAChDE,gBAAiBR,EAAIQ,gBAAkBR,EAAIQ,gBAAkB,KAC7DC,iBAAkBT,EAAIS,iBAChBF,OAAOP,EAAIS,kBACX,QACFP,EAAY,CAAED,OAAMC,aAAc,CAAA,EAE9C","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{hexToNumber as o}from"../encoding/fromHex.js";function n(n){return{...n,balance:n.balance?BigInt(n.balance):void 0,nonce:n.nonce?o(n.nonce):void 0,storageProof:n.storageProof?(e=n.storageProof,e.map(o=>({...o,value:BigInt(o.value)}))):void 0};var e}export{n as formatProof};
|
|
2
|
+
//# sourceMappingURL=proof.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proof.js","sources":["../../../../../../../node_modules/viem/_esm/utils/formatters/proof.js"],"sourcesContent":["import { hexToNumber } from '../index.js';\nfunction formatStorageProof(storageProof) {\n return storageProof.map((proof) => ({\n ...proof,\n value: BigInt(proof.value),\n }));\n}\nexport function formatProof(proof) {\n return {\n ...proof,\n balance: proof.balance ? BigInt(proof.balance) : undefined,\n nonce: proof.nonce ? hexToNumber(proof.nonce) : undefined,\n storageProof: proof.storageProof\n ? formatStorageProof(proof.storageProof)\n : undefined,\n };\n}\n//# sourceMappingURL=proof.js.map"],"names":["formatProof","proof","balance","BigInt","undefined","nonce","hexToNumber","storageProof","map","value"],"mappings":"qDAOO,SAASA,EAAYC,GACxB,MAAO,IACAA,EACHC,QAASD,EAAMC,QAAUC,OAAOF,EAAMC,cAAWE,EACjDC,MAAOJ,EAAMI,MAAQC,EAAYL,EAAMI,YAASD,EAChDG,aAAcN,EAAMM,cAXAA,EAYKN,EAAMM,aAX5BA,EAAaC,IAAKP,IAAK,IACvBA,EACHQ,MAAON,OAAOF,EAAMQ,gBAUdL,GAbd,IAA4BG,CAe5B","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{hexToNumber as e}from"../encoding/fromHex.js";const a={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function i(i){const t={...i,blockHash:i.blockHash?i.blockHash:null,blockNumber:i.blockNumber?BigInt(i.blockNumber):null,chainId:i.chainId?e(i.chainId):void 0,gas:i.gas?BigInt(i.gas):void 0,gasPrice:i.gasPrice?BigInt(i.gasPrice):void 0,maxFeePerBlobGas:i.maxFeePerBlobGas?BigInt(i.maxFeePerBlobGas):void 0,maxFeePerGas:i.maxFeePerGas?BigInt(i.maxFeePerGas):void 0,maxPriorityFeePerGas:i.maxPriorityFeePerGas?BigInt(i.maxPriorityFeePerGas):void 0,nonce:i.nonce?e(i.nonce):void 0,to:i.to?i.to:null,transactionIndex:i.transactionIndex?Number(i.transactionIndex):null,type:i.type?a[i.type]:void 0,typeHex:i.type?i.type:void 0,value:i.value?BigInt(i.value):void 0,v:i.v?BigInt(i.v):void 0};return i.authorizationList&&(t.authorizationList=i.authorizationList.map(e=>({address:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:e.r,s:e.s,yParity:Number(e.yParity)}))),t.yParity=(()=>{if(i.yParity)return Number(i.yParity);if("bigint"==typeof t.v){if(0n===t.v||27n===t.v)return 0;if(1n===t.v||28n===t.v)return 1;if(t.v>=35n)return t.v%2n==0n?1:0}})(),"legacy"===t.type&&(delete t.accessList,delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),"eip2930"===t.type&&(delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),"eip1559"===t.type&&delete t.maxFeePerBlobGas,t}export{i as formatTransaction,a as transactionType};
|
|
2
|
+
//# sourceMappingURL=transaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction.js","sources":["../../../../../../../node_modules/viem/_esm/utils/formatters/transaction.js"],"sourcesContent":["import { hexToNumber } from '../encoding/fromHex.js';\nimport { defineFormatter } from './formatter.js';\nexport const transactionType = {\n '0x0': 'legacy',\n '0x1': 'eip2930',\n '0x2': 'eip1559',\n '0x3': 'eip4844',\n '0x4': 'eip7702',\n};\nexport function formatTransaction(transaction) {\n const transaction_ = {\n ...transaction,\n blockHash: transaction.blockHash ? transaction.blockHash : null,\n blockNumber: transaction.blockNumber\n ? BigInt(transaction.blockNumber)\n : null,\n chainId: transaction.chainId ? hexToNumber(transaction.chainId) : undefined,\n gas: transaction.gas ? BigInt(transaction.gas) : undefined,\n gasPrice: transaction.gasPrice ? BigInt(transaction.gasPrice) : undefined,\n maxFeePerBlobGas: transaction.maxFeePerBlobGas\n ? BigInt(transaction.maxFeePerBlobGas)\n : undefined,\n maxFeePerGas: transaction.maxFeePerGas\n ? BigInt(transaction.maxFeePerGas)\n : undefined,\n maxPriorityFeePerGas: transaction.maxPriorityFeePerGas\n ? BigInt(transaction.maxPriorityFeePerGas)\n : undefined,\n nonce: transaction.nonce ? hexToNumber(transaction.nonce) : undefined,\n to: transaction.to ? transaction.to : null,\n transactionIndex: transaction.transactionIndex\n ? Number(transaction.transactionIndex)\n : null,\n type: transaction.type\n ? transactionType[transaction.type]\n : undefined,\n typeHex: transaction.type ? transaction.type : undefined,\n value: transaction.value ? BigInt(transaction.value) : undefined,\n v: transaction.v ? BigInt(transaction.v) : undefined,\n };\n if (transaction.authorizationList)\n transaction_.authorizationList = formatAuthorizationList(transaction.authorizationList);\n transaction_.yParity = (() => {\n // If `yParity` is provided, we will use it.\n if (transaction.yParity)\n return Number(transaction.yParity);\n // If no `yParity` provided, try derive from `v`.\n if (typeof transaction_.v === 'bigint') {\n if (transaction_.v === 0n || transaction_.v === 27n)\n return 0;\n if (transaction_.v === 1n || transaction_.v === 28n)\n return 1;\n if (transaction_.v >= 35n)\n return transaction_.v % 2n === 0n ? 1 : 0;\n }\n return undefined;\n })();\n if (transaction_.type === 'legacy') {\n delete transaction_.accessList;\n delete transaction_.maxFeePerBlobGas;\n delete transaction_.maxFeePerGas;\n delete transaction_.maxPriorityFeePerGas;\n delete transaction_.yParity;\n }\n if (transaction_.type === 'eip2930') {\n delete transaction_.maxFeePerBlobGas;\n delete transaction_.maxFeePerGas;\n delete transaction_.maxPriorityFeePerGas;\n }\n if (transaction_.type === 'eip1559') {\n delete transaction_.maxFeePerBlobGas;\n }\n return transaction_;\n}\nexport const defineTransaction = /*#__PURE__*/ defineFormatter('transaction', formatTransaction);\n//////////////////////////////////////////////////////////////////////////////\nfunction formatAuthorizationList(authorizationList) {\n return authorizationList.map((authorization) => ({\n address: authorization.address,\n chainId: Number(authorization.chainId),\n nonce: Number(authorization.nonce),\n r: authorization.r,\n s: authorization.s,\n yParity: Number(authorization.yParity),\n }));\n}\n//# sourceMappingURL=transaction.js.map"],"names":["transactionType","formatTransaction","transaction","transaction_","blockHash","blockNumber","BigInt","chainId","hexToNumber","undefined","gas","gasPrice","maxFeePerBlobGas","maxFeePerGas","maxPriorityFeePerGas","nonce","to","transactionIndex","Number","type","typeHex","value","v","authorizationList","map","authorization","address","r","s","yParity","accessList"],"mappings":"qDAEY,MAACA,EAAkB,CAC3B,MAAO,SACP,MAAO,UACP,MAAO,UACP,MAAO,UACP,MAAO,WAEJ,SAASC,EAAkBC,GAC9B,MAAMC,EAAe,IACdD,EACHE,UAAWF,EAAYE,UAAYF,EAAYE,UAAY,KAC3DC,YAAaH,EAAYG,YACnBC,OAAOJ,EAAYG,aACnB,KACNE,QAASL,EAAYK,QAAUC,EAAYN,EAAYK,cAAWE,EAClEC,IAAKR,EAAYQ,IAAMJ,OAAOJ,EAAYQ,UAAOD,EACjDE,SAAUT,EAAYS,SAAWL,OAAOJ,EAAYS,eAAYF,EAChEG,iBAAkBV,EAAYU,iBACxBN,OAAOJ,EAAYU,uBACnBH,EACNI,aAAcX,EAAYW,aACpBP,OAAOJ,EAAYW,mBACnBJ,EACNK,qBAAsBZ,EAAYY,qBAC5BR,OAAOJ,EAAYY,2BACnBL,EACNM,MAAOb,EAAYa,MAAQP,EAAYN,EAAYa,YAASN,EAC5DO,GAAId,EAAYc,GAAKd,EAAYc,GAAK,KACtCC,iBAAkBf,EAAYe,iBACxBC,OAAOhB,EAAYe,kBACnB,KACNE,KAAMjB,EAAYiB,KACZnB,EAAgBE,EAAYiB,WAC5BV,EACNW,QAASlB,EAAYiB,KAAOjB,EAAYiB,UAAOV,EAC/CY,MAAOnB,EAAYmB,MAAQf,OAAOJ,EAAYmB,YAASZ,EACvDa,EAAGpB,EAAYoB,EAAIhB,OAAOJ,EAAYoB,QAAKb,GAkC/C,OAhCIP,EAAYqB,oBACZpB,EAAaoB,kBAA4CrB,EAAYqB,kBAoChDC,IAAKC,IAAa,CACvCC,QAASD,EAAcC,QACvBnB,QAASW,OAAOO,EAAclB,SAC9BQ,MAAOG,OAAOO,EAAcV,OAC5BY,EAAGF,EAAcE,EACjBC,EAAGH,EAAcG,EACjBC,QAASX,OAAOO,EAAcI,aAzClC1B,EAAa0B,QAAU,MAEnB,GAAI3B,EAAY2B,QACZ,OAAOX,OAAOhB,EAAY2B,SAE9B,GAA8B,iBAAnB1B,EAAamB,EAAgB,CACpC,GAAuB,KAAnBnB,EAAamB,GAA+B,MAAnBnB,EAAamB,EACtC,OAAO,EACX,GAAuB,KAAnBnB,EAAamB,GAA+B,MAAnBnB,EAAamB,EACtC,OAAO,EACX,GAAInB,EAAamB,GAAK,IAClB,OAAOnB,EAAamB,EAAI,IAAO,GAAK,EAAI,CAChD,CAEH,EAdsB,GAeG,WAAtBnB,EAAagB,cACNhB,EAAa2B,kBACb3B,EAAaS,wBACbT,EAAaU,oBACbV,EAAaW,4BACbX,EAAa0B,SAEE,YAAtB1B,EAAagB,cACNhB,EAAaS,wBACbT,EAAaU,oBACbV,EAAaW,sBAEE,YAAtBX,EAAagB,aACNhB,EAAaS,iBAEjBT,CACX","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{hexToNumber as s}from"../encoding/fromHex.js";import{formatLog as e}from"./log.js";import{transactionType as t}from"./transaction.js";const n={"0x0":"reverted","0x1":"success"};function l(l){const o={...l,blockNumber:l.blockNumber?BigInt(l.blockNumber):null,contractAddress:l.contractAddress?l.contractAddress:null,cumulativeGasUsed:l.cumulativeGasUsed?BigInt(l.cumulativeGasUsed):null,effectiveGasPrice:l.effectiveGasPrice?BigInt(l.effectiveGasPrice):null,gasUsed:l.gasUsed?BigInt(l.gasUsed):null,logs:l.logs?l.logs.map(s=>e(s)):null,to:l.to?l.to:null,transactionIndex:l.transactionIndex?s(l.transactionIndex):null,status:l.status?n[l.status]:null,type:l.type?t[l.type]||l.type:null};return l.blobGasPrice&&(o.blobGasPrice=BigInt(l.blobGasPrice)),l.blobGasUsed&&(o.blobGasUsed=BigInt(l.blobGasUsed)),o}export{l as formatTransactionReceipt,n as receiptStatuses};
|
|
2
|
+
//# sourceMappingURL=transactionReceipt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transactionReceipt.js","sources":["../../../../../../../node_modules/viem/_esm/utils/formatters/transactionReceipt.js"],"sourcesContent":["import { hexToNumber } from '../encoding/fromHex.js';\nimport { defineFormatter } from './formatter.js';\nimport { formatLog } from './log.js';\nimport { transactionType } from './transaction.js';\nexport const receiptStatuses = {\n '0x0': 'reverted',\n '0x1': 'success',\n};\nexport function formatTransactionReceipt(transactionReceipt) {\n const receipt = {\n ...transactionReceipt,\n blockNumber: transactionReceipt.blockNumber\n ? BigInt(transactionReceipt.blockNumber)\n : null,\n contractAddress: transactionReceipt.contractAddress\n ? transactionReceipt.contractAddress\n : null,\n cumulativeGasUsed: transactionReceipt.cumulativeGasUsed\n ? BigInt(transactionReceipt.cumulativeGasUsed)\n : null,\n effectiveGasPrice: transactionReceipt.effectiveGasPrice\n ? BigInt(transactionReceipt.effectiveGasPrice)\n : null,\n gasUsed: transactionReceipt.gasUsed\n ? BigInt(transactionReceipt.gasUsed)\n : null,\n logs: transactionReceipt.logs\n ? transactionReceipt.logs.map((log) => formatLog(log))\n : null,\n to: transactionReceipt.to ? transactionReceipt.to : null,\n transactionIndex: transactionReceipt.transactionIndex\n ? hexToNumber(transactionReceipt.transactionIndex)\n : null,\n status: transactionReceipt.status\n ? receiptStatuses[transactionReceipt.status]\n : null,\n type: transactionReceipt.type\n ? transactionType[transactionReceipt.type] || transactionReceipt.type\n : null,\n };\n if (transactionReceipt.blobGasPrice)\n receipt.blobGasPrice = BigInt(transactionReceipt.blobGasPrice);\n if (transactionReceipt.blobGasUsed)\n receipt.blobGasUsed = BigInt(transactionReceipt.blobGasUsed);\n return receipt;\n}\nexport const defineTransactionReceipt = /*#__PURE__*/ defineFormatter('transactionReceipt', formatTransactionReceipt);\n//# sourceMappingURL=transactionReceipt.js.map"],"names":["receiptStatuses","formatTransactionReceipt","transactionReceipt","receipt","blockNumber","BigInt","contractAddress","cumulativeGasUsed","effectiveGasPrice","gasUsed","logs","map","log","formatLog","to","transactionIndex","hexToNumber","status","type","transactionType","blobGasPrice","blobGasUsed"],"mappings":"6IAIY,MAACA,EAAkB,CAC3B,MAAO,WACP,MAAO,WAEJ,SAASC,EAAyBC,GACrC,MAAMC,EAAU,IACTD,EACHE,YAAaF,EAAmBE,YAC1BC,OAAOH,EAAmBE,aAC1B,KACNE,gBAAiBJ,EAAmBI,gBAC9BJ,EAAmBI,gBACnB,KACNC,kBAAmBL,EAAmBK,kBAChCF,OAAOH,EAAmBK,mBAC1B,KACNC,kBAAmBN,EAAmBM,kBAChCH,OAAOH,EAAmBM,mBAC1B,KACNC,QAASP,EAAmBO,QACtBJ,OAAOH,EAAmBO,SAC1B,KACNC,KAAMR,EAAmBQ,KACnBR,EAAmBQ,KAAKC,IAAKC,GAAQC,EAAUD,IAC/C,KACNE,GAAIZ,EAAmBY,GAAKZ,EAAmBY,GAAK,KACpDC,iBAAkBb,EAAmBa,iBAC/BC,EAAYd,EAAmBa,kBAC/B,KACNE,OAAQf,EAAmBe,OACrBjB,EAAgBE,EAAmBe,QACnC,KACNC,KAAMhB,EAAmBgB,KACnBC,EAAgBjB,EAAmBgB,OAAShB,EAAmBgB,KAC/D,MAMV,OAJIhB,EAAmBkB,eACnBjB,EAAQiB,aAAef,OAAOH,EAAmBkB,eACjDlB,EAAmBmB,cACnBlB,EAAQkB,YAAchB,OAAOH,EAAmBmB,cAC7ClB,CACX","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{bytesToHex as e,numberToHex as o}from"../encoding/toHex.js";const i={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function a(a){const s={};return void 0!==a.authorizationList&&(s.authorizationList=a.authorizationList.map(e=>({address:e.address,r:e.r?o(BigInt(e.r)):e.r,s:e.s?o(BigInt(e.s)):e.s,chainId:o(e.chainId),nonce:o(e.nonce),...void 0!==e.yParity?{yParity:o(e.yParity)}:{},...void 0!==e.v&&void 0===e.yParity?{v:o(e.v)}:{}}))),void 0!==a.accessList&&(s.accessList=a.accessList),void 0!==a.blobVersionedHashes&&(s.blobVersionedHashes=a.blobVersionedHashes),void 0!==a.blobs&&("string"!=typeof a.blobs[0]?s.blobs=a.blobs.map(o=>e(o)):s.blobs=a.blobs),void 0!==a.data&&(s.data=a.data),void 0!==a.from&&(s.from=a.from),void 0!==a.gas&&(s.gas=o(a.gas)),void 0!==a.gasPrice&&(s.gasPrice=o(a.gasPrice)),void 0!==a.maxFeePerBlobGas&&(s.maxFeePerBlobGas=o(a.maxFeePerBlobGas)),void 0!==a.maxFeePerGas&&(s.maxFeePerGas=o(a.maxFeePerGas)),void 0!==a.maxPriorityFeePerGas&&(s.maxPriorityFeePerGas=o(a.maxPriorityFeePerGas)),void 0!==a.nonce&&(s.nonce=o(a.nonce)),void 0!==a.to&&(s.to=a.to),void 0!==a.type&&(s.type=i[a.type]),void 0!==a.value&&(s.value=o(a.value)),s}export{a as formatTransactionRequest,i as rpcTransactionType};
|
|
2
|
+
//# sourceMappingURL=transactionRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transactionRequest.js","sources":["../../../../../../../node_modules/viem/_esm/utils/formatters/transactionRequest.js"],"sourcesContent":["import { bytesToHex, numberToHex } from '../encoding/toHex.js';\nimport { defineFormatter } from './formatter.js';\nexport const rpcTransactionType = {\n legacy: '0x0',\n eip2930: '0x1',\n eip1559: '0x2',\n eip4844: '0x3',\n eip7702: '0x4',\n};\nexport function formatTransactionRequest(request) {\n const rpcRequest = {};\n if (typeof request.authorizationList !== 'undefined')\n rpcRequest.authorizationList = formatAuthorizationList(request.authorizationList);\n if (typeof request.accessList !== 'undefined')\n rpcRequest.accessList = request.accessList;\n if (typeof request.blobVersionedHashes !== 'undefined')\n rpcRequest.blobVersionedHashes = request.blobVersionedHashes;\n if (typeof request.blobs !== 'undefined') {\n if (typeof request.blobs[0] !== 'string')\n rpcRequest.blobs = request.blobs.map((x) => bytesToHex(x));\n else\n rpcRequest.blobs = request.blobs;\n }\n if (typeof request.data !== 'undefined')\n rpcRequest.data = request.data;\n if (typeof request.from !== 'undefined')\n rpcRequest.from = request.from;\n if (typeof request.gas !== 'undefined')\n rpcRequest.gas = numberToHex(request.gas);\n if (typeof request.gasPrice !== 'undefined')\n rpcRequest.gasPrice = numberToHex(request.gasPrice);\n if (typeof request.maxFeePerBlobGas !== 'undefined')\n rpcRequest.maxFeePerBlobGas = numberToHex(request.maxFeePerBlobGas);\n if (typeof request.maxFeePerGas !== 'undefined')\n rpcRequest.maxFeePerGas = numberToHex(request.maxFeePerGas);\n if (typeof request.maxPriorityFeePerGas !== 'undefined')\n rpcRequest.maxPriorityFeePerGas = numberToHex(request.maxPriorityFeePerGas);\n if (typeof request.nonce !== 'undefined')\n rpcRequest.nonce = numberToHex(request.nonce);\n if (typeof request.to !== 'undefined')\n rpcRequest.to = request.to;\n if (typeof request.type !== 'undefined')\n rpcRequest.type = rpcTransactionType[request.type];\n if (typeof request.value !== 'undefined')\n rpcRequest.value = numberToHex(request.value);\n return rpcRequest;\n}\nexport const defineTransactionRequest = /*#__PURE__*/ defineFormatter('transactionRequest', formatTransactionRequest);\n//////////////////////////////////////////////////////////////////////////////\nfunction formatAuthorizationList(authorizationList) {\n return authorizationList.map((authorization) => ({\n address: authorization.address,\n r: authorization.r\n ? numberToHex(BigInt(authorization.r))\n : authorization.r,\n s: authorization.s\n ? numberToHex(BigInt(authorization.s))\n : authorization.s,\n chainId: numberToHex(authorization.chainId),\n nonce: numberToHex(authorization.nonce),\n ...(typeof authorization.yParity !== 'undefined'\n ? { yParity: numberToHex(authorization.yParity) }\n : {}),\n ...(typeof authorization.v !== 'undefined' &&\n typeof authorization.yParity === 'undefined'\n ? { v: numberToHex(authorization.v) }\n : {}),\n }));\n}\n//# sourceMappingURL=transactionRequest.js.map"],"names":["rpcTransactionType","legacy","eip2930","eip1559","eip4844","eip7702","formatTransactionRequest","request","rpcRequest","authorizationList","map","authorization","address","r","numberToHex","BigInt","s","chainId","nonce","yParity","v","accessList","blobVersionedHashes","blobs","x","bytesToHex","data","from","gas","gasPrice","maxFeePerBlobGas","maxFeePerGas","maxPriorityFeePerGas","to","type","value"],"mappings":"mEAEY,MAACA,EAAqB,CAC9BC,OAAQ,MACRC,QAAS,MACTC,QAAS,MACTC,QAAS,MACTC,QAAS,OAEN,SAASC,EAAyBC,GACrC,MAAMC,EAAa,CAAA,EAmCnB,YAlCyC,IAA9BD,EAAQE,oBACfD,EAAWC,kBAA4CF,EAAQE,kBAsC1CC,IAAKC,IAAa,CACvCC,QAASD,EAAcC,QACvBC,EAAGF,EAAcE,EACXC,EAAYC,OAAOJ,EAAcE,IACjCF,EAAcE,EACpBG,EAAGL,EAAcK,EACXF,EAAYC,OAAOJ,EAAcK,IACjCL,EAAcK,EACpBC,QAASH,EAAYH,EAAcM,SACnCC,MAAOJ,EAAYH,EAAcO,eACI,IAA1BP,EAAcQ,QACnB,CAAEA,QAASL,EAAYH,EAAcQ,UACrC,WACyB,IAApBR,EAAcS,QACY,IAA1BT,EAAcQ,QACnB,CAAEC,EAAGN,EAAYH,EAAcS,IAC/B,YArDwB,IAAvBb,EAAQc,aACfb,EAAWa,WAAad,EAAQc,iBACO,IAAhCd,EAAQe,sBACfd,EAAWc,oBAAsBf,EAAQe,0BAChB,IAAlBf,EAAQgB,QACiB,iBAArBhB,EAAQgB,MAAM,GACrBf,EAAWe,MAAQhB,EAAQgB,MAAMb,IAAKc,GAAMC,EAAWD,IAEvDhB,EAAWe,MAAQhB,EAAQgB,YAEP,IAAjBhB,EAAQmB,OACflB,EAAWkB,KAAOnB,EAAQmB,WACF,IAAjBnB,EAAQoB,OACfnB,EAAWmB,KAAOpB,EAAQoB,WACH,IAAhBpB,EAAQqB,MACfpB,EAAWoB,IAAMd,EAAYP,EAAQqB,WACT,IAArBrB,EAAQsB,WACfrB,EAAWqB,SAAWf,EAAYP,EAAQsB,gBACN,IAA7BtB,EAAQuB,mBACftB,EAAWsB,iBAAmBhB,EAAYP,EAAQuB,wBAClB,IAAzBvB,EAAQwB,eACfvB,EAAWuB,aAAejB,EAAYP,EAAQwB,oBACN,IAAjCxB,EAAQyB,uBACfxB,EAAWwB,qBAAuBlB,EAAYP,EAAQyB,4BAC7B,IAAlBzB,EAAQW,QACfV,EAAWU,MAAQJ,EAAYP,EAAQW,aACjB,IAAfX,EAAQ0B,KACfzB,EAAWyB,GAAK1B,EAAQ0B,SACA,IAAjB1B,EAAQ2B,OACf1B,EAAW0B,KAAOlC,EAAmBO,EAAQ2B,YACpB,IAAlB3B,EAAQ4B,QACf3B,EAAW2B,MAAQrB,EAAYP,EAAQ4B,QACpC3B,CACX","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAction.js","sources":["../../../../../../node_modules/viem/_esm/utils/getAction.js"],"sourcesContent":["/**\n * Retrieves and returns an action from the client (if exists), and falls\n * back to the tree-shakable action.\n *\n * Useful for extracting overridden actions from a client (ie. if a consumer\n * wants to override the `sendTransaction` implementation).\n */\nexport function getAction(client, actionFn, \n// Some minifiers drop `Function.prototype.name`, or replace it with short letters,\n// meaning that `actionFn.name` will not always work. For that case, the consumer\n// needs to pass the name explicitly.\nname) {\n const action_implicit = client[actionFn.name];\n if (typeof action_implicit === 'function')\n return action_implicit;\n const action_explicit = client[name];\n if (typeof action_explicit === 'function')\n return action_explicit;\n return (params) => actionFn(client, params);\n}\n//# sourceMappingURL=getAction.js.map"],"names":["getAction","client","actionFn","name","action_implicit","action_explicit","params"],"mappings":"AAOO,SAASA,EAAUC,EAAQC,EAIlCC,GACI,MAAMC,EAAkBH,EAAOC,EAASC,MACxC,GAA+B,mBAApBC,EACP,OAAOA,EACX,MAAMC,EAAkBJ,EAAOE,GAC/B,MAA+B,mBAApBE,EACAA,EACHC,GAAWJ,EAASD,EAAQK,EACxC","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hashSignature.js","sources":["../../../../../../../node_modules/viem/_esm/utils/hash/hashSignature.js"],"sourcesContent":["import { toBytes } from '../encoding/toBytes.js';\nimport { keccak256 } from './keccak256.js';\nconst hash = (value) => keccak256(toBytes(value));\nexport function hashSignature(sig) {\n return hash(sig);\n}\n//# sourceMappingURL=hashSignature.js.map"],"names":["hashSignature","sig","keccak256","toBytes"],"mappings":"4FAGO,SAASA,EAAcC,GAC1B,OAFoBC,EAAUC,EAElBF,GAChB","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{keccak_256 as o}from"../../../../@noble/hashes/esm/sha3.js";import{isHex as t}from"../data/isHex.js";import{toBytes as s}from"../encoding/toBytes.js";import{toHex as e}from"../encoding/toHex.js";function r(r,i){const m=i||"hex",n=o(t(r,{strict:!1})?s(r):r);return"bytes"===m?n:e(n)}export{r as keccak256};
|
|
2
|
+
//# sourceMappingURL=keccak256.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keccak256.js","sources":["../../../../../../../node_modules/viem/_esm/utils/hash/keccak256.js"],"sourcesContent":["import { keccak_256 } from '@noble/hashes/sha3';\nimport { isHex } from '../data/isHex.js';\nimport { toBytes } from '../encoding/toBytes.js';\nimport { toHex } from '../encoding/toHex.js';\nexport function keccak256(value, to_) {\n const to = to_ || 'hex';\n const bytes = keccak_256(isHex(value, { strict: false }) ? toBytes(value) : value);\n if (to === 'bytes')\n return bytes;\n return toHex(bytes);\n}\n//# sourceMappingURL=keccak256.js.map"],"names":["keccak256","value","to_","to","bytes","keccak_256","isHex","strict","toBytes","toHex"],"mappings":"0MAIO,SAASA,EAAUC,EAAOC,GAC7B,MAAMC,EAAKD,GAAO,MACZE,EAAQC,EAAWC,EAAML,EAAO,CAAEM,QAAQ,IAAWC,EAAQP,GAASA,GAC5E,MAAW,UAAPE,EACOC,EACJK,EAAML,EACjB","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{BaseError as e}from"../../errors/base.js";function n(n){let r=!0,t="",i=0,o="",f=!1;for(let e=0;e<n.length;e++){const l=n[e];if(["(",")",","].includes(l)&&(r=!0),"("===l&&i++,")"===l&&i--,r)if(0!==i)" "!==l?(o+=l,t+=l):","!==n[e-1]&&","!==t&&",("!==t&&(t="",r=!1);else if(" "===l&&["event","function",""].includes(o))o="";else if(o+=l,")"===l){f=!0;break}}if(!f)throw new e("Unable to normalize signature.");return o}export{n as normalizeSignature};
|
|
2
|
+
//# sourceMappingURL=normalizeSignature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizeSignature.js","sources":["../../../../../../../node_modules/viem/_esm/utils/hash/normalizeSignature.js"],"sourcesContent":["import { BaseError } from '../../errors/base.js';\nexport function normalizeSignature(signature) {\n let active = true;\n let current = '';\n let level = 0;\n let result = '';\n let valid = false;\n for (let i = 0; i < signature.length; i++) {\n const char = signature[i];\n // If the character is a separator, we want to reactivate.\n if (['(', ')', ','].includes(char))\n active = true;\n // If the character is a \"level\" token, we want to increment/decrement.\n if (char === '(')\n level++;\n if (char === ')')\n level--;\n // If we aren't active, we don't want to mutate the result.\n if (!active)\n continue;\n // If level === 0, we are at the definition level.\n if (level === 0) {\n if (char === ' ' && ['event', 'function', ''].includes(result))\n result = '';\n else {\n result += char;\n // If we are at the end of the definition, we must be finished.\n if (char === ')') {\n valid = true;\n break;\n }\n }\n continue;\n }\n // Ignore spaces\n if (char === ' ') {\n // If the previous character is a separator, and the current section isn't empty, we want to deactivate.\n if (signature[i - 1] !== ',' && current !== ',' && current !== ',(') {\n current = '';\n active = false;\n }\n continue;\n }\n result += char;\n current += char;\n }\n if (!valid)\n throw new BaseError('Unable to normalize signature.');\n return result;\n}\n//# sourceMappingURL=normalizeSignature.js.map"],"names":["normalizeSignature","signature","active","current","level","result","valid","i","length","char","includes","BaseError"],"mappings":"iDACO,SAASA,EAAmBC,GAC/B,IAAIC,GAAS,EACTC,EAAU,GACVC,EAAQ,EACRC,EAAS,GACTC,GAAQ,EACZ,IAAK,IAAIC,EAAI,EAAGA,EAAIN,EAAUO,OAAQD,IAAK,CACvC,MAAME,EAAOR,EAAUM,GAUvB,GARI,CAAC,IAAK,IAAK,KAAKG,SAASD,KACzBP,GAAS,GAEA,MAATO,GACAL,IACS,MAATK,GACAL,IAECF,EAGL,GAAc,IAAVE,EAcS,MAATK,GAQJJ,GAAUI,EACVN,GAAWM,GAPkB,MAArBR,EAAUM,EAAI,IAA0B,MAAZJ,GAA+B,OAAZA,IAC/CA,EAAU,GACVD,GAAS,QAjBb,GAAa,MAATO,GAAgB,CAAC,QAAS,WAAY,IAAIC,SAASL,GACnDA,EAAS,QAIT,GAFAA,GAAUI,EAEG,MAATA,EAAc,CACdH,GAAQ,EACR,KACJ,CAeZ,CACA,IAAKA,EACD,MAAM,IAAIK,EAAU,kCACxB,OAAON,CACX","x_google_ignoreList":[0]}
|