UNPKG

viem

Version:

TypeScript Interface for Ethereum

170 lines • 15.4 kB
// biome-ignore lint/performance/noBarrelFile: entrypoint module export { CircularReferenceError, InvalidAbiParameterError, InvalidAbiParametersError, InvalidAbiItemError, InvalidAbiTypeParameterError, InvalidFunctionModifierError, InvalidModifierError, InvalidParameterError, InvalidParenthesisError, InvalidSignatureError, InvalidStructSignatureError, SolidityProtectedKeywordError, UnknownTypeError, UnknownSignatureError, parseAbi, parseAbiItem, parseAbiParameter, parseAbiParameters, } from 'abitype'; export { getContract, } from './actions/getContract.js'; export {} from './actions/public/getContractEvents.js'; export {} from './actions/public/getEip712Domain.js'; export {} from './actions/wallet/addChain.js'; export {} from './actions/public/call.js'; export { createClient, rpcSchema, } from './clients/createClient.js'; export { custom, } from './clients/transports/custom.js'; export { fallback, shouldThrow, } from './clients/transports/fallback.js'; export { http, } from './clients/transports/http.js'; export { createPublicClient, } from './clients/createPublicClient.js'; export { createTestClient, } from './clients/createTestClient.js'; export { publicActions, } from './clients/decorators/public.js'; export { testActions, } from './clients/decorators/test.js'; export { walletActions, } from './clients/decorators/wallet.js'; export { createTransport, } from './clients/transports/createTransport.js'; export { createWalletClient, } from './clients/createWalletClient.js'; export { webSocket, } from './clients/transports/webSocket.js'; export { multicall3Abi, erc20Abi, erc20Abi_bytes32, erc721Abi, erc4626Abi, universalSignatureValidatorAbi, } from './constants/abis.js'; export { ethAddress, zeroAddress } from './constants/address.js'; export { deploylessCallViaBytecodeBytecode, deploylessCallViaFactoryBytecode, universalSignatureValidatorByteCode, } from './constants/contracts.js'; export { etherUnits, gweiUnits, weiUnits } from './constants/unit.js'; export { maxInt8, maxInt16, maxInt24, maxInt32, maxInt40, maxInt48, maxInt56, maxInt64, maxInt72, maxInt80, maxInt88, maxInt96, maxInt104, maxInt112, maxInt120, maxInt128, maxInt136, maxInt144, maxInt152, maxInt160, maxInt168, maxInt176, maxInt184, maxInt192, maxInt200, maxInt208, maxInt216, maxInt224, maxInt232, maxInt240, maxInt248, maxInt256, maxUint8, maxUint16, maxUint24, maxUint32, maxUint40, maxUint48, maxUint56, maxUint64, maxUint72, maxUint80, maxUint88, maxUint96, maxUint104, maxUint112, maxUint120, maxUint128, maxUint136, maxUint144, maxUint152, maxUint160, maxUint168, maxUint176, maxUint184, maxUint192, maxUint200, maxUint208, maxUint216, maxUint224, maxUint232, maxUint240, maxUint248, maxUint256, minInt8, minInt16, minInt24, minInt32, minInt40, minInt48, minInt56, minInt64, minInt72, minInt80, minInt88, minInt96, minInt104, minInt112, minInt120, minInt128, minInt136, minInt144, minInt152, minInt160, minInt168, minInt176, minInt184, minInt192, minInt200, minInt208, minInt216, minInt224, minInt232, minInt240, minInt248, minInt256, } from './constants/number.js'; export { zeroHash } from './constants/bytes.js'; export { presignMessagePrefix } from './constants/strings.js'; export { AbiConstructorNotFoundError, AbiConstructorParamsNotFoundError, AbiDecodingDataSizeInvalidError, AbiDecodingDataSizeTooSmallError, AbiDecodingZeroDataError, AbiEncodingArrayLengthMismatchError, AbiEncodingLengthMismatchError, AbiEncodingBytesSizeMismatchError, AbiErrorInputsNotFoundError, AbiErrorNotFoundError, AbiErrorSignatureNotFoundError, AbiEventNotFoundError, AbiEventSignatureEmptyTopicsError, AbiEventSignatureNotFoundError, AbiFunctionNotFoundError, AbiFunctionOutputsNotFoundError, AbiFunctionSignatureNotFoundError, BytesSizeMismatchError, DecodeLogDataMismatch, DecodeLogTopicsMismatch, InvalidAbiDecodingTypeError, InvalidAbiEncodingTypeError, InvalidArrayError, InvalidDefinitionTypeError, UnsupportedPackedAbiType, } from './errors/abi.js'; export { BaseError, setErrorConfig } from './errors/base.js'; export { BlockNotFoundError, } from './errors/block.js'; export { CallExecutionError, ContractFunctionExecutionError, ContractFunctionRevertedError, ContractFunctionZeroDataError, RawContractError, CounterfactualDeploymentFailedError, } from './errors/contract.js'; export { BaseFeeScalarError, Eip1559FeesNotSupportedError, MaxFeePerGasTooLowError, } from './errors/fee.js'; export { ChainDisconnectedError, InternalRpcError, InvalidInputRpcError, InvalidParamsRpcError, InvalidRequestRpcError, JsonRpcVersionUnsupportedError, LimitExceededRpcError, MethodNotFoundRpcError, MethodNotSupportedRpcError, ParseRpcError, ProviderDisconnectedError, ProviderRpcError, ResourceNotFoundRpcError, ResourceUnavailableRpcError, RpcError, SwitchChainError, TransactionRejectedRpcError, UnauthorizedProviderError, UnknownRpcError, UnsupportedProviderMethodError, UserRejectedRequestError, } from './errors/rpc.js'; export { ChainDoesNotSupportContract, ChainMismatchError, ChainNotFoundError, ClientChainNotConfiguredError, InvalidChainIdError, } from './errors/chain.js'; export { InvalidBytesBooleanError, IntegerOutOfRangeError, InvalidHexBooleanError, InvalidHexValueError, SizeOverflowError, } from './errors/encoding.js'; export { EnsAvatarUriResolutionError, EnsAvatarInvalidNftUriError, EnsAvatarUnsupportedNamespaceError, } from './errors/ens.js'; export { InvalidDecimalNumberError, } from './errors/unit.js'; export { EstimateGasExecutionError, } from './errors/estimateGas.js'; export { ExecutionRevertedError, FeeCapTooHighError, FeeCapTooLowError, InsufficientFundsError, IntrinsicGasTooHighError, IntrinsicGasTooLowError, NonceMaxValueError, NonceTooHighError, NonceTooLowError, TipAboveFeeCapError, TransactionTypeNotSupportedError, UnknownNodeError, } from './errors/node.js'; export { FilterTypeNotSupportedError, } from './errors/log.js'; export { HttpRequestError, RpcRequestError, TimeoutError, SocketClosedError, WebSocketRequestError, } from './errors/request.js'; export { InvalidAddressError, } from './errors/address.js'; export { FeeConflictError, InvalidLegacyVError, InvalidSerializableTransactionError, InvalidSerializedTransactionError, InvalidSerializedTransactionTypeError, InvalidStorageKeySizeError, TransactionExecutionError, TransactionNotFoundError, TransactionReceiptNotFoundError, WaitForTransactionReceiptTimeoutError, } from './errors/transaction.js'; export { SizeExceedsPaddingSizeError, SliceOffsetOutOfBoundsError, } from './errors/data.js'; export { UrlRequiredError, } from './errors/transport.js'; export { AccountStateConflictError, StateAssignmentConflictError, } from './errors/stateOverride.js'; export { InvalidDomainError, InvalidPrimaryTypeError, InvalidStructTypeError, } from './errors/typedData.js'; export { ProviderRpcError as EIP1193ProviderRpcError } from './types/eip1193.js'; export { labelhash } from './utils/ens/labelhash.js'; export { namehash } from './utils/ens/namehash.js'; export { defineBlock, formatBlock, } from './utils/formatters/block.js'; export { formatLog } from './utils/formatters/log.js'; export { decodeAbiParameters, } from './utils/abi/decodeAbiParameters.js'; export { decodeDeployData, } from './utils/abi/decodeDeployData.js'; export { decodeErrorResult, } from './utils/abi/decodeErrorResult.js'; export { decodeEventLog, } from './utils/abi/decodeEventLog.js'; export { decodeFunctionData, } from './utils/abi/decodeFunctionData.js'; export { decodeFunctionResult, } from './utils/abi/decodeFunctionResult.js'; export { encodeAbiParameters, } from './utils/abi/encodeAbiParameters.js'; export { encodeDeployData, } from './utils/abi/encodeDeployData.js'; export { encodeErrorResult, } from './utils/abi/encodeErrorResult.js'; export { encodeEventTopics, } from './utils/abi/encodeEventTopics.js'; export { encodeFunctionData, } from './utils/abi/encodeFunctionData.js'; export { prepareEncodeFunctionData, } from './utils/abi/prepareEncodeFunctionData.js'; export { encodeFunctionResult, } from './utils/abi/encodeFunctionResult.js'; export { parseEventLogs, } from './utils/abi/parseEventLogs.js'; export { defineTransaction, formatTransaction, transactionType, } from './utils/formatters/transaction.js'; export { defineTransactionReceipt, formatTransactionReceipt, } from './utils/formatters/transactionReceipt.js'; export { defineTransactionRequest, formatTransactionRequest, rpcTransactionType, } from './utils/formatters/transactionRequest.js'; export { getAbiItem, } from './utils/abi/getAbiItem.js'; export { getContractAddress, getCreate2Address, getCreateAddress, } from './utils/address/getContractAddress.js'; export { getSerializedTransactionType, } from './utils/transaction/getSerializedTransactionType.js'; export { getTransactionType, } from './utils/transaction/getTransactionType.js'; export { hashDomain, hashStruct, hashTypedData, } from './utils/signature/hashTypedData.js'; export { compactSignatureToSignature, } from './utils/signature/compactSignatureToSignature.js'; export { /** @deprecated Use `parseCompactSignature`. */ parseCompactSignature as hexToCompactSignature, parseCompactSignature, } from './utils/signature/parseCompactSignature.js'; export { /** @deprecated Use `parseSignature`. */ parseSignature as hexToSignature, parseSignature, } from './utils/signature/parseSignature.js'; export { recoverAddress, } from './utils/signature/recoverAddress.js'; export { recoverMessageAddress, } from './utils/signature/recoverMessageAddress.js'; export { recoverPublicKey, } from './utils/signature/recoverPublicKey.js'; export { recoverTransactionAddress, } from './utils/signature/recoverTransactionAddress.js'; export { recoverTypedDataAddress, } from './utils/signature/recoverTypedDataAddress.js'; export { signatureToCompactSignature, } from './utils/signature/signatureToCompactSignature.js'; export { /** @deprecated Use `serializeCompactSignature` instead. */ serializeCompactSignature as compactSignatureToHex, serializeCompactSignature, } from './utils/signature/serializeCompactSignature.js'; export { /** @deprecated Use `serializeSignature` instead. */ serializeSignature as signatureToHex, serializeSignature, } from './utils/signature/serializeSignature.js'; export { bytesToRlp, hexToRlp, toRlp, } from './utils/encoding/toRlp.js'; export { verifyHash, } from './utils/signature/verifyHash.js'; export { verifyMessage, } from './utils/signature/verifyMessage.js'; export { verifyTypedData, } from './utils/signature/verifyTypedData.js'; export { parseErc6492Signature, } from './utils/signature/parseErc6492Signature.js'; export { isErc6492Signature, } from './utils/signature/isErc6492Signature.js'; export { serializeErc6492Signature, } from './utils/signature/serializeErc6492Signature.js'; export { assertRequest, } from './utils/transaction/assertRequest.js'; export { assertTransactionEIP1559, assertTransactionEIP2930, assertTransactionLegacy, } from './utils/transaction/assertTransaction.js'; export { boolToBytes, hexToBytes, numberToBytes, stringToBytes, toBytes, } from './utils/encoding/toBytes.js'; export { boolToHex, bytesToHex, numberToHex, stringToHex, toHex, } from './utils/encoding/toHex.js'; export { bytesToBigInt, bytesToBool, bytesToNumber, bytesToString, fromBytes, } from './utils/encoding/fromBytes.js'; export { ccipRequest, /** @deprecated Use `ccipRequest`. */ ccipRequest as ccipFetch, offchainLookup, offchainLookupAbiItem, offchainLookupSignature, } from './utils/ccip.js'; export { blobsToCommitments, } from './utils/blob/blobsToCommitments.js'; export { commitmentToVersionedHash, } from './utils/blob/commitmentToVersionedHash.js'; export { commitmentsToVersionedHashes, } from './utils/blob/commitmentsToVersionedHashes.js'; export { sidecarsToVersionedHashes, } from './utils/blob/sidecarsToVersionedHashes.js'; export { blobsToProofs, } from './utils/blob/blobsToProofs.js'; export { fromBlobs, } from './utils/blob/fromBlobs.js'; export { toBlobSidecars, } from './utils/blob/toBlobSidecars.js'; export { toBlobs, } from './utils/blob/toBlobs.js'; export { defineKzg, } from './utils/kzg/defineKzg.js'; export { setupKzg, } from './utils/kzg/setupKzg.js'; export { concat, concatBytes, concatHex, } from './utils/data/concat.js'; export { assertCurrentChain, } from './utils/chain/assertCurrentChain.js'; export { defineChain } from './utils/chain/defineChain.js'; export { extractChain, } from './utils/chain/extractChain.js'; export { getChainContractAddress, } from './utils/chain/getChainContractAddress.js'; export { encodePacked, } from './utils/abi/encodePacked.js'; export { withRetry, } from './utils/promise/withRetry.js'; export { withTimeout, } from './utils/promise/withTimeout.js'; export { formatEther, } from './utils/unit/formatEther.js'; export { formatGwei, } from './utils/unit/formatGwei.js'; export { formatUnits, } from './utils/unit/formatUnits.js'; export { fromHex, hexToBigInt, hexToBool, hexToNumber, hexToString, } from './utils/encoding/fromHex.js'; export { fromRlp, } from './utils/encoding/fromRlp.js'; export { checksumAddress, getAddress, } from './utils/address/getAddress.js'; export { getContractError, } from './utils/errors/getContractError.js'; export { toEventSelector, /** @deprecated use `toEventSelector`. */ toEventSelector as getEventSelector, } from './utils/hash/toEventSelector.js'; export { toFunctionSelector, /** @deprecated use `toFunctionSelector`. */ toFunctionSelector as getFunctionSelector, } from './utils/hash/toFunctionSelector.js'; export { toEventSignature, /** @deprecated use `toEventSignature`. */ toEventSignature as getEventSignature, } from './utils/hash/toEventSignature.js'; export { toFunctionSignature, /** @deprecated use `toFunctionSignature`. */ toFunctionSignature as getFunctionSignature, } from './utils/hash/toFunctionSignature.js'; export { toEventHash, } from './utils/hash/toEventHash.js'; export { toFunctionHash, } from './utils/hash/toFunctionHash.js'; export { hashMessage, } from './utils/signature/hashMessage.js'; export { toPrefixedMessage, } from './utils/signature/toPrefixedMessage.js'; export { isAddress, } from './utils/address/isAddress.js'; export { isAddressEqual, } from './utils/address/isAddressEqual.js'; export { isBytes } from './utils/data/isBytes.js'; export { isHash } from './utils/hash/isHash.js'; export { isHex } from './utils/data/isHex.js'; export { keccak256, } from './utils/hash/keccak256.js'; export { sha256, } from './utils/hash/sha256.js'; export { ripemd160, } from './utils/hash/ripemd160.js'; export { pad, padBytes, padHex, } from './utils/data/pad.js'; export { parseEther, } from './utils/unit/parseEther.js'; export { parseGwei } from './utils/unit/parseGwei.js'; export { parseTransaction, } from './utils/transaction/parseTransaction.js'; export { parseUnits, } from './utils/unit/parseUnits.js'; export { serializeAccessList, } from './utils/transaction/serializeAccessList.js'; export { serializeTransaction, } from './utils/transaction/serializeTransaction.js'; export { size } from './utils/data/size.js'; export { slice, sliceBytes, sliceHex, } from './utils/data/slice.js'; export { stringify } from './utils/stringify.js'; export { trim, } from './utils/data/trim.js'; export { serializeTypedData, validateTypedData, domainSeparator, getTypesForEIP712Domain, } from './utils/typedData.js'; export { createNonceManager, nonceManager, } from './utils/nonceManager.js'; //# sourceMappingURL=index.js.map