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EAAAC,EAAG,QAAAC,CAAO,EAAKJ,EACvBK,EAAW,OAAOD,GAAWD,EAAK,GAAG,EACvCG,EAAcJ,EAClB,GAAIG,IAAa,EAAG,CAClB,IAAME,EAAQV,GAAWK,CAAC,EAC1BK,EAAM,CAAC,GAAK,IACZD,EAAcR,GAAWS,CAAK,CAChC,CACA,MAAO,CAAE,EAAAN,EAAG,YAAAK,CAAW,CACzB,CnBuxDA,OAEE,qBAAAE,OACK,+CACP,OAIE,cAAAC,OACK,wCACP,OAIE,iBAAAC,OACK,2CACP,OAIE,mBAAAC,OACK,6CACP,OAAkC,aAAAC,OAAiB,6BACnD,OAEE,iBAAAC,OACK,6CACP,OAIE,4BAAAC,GACA,4BAAAC,GACA,2BAAAC,OACK,iDACP,OAGE,gCAAAC,OACK,4DACP,OAGE,sBAAAC,OACK,kDACP,OAGE,oBAAAC,OACK,gDACP,OAEE,uBAAAC,OACK,mDACP,OAIE,wBAAAC,OACK,oDACP,OAEE,mBAAAC,GAEA,2BAAAC,GAEA,sBAAAC,GAEA,qBAAAC,OACK,6BACP,OAEE,eAAAC,OACK,oCACP,OAEE,cAAAC,OACK,mCACP,OAEE,eAAAC,OACK,oCACP,OAEE,cAAAC,OACK,mCACP,OAAkC,aAAAC,OAAiB,kCACnD,OAEE,cAAAC,OACK","names":["CircularReferenceError","InvalidAbiItemError","InvalidAbiParameterError","InvalidAbiParametersError","InvalidAbiTypeParameterError","InvalidFunctionModifierError","InvalidModifierError","InvalidParameterError","InvalidParenthesisError","InvalidSignatureError","InvalidStructSignatureError","parseAbi","parseAbiItem","parseAbiParameter","parseAbiParameters","SolidityProtectedKeywordError","UnknownSignatureError","UnknownTypeError","getAction","createContractEventFilter","estimateContractGas","getContractEvents","readContract","simulateContract","watchContractEvent","writeContract","getContract","abi","address","client_","client","publicClient","walletClient","hasPublicClient","hasWalletClient","contract","hasReadFunction","hasWriteFunction","hasEvent","item","_","functionName","parameters","args","options","getFunctionParameters","eventName","abiEvent","getEventParameters","values","hasArgs","x","WaitForCallsStatusTimeoutError","createClient","rpcSchema","createClient","publicActions","createPublicClient","parameters","key","name","createClient","dropTransaction","dumpState","getAutomine","getTxpoolContent","getTxpoolStatus","impersonateAccount","increaseTime","inspectTxpool","loadState","mine","removeBlockTimestampInterval","reset","revert","sendUnsignedTransaction","setAutomine","setBalance","setBlockGasLimit","setBlockTimestampInterval","setCode","setCoinbase","setIntervalMining","setLoggingEnabled","setMinGasPrice","setNextBlockBaseFeePerGas","setNextBlockTimestamp","setNonce","setRpcUrl","setStorageAt","snapshot","stopImpersonatingAccount","testActions","mode","client_","client","args","createTestClient","parameters","key","name","mode","createClient","config","testActions","createClient","walletActions","createWalletClient","parameters","key","name","transport","publicActions","walletActions","createTransport","createTransport","custom","provider","config","key","methods","name","retryDelay","defaultRetryCount","ExecutionRevertedError","TransactionRejectedRpcError","UserRejectedRequestError","WalletConnectSessionSettlementError","wait","createTransport","fallback","transports_","config","key","name","rank","shouldThrow_","shouldThrow","retryCount","retryDelay","chain","pollingInterval","timeout","rest","transports","onResponse","transport","method","params","includes","fetch","i","response","err","include","exclude","fn","rankOptions","rankTransports","error","interval","onTransports","ping","sampleCount","weights","stabilityWeight","latencyWeight","samples","rankTransports_","sample","transport_","start","end","success","maxLatency","latency","scores","_","latencies","latencyScore","acc","successes","stabilityScore","a","b","http","RpcRequestError","UrlRequiredError","getSocket","getWebSocketRpcClient","createTransport","webSocket","url","config","keepAlive","key","methods","name","reconnect","retryDelay","chain","retryCount_","timeout_","retryCount","timeout","url_","wsRpcClientOpts","method","params","body","rpcClient","error","result","onData","onError","subscriptionId","resolve","reject","response","erc20Abi","erc20Abi_bytes32","erc721Abi","erc1155Abi","erc4626Abi","erc6492SignatureValidatorAbi","multicall3Abi","ethAddress","zeroAddress","zeroHash","deploylessCallViaBytecodeBytecode","deploylessCallViaFactoryBytecode","erc6492SignatureValidatorByteCode","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","presignMessagePrefix","etherUnits","gweiUnits","weiUnits","AbiConstructorNotFoundError","AbiConstructorParamsNotFoundError","AbiDecodingDataSizeInvalidError","AbiDecodingDataSizeTooSmallError","AbiDecodingZeroDataError","AbiEncodingArrayLengthMismatchError","AbiEncodingBytesSizeMismatchError","AbiEncodingLengthMismatchError","AbiErrorInputsNotFoundError","AbiErrorNotFoundError","AbiErrorSignatureNotFoundError","AbiEventNotFoundError","AbiEventSignatureEmptyTopicsError","AbiEventSignatureNotFoundError","AbiFunctionNotFoundError","AbiFunctionOutputsNotFoundError","AbiFunctionSignatureNotFoundError","BytesSizeMismatchError","DecodeLogDataMismatch","DecodeLogTopicsMismatch","InvalidAbiDecodingTypeError","InvalidAbiEncodingTypeError","InvalidArrayError","InvalidDefinitionTypeError","UnsupportedPackedAbiType","InvalidAddressError","BaseError","setErrorConfig","BlockNotFoundError","BundleFailedError","ChainDoesNotSupportContract","ChainMismatchError","ChainNotFoundError","ClientChainNotConfiguredError","InvalidChainIdError","CallExecutionError","ContractFunctionExecutionError","ContractFunctionRevertedError","ContractFunctionZeroDataError","CounterfactualDeploymentFailedError","RawContractError","SizeExceedsPaddingSizeError","SliceOffsetOutOfBoundsError","IntegerOutOfRangeError","InvalidBytesBooleanError","InvalidHexBooleanError","InvalidHexValueError","SizeOverflowError","EnsAvatarInvalidNftUriError","EnsAvatarUnsupportedNamespaceError","EnsAvatarUriResolutionError","EnsInvalidChainIdError","EstimateGasExecutionError","BaseFeeScalarError","Eip1559FeesNotSupportedError","MaxFeePerGasTooLowError","FilterTypeNotSupportedError","ExecutionRevertedError","FeeCapTooHighError","FeeCapTooLowError","InsufficientFundsError","IntrinsicGasTooHighError","IntrinsicGasTooLowError","NonceMaxValueError","NonceTooHighError","NonceTooLowError","TipAboveFeeCapError","TransactionTypeNotSupportedError","UnknownNodeError","HttpRequestError","RpcRequestError","SocketClosedError","TimeoutError","WebSocketRequestError","AtomicityNotSupportedError","AtomicReadyWalletRejectedUpgradeError","BundleTooLargeError","ChainDisconnectedError","DuplicateIdError","InternalRpcError","InvalidInputRpcError","InvalidParamsRpcError","InvalidRequestRpcError","JsonRpcVersionUnsupportedError","LimitExceededRpcError","MethodNotFoundRpcError","MethodNotSupportedRpcError","ParseRpcError","ProviderDisconnectedError","ProviderRpcError","ResourceNotFoundRpcError","ResourceUnavailableRpcError","RpcError","SwitchChainError","TransactionRejectedRpcError","UnauthorizedProviderError","UnknownBundleIdError","UnknownRpcError","UnsupportedChainIdError","UnsupportedNonOptionalCapabilityError","UnsupportedProviderMethodError","UserRejectedRequestError","AccountStateConflictError","StateAssignmentConflictError","FeeConflictError","InvalidLegacyVError","InvalidSerializableTransactionError","InvalidSerializedTransactionError","InvalidSerializedTransactionTypeError","InvalidStorageKeySizeError","TransactionExecutionError","TransactionNotFoundError","TransactionReceiptNotFoundError","WaitForTransactionReceiptTimeoutError","UrlRequiredError","InvalidDomainError","InvalidPrimaryTypeError","InvalidStructTypeError","InvalidDecimalNumberError","ProviderRpcError","code","message","decodeAbiParameters","AbiConstructorNotFoundError","AbiConstructorParamsNotFoundError","decodeAbiParameters","docsPath","decodeDeployData","parameters","abi","bytecode","data","description","x","decodeErrorResult","decodeEventLog","decodeFunctionData","decodeFunctionResult","encodeAbiParameters","encodeDeployData","encodeErrorResult","encodeEventTopics","encodeFunctionData","encodeFunctionResult","encodePacked","getAbiItem","parseEventLogs","prepareEncodeFunctionData","checksumAddress","getAddress","getContractAddress","getCreate2Address","getCreateAddress","isAddress","isAddressEqual","blobsToCommitments","blobsToProofs","commitmentsToVersionedHashes","commitmentToVersionedHash","createCursor","hexToBytes","bytesToHex","fromBlobs","parameters","to","blobs","x","length","blob","data","active","cursor","consume","_","byte","trimmedData","commitmentToVersionedHash","sidecarsToVersionedHashes","parameters","sidecars","version","to","hashes","commitment","toBlobSidecars","toBlobs","ccipRequest","offchainLookup","offchainLookupAbiItem","offchainLookupSignature","ccipReadTunnel","assertCurrentChain","defineChain","extendSchema","extractChain","getChainContractAddress","concat","concatBytes","concatHex","isBytes","isHex","pad","padBytes","padHex","size","slice","sliceBytes","sliceHex","trim","bytesToBigInt","bytesToBool","bytesToNumber","bytesToString","fromBytes","fromHex","hexToBigInt","hexToBool","hexToNumber","hexToString","fromRlp","boolToBytes","hexToBytes","numberToBytes","stringToBytes","toBytes","boolToHex","bytesToHex","numberToHex","stringToHex","toHex","bytesToRlp","hexToRlp","toRlp","labelhash","namehash","toCoinType","getContractError","defineBlock","formatBlock","formatLog","defineTransaction","formatTransaction","transactionType","defineTransactionReceipt","formatTransactionReceipt","defineTransactionRequest","formatTransactionRequest","rpcTransactionType","isHash","keccak256","ripemd160","sha256","toEventHash","toEventSelector","toEventSignature","toFunctionHash","toFunctionSelector","toFunctionSignature","defineKzg","blobToKzgCommitment","computeBlobKzgProof","setupKzg","parameters","path","error","defineKzg","createNonceManager","nonceManager","withCache","withRetry","withTimeout","hexToBytes","bytesToHex","compactSignatureToSignature","r","yParityAndS","yParityAndS_bytes","yParity","s","hashMessage","hashDomain","hashStruct","hashTypedData","isErc6492Signature","isErc8010Signature","secp256k1","numberToHex","parseCompactSignature","signatureHex","r","s","parseErc6492Signature","parseErc8010Signature","parseSignature","recoverAddress","recoverMessageAddress","recoverPublicKey","keccak256","parseTransaction","serializeTransaction","recoverAddress","recoverTransactionAddress","parameters","serializedTransaction","signature_","transaction","signature","serialized","recoverTypedDataAddress","secp256k1","hexToBigInt","serializeCompactSignature","r","yParityAndS","serializeErc6492Signature","serializeErc8010Signature","serializeSignature","hexToBytes","bytesToHex","signatureToCompactSignature","signature","r","s","v","yParity","yParity_","yParityAndS","bytes","toPrefixedMessage","verifyHash","verifyMessage","verifyTypedData","stringify","assertRequest","assertTransactionEIP1559","assertTransactionEIP2930","assertTransactionLegacy","getSerializedTransactionType","getTransactionType","parseTransaction","serializeAccessList","serializeTransaction","domainSeparator","getTypesForEIP712Domain","serializeTypedData","validateTypedData","formatEther","formatGwei","formatUnits","parseEther","parseGwei","parseUnits"],"sources":["../esm/npm/viem@2.52.0/node_modules/viem/index.ts","../esm/npm/viem@2.52.0/node_modules/viem/actions/getContract.ts","../esm/npm/viem@2.52.0/node_modules/viem/clients/createPublicClient.ts","../esm/npm/viem@2.52.0/node_modules/viem/clients/createTestClient.ts","../esm/npm/viem@2.52.0/node_modules/viem/clients/decorators/test.ts","../esm/npm/viem@2.52.0/node_modules/viem/clients/createWalletClient.ts","../esm/npm/viem@2.52.0/node_modules/viem/clients/transports/custom.ts","../esm/npm/viem@2.52.0/node_modules/viem/clients/transports/fallback.ts","../esm/npm/viem@2.52.0/node_modules/viem/clients/transports/webSocket.ts","../esm/npm/viem@2.52.0/node_modules/viem/types/eip1193.ts","../esm/npm/viem@2.52.0/node_modules/viem/utils/abi/decodeDeployData.ts","../esm/npm/viem@2.52.0/node_modules/viem/utils/blob/fromBlobs.ts","../esm/npm/viem@2.52.0/node_modules/viem/utils/blob/sidecarsToVersionedHashes.ts","../esm/npm/viem@2.52.0/node_modules/viem/utils/kzg/defineKzg.ts","../esm/npm/viem@2.52.0/node_modules/viem/utils/kzg/setupKzg.ts","../esm/npm/viem@2.52.0/node_modules/viem/utils/signature/compactSignatureToSignature.ts","../esm/npm/viem@2.52.0/node_modules/viem/utils/signature/parseCompactSignature.ts","../esm/npm/viem@2.52.0/node_modules/viem/utils/signature/recoverTransactionAddress.ts","../esm/npm/viem@2.52.0/node_modules/viem/utils/signature/serializeCompactSignature.ts","../esm/npm/viem@2.52.0/node_modules/viem/utils/signature/signatureToCompactSignature.ts"],"sourcesContent":["// biome-ignore lint/performance/noBarrelFile: entrypoint module\nexport {\n  type Abi,\n  type AbiEvent,\n  type AbiFunction,\n  type AbiParameter,\n  type AbiParameterKind,\n  type AbiParameterToPrimitiveType,\n  type AbiStateMutability,\n  type Address,\n  CircularReferenceError,\n  InvalidAbiItemError,\n  InvalidAbiParameterError,\n  InvalidAbiParametersError,\n  InvalidAbiTypeParameterError,\n  InvalidFunctionModifierError,\n  InvalidModifierError,\n  InvalidParameterError,\n  InvalidParenthesisError,\n  InvalidSignatureError,\n  InvalidStructSignatureError,\n  type Narrow,\n  type ParseAbi,\n  type ParseAbiItem,\n  type ParseAbiParameter,\n  type ParseAbiParameters,\n  parseAbi,\n  parseAbiItem,\n  parseAbiParameter,\n  parseAbiParameters,\n  SolidityProtectedKeywordError,\n  type TypedData,\n  type TypedDataDomain,\n  type TypedDataParameter,\n  UnknownSignatureError,\n  UnknownTypeError,\n} from 'abitype'\nexport type {\n  BlockOverrides,\n  Rpc as RpcBlockOverrides,\n} from 'ox/BlockOverrides'\nexport type { EntryPointVersion } from './account-abstraction/types/entryPointVersion.js'\nexport type {\n  RpcEstimateUserOperationGasReturnType,\n  RpcGetUserOperationByHashReturnType,\n  RpcUserOperation,\n  RpcUserOperationReceipt,\n  RpcUserOperationRequest,\n} from './account-abstraction/types/rpc.js'\nexport type {\n  EstimateUserOperationGasReturnType,\n  GetUserOperationByHashReturnType,\n  PackedUserOperation,\n  UserOperation,\n  UserOperationReceipt,\n  UserOperationRequest,\n} from './account-abstraction/types/userOperation.js'\nexport type {\n  Account,\n  AccountSource,\n  CustomSource,\n  HDAccount,\n  HDOptions,\n  JsonRpcAccount,\n  LocalAccount,\n  PrivateKeyAccount,\n} from './accounts/types.js'\nexport type {\n  GetEnsAddressErrorType,\n  GetEnsAddressParameters,\n  GetEnsAddressReturnType,\n} from './actions/ens/getEnsAddress.js'\nexport type {\n  GetEnsAvatarErrorType,\n  GetEnsAvatarParameters,\n  GetEnsAvatarReturnType,\n} from './actions/ens/getEnsAvatar.js'\nexport type {\n  GetEnsNameErrorType,\n  GetEnsNameParameters,\n  GetEnsNameReturnType,\n} from './actions/ens/getEnsName.js'\nexport type {\n  GetEnsResolverErrorType,\n  GetEnsResolverParameters,\n  GetEnsResolverReturnType,\n} from './actions/ens/getEnsResolver.js'\nexport type {\n  GetEnsTextErrorType,\n  GetEnsTextParameters,\n  GetEnsTextReturnType,\n} from './actions/ens/getEnsText.js'\nexport {\n  type GetContractErrorType,\n  type GetContractParameters,\n  type GetContractReturnType,\n  getContract,\n} from './actions/getContract.js'\nexport type {\n  CallErrorType,\n  CallParameters,\n  CallReturnType,\n} from './actions/public/call.js'\nexport type {\n  CreateAccessListErrorType,\n  CreateAccessListParameters,\n  CreateAccessListReturnType,\n} from './actions/public/createAccessList.js'\nexport type {\n  CreateBlockFilterErrorType,\n  CreateBlockFilterReturnType,\n} from './actions/public/createBlockFilter.js'\nexport type {\n  CreateContractEventFilterErrorType,\n  CreateContractEventFilterParameters,\n  CreateContractEventFilterReturnType,\n} from './actions/public/createContractEventFilter.js'\nexport type {\n  CreateEventFilterErrorType,\n  CreateEventFilterParameters,\n  CreateEventFilterReturnType,\n} from './actions/public/createEventFilter.js'\nexport type {\n  CreatePendingTransactionFilterErrorType,\n  CreatePendingTransactionFilterReturnType,\n} from './actions/public/createPendingTransactionFilter.js'\nexport type {\n  EstimateContractGasErrorType,\n  EstimateContractGasParameters,\n  EstimateContractGasReturnType,\n} from './actions/public/estimateContractGas.js'\nexport type {\n  EstimateFeesPerGasErrorType,\n  EstimateFeesPerGasParameters,\n  EstimateFeesPerGasReturnType,\n} from './actions/public/estimateFeesPerGas.js'\nexport type {\n  EstimateGasErrorType,\n  EstimateGasParameters,\n  EstimateGasReturnType,\n} from './actions/public/estimateGas.js'\nexport type {\n  EstimateMaxPriorityFeePerGasErrorType,\n  EstimateMaxPriorityFeePerGasParameters,\n  EstimateMaxPriorityFeePerGasReturnType,\n} from './actions/public/estimateMaxPriorityFeePerGas.js'\nexport type {\n  FillTransactionErrorType,\n  FillTransactionParameters,\n  FillTransactionReturnType,\n} from './actions/public/fillTransaction.js'\nexport type {\n  GetBalanceErrorType,\n  GetBalanceParameters,\n  GetBalanceReturnType,\n} from './actions/public/getBalance.js'\nexport type {\n  GetBlobBaseFeeErrorType,\n  GetBlobBaseFeeReturnType,\n} from './actions/public/getBlobBaseFee.js'\nexport type {\n  GetBlockErrorType,\n  GetBlockParameters,\n  GetBlockReturnType,\n} from './actions/public/getBlock.js'\nexport type {\n  GetBlockNumberErrorType,\n  GetBlockNumberParameters,\n  GetBlockNumberReturnType,\n} from './actions/public/getBlockNumber.js'\nexport type {\n  GetBlockReceiptsErrorType,\n  GetBlockReceiptsParameters,\n  GetBlockReceiptsReturnType,\n} from './actions/public/getBlockReceipts.js'\nexport type {\n  GetBlockTransactionCountErrorType,\n  GetBlockTransactionCountParameters,\n  GetBlockTransactionCountReturnType,\n} from './actions/public/getBlockTransactionCount.js'\nexport type {\n  GetChainIdErrorType,\n  GetChainIdReturnType,\n} from './actions/public/getChainId.js'\nexport type {\n  /** @deprecated Use `GetCodeErrorType` instead */\n  GetCodeErrorType as GetBytecodeErrorType,\n  GetCodeErrorType,\n  /** @deprecated Use `GetCodeParameters` instead */\n  GetCodeParameters as GetBytecodeParameters,\n  GetCodeParameters,\n  /** @deprecated Use `GetCodeReturnType` instead  */\n  GetCodeReturnType as GetBytecodeReturnType,\n  GetCodeReturnType,\n} from './actions/public/getCode.js'\nexport type {\n  GetContractEventsErrorType,\n  GetContractEventsParameters,\n  GetContractEventsReturnType,\n} from './actions/public/getContractEvents.js'\nexport type {\n  GetDelegationErrorType,\n  GetDelegationParameters,\n  GetDelegationReturnType,\n} from './actions/public/getDelegation.js'\nexport type {\n  GetEip712DomainErrorType,\n  GetEip712DomainParameters,\n  GetEip712DomainReturnType,\n} from './actions/public/getEip712Domain.js'\nexport type {\n  GetFeeHistoryErrorType,\n  GetFeeHistoryParameters,\n  GetFeeHistoryReturnType,\n} from './actions/public/getFeeHistory.js'\nexport type {\n  GetFilterChangesErrorType,\n  GetFilterChangesParameters,\n  GetFilterChangesReturnType,\n} from './actions/public/getFilterChanges.js'\nexport type {\n  GetFilterLogsErrorType,\n  GetFilterLogsParameters,\n  GetFilterLogsReturnType,\n} from './actions/public/getFilterLogs.js'\nexport type {\n  GetGasPriceErrorType,\n  GetGasPriceReturnType,\n} from './actions/public/getGasPrice.js'\nexport type {\n  GetLogsErrorType,\n  GetLogsParameters,\n  GetLogsReturnType,\n} from './actions/public/getLogs.js'\nexport type {\n  GetProofErrorType,\n  GetProofParameters,\n  GetProofReturnType,\n} from './actions/public/getProof.js'\nexport type {\n  GetStorageAtErrorType,\n  GetStorageAtParameters,\n  GetStorageAtReturnType,\n} from './actions/public/getStorageAt.js'\nexport type {\n  GetTransactionErrorType,\n  GetTransactionParameters,\n  GetTransactionReturnType,\n} from './actions/public/getTransaction.js'\nexport type {\n  GetTransactionConfirmationsErrorType,\n  GetTransactionConfirmationsParameters,\n  GetTransactionConfirmationsReturnType,\n} from './actions/public/getTransactionConfirmations.js'\nexport type {\n  GetTransactionCountErrorType,\n  GetTransactionCountParameters,\n  GetTransactionCountReturnType,\n} from './actions/public/getTransactionCount.js'\nexport type {\n  GetTransactionReceiptErrorType,\n  GetTransactionReceiptParameters,\n  GetTransactionReceiptReturnType,\n} from './actions/public/getTransactionReceipt.js'\nexport type {\n  MulticallErrorType,\n  MulticallParameters,\n  MulticallReturnType,\n} from './actions/public/multicall.js'\nexport type {\n  ReadContractErrorType,\n  ReadContractParameters,\n  ReadContractReturnType,\n} from './actions/public/readContract.js'\nexport type {\n  SimulateBlocksErrorType,\n  SimulateBlocksParameters,\n  SimulateBlocksReturnType,\n} from './actions/public/simulateBlocks.js'\nexport type {\n  SimulateCallsErrorType,\n  SimulateCallsParameters,\n  SimulateCallsReturnType,\n} from './actions/public/simulateCalls.js'\nexport type {\n  GetMutabilityAwareValue,\n  SimulateContractErrorType,\n  SimulateContractParameters,\n  SimulateContractReturnType,\n} from './actions/public/simulateContract.js'\nexport type {\n  UninstallFilterErrorType,\n  UninstallFilterParameters,\n  UninstallFilterReturnType,\n} from './actions/public/uninstallFilter.js'\nexport type {\n  VerifyHashErrorType as VerifyHashActionErrorType,\n  VerifyHashParameters as VerifyHashActionParameters,\n  VerifyHashReturnType as VerifyHashActionReturnType,\n} from './actions/public/verifyHash.js'\nexport type {\n  VerifyMessageErrorType as VerifyMessageActionErrorType,\n  VerifyMessageParameters as VerifyMessageActionParameters,\n  VerifyMessageReturnType as VerifyMessageActionReturnType,\n} from './actions/public/verifyMessage.js'\nexport type {\n  VerifyTypedDataErrorType as VerifyTypedDataActionErrorType,\n  VerifyTypedDataParameters as VerifyTypedDataActionParameters,\n  VerifyTypedDataReturnType as VerifyTypedDataActionReturnType,\n} from './actions/public/verifyTypedData.js'\nexport type {\n  ReplacementReason,\n  ReplacementReturnType,\n  WaitForTransactionReceiptErrorType,\n  WaitForTransactionReceiptParameters,\n  WaitForTransactionReceiptReturnType,\n} from './actions/public/waitForTransactionReceipt.js'\nexport type {\n  OnBlockNumberFn,\n  OnBlockNumberParameter,\n  WatchBlockNumberErrorType,\n  WatchBlockNumberParameters,\n  WatchBlockNumberReturnType,\n} from './actions/public/watchBlockNumber.js'\nexport type {\n  OnBlock,\n  OnBlockParameter,\n  WatchBlocksErrorType,\n  WatchBlocksParameters,\n  WatchBlocksReturnType,\n} from './actions/public/watchBlocks.js'\nexport type {\n  WatchContractEventErrorType,\n  WatchContractEventOnLogsFn,\n  WatchContractEventOnLogsParameter,\n  WatchContractEventParameters,\n  WatchContractEventReturnType,\n} from './actions/public/watchContractEvent.js'\nexport type {\n  WatchEventErrorType,\n  WatchEventOnLogsFn,\n  WatchEventOnLogsParameter,\n  WatchEventParameters,\n  WatchEventReturnType,\n} from './actions/public/watchEvent.js'\nexport type {\n  OnTransactionsFn,\n  OnTransactionsParameter,\n  WatchPendingTransactionsErrorType,\n  WatchPendingTransactionsParameters,\n  WatchPendingTransactionsReturnType,\n} from './actions/public/watchPendingTransactions.js'\nexport type {\n  DropTransactionErrorType,\n  DropTransactionParameters,\n} from './actions/test/dropTransaction.js'\nexport type {\n  DumpStateErrorType,\n  DumpStateReturnType,\n} from './actions/test/dumpState.js'\nexport type {\n  GetAutomineErrorType,\n  GetAutomineReturnType,\n} from './actions/test/getAutomine.js'\nexport type {\n  GetTxpoolContentErrorType,\n  GetTxpoolContentReturnType,\n} from './actions/test/getTxpoolContent.js'\nexport type {\n  GetTxpoolStatusErrorType,\n  GetTxpoolStatusReturnType,\n} from './actions/test/getTxpoolStatus.js'\nexport type {\n  ImpersonateAccountErrorType,\n  ImpersonateAccountParameters,\n} from './actions/test/impersonateAccount.js'\nexport type {\n  IncreaseTimeErrorType,\n  IncreaseTimeParameters,\n} from './actions/test/increaseTime.js'\nexport type {\n  InspectTxpoolErrorType,\n  InspectTxpoolReturnType,\n} from './actions/test/inspectTxpool.js'\nexport type {\n  LoadStateErrorType,\n  LoadStateParameters,\n  LoadStateReturnType,\n} from './actions/test/loadState.js'\nexport type { MineErrorType, MineParameters } from './actions/test/mine.js'\nexport type { RemoveBlockTimestampIntervalErrorType } from './actions/test/removeBlockTimestampInterval.js'\nexport type { ResetErrorType, ResetParameters } from './actions/test/reset.js'\nexport type {\n  RevertErrorType,\n  RevertParameters,\n} from './actions/test/revert.js'\nexport type {\n  SendUnsignedTransactionErrorType,\n  SendUnsignedTransactionParameters,\n  SendUnsignedTransactionReturnType,\n} from './actions/test/sendUnsignedTransaction.js'\nexport type { SetAutomineErrorType } from './actions/test/setAutomine.js'\nexport type {\n  SetBalanceErrorType,\n  SetBalanceParameters,\n} from './actions/test/setBalance.js'\nexport type {\n  SetBlockGasLimitErrorType,\n  SetBlockGasLimitParameters,\n} from './actions/test/setBlockGasLimit.js'\nexport type {\n  SetBlockTimestampIntervalErrorType,\n  SetBlockTimestampIntervalParameters,\n} from './actions/test/setBlockTimestampInterval.js'\nexport type {\n  SetCodeErrorType,\n  SetCodeParameters,\n} from './actions/test/setCode.js'\nexport type {\n  SetCoinbaseErrorType,\n  SetCoinbaseParameters,\n} from './actions/test/setCoinbase.js'\nexport type {\n  SetIntervalMiningErrorType,\n  SetIntervalMiningParameters,\n} from './actions/test/setIntervalMining.js'\nexport type { SetLoggingEnabledErrorType } from './actions/test/setLoggingEnabled.js'\nexport type {\n  SetMinGasPriceErrorType,\n  SetMinGasPriceParameters,\n} from './actions/test/setMinGasPrice.js'\nexport type {\n  SetNextBlockBaseFeePerGasErrorType,\n  SetNextBlockBaseFeePerGasParameters,\n} from './actions/test/setNextBlockBaseFeePerGas.js'\nexport type {\n  SetNextBlockTimestampErrorType,\n  SetNextBlockTimestampParameters,\n} from './actions/test/setNextBlockTimestamp.js'\nexport type {\n  SetNonceErrorType,\n  SetNonceParameters,\n} from './actions/test/setNonce.js'\nexport type { SetRpcUrlErrorType } from './actions/test/setRpcUrl.js'\nexport type {\n  SetStorageAtErrorType,\n  SetStorageAtParameters,\n} from './actions/test/setStorageAt.js'\nexport type { SnapshotErrorType } from './actions/test/snapshot.js'\nexport type {\n  StopImpersonatingAccountErrorType,\n  StopImpersonatingAccountParameters,\n} from './actions/test/stopImpersonatingAccount.js'\nexport type {\n  AddChainErrorType,\n  AddChainParameters,\n} from './actions/wallet/addChain.js'\nexport type {\n  DeployContractErrorType,\n  DeployContractParameters,\n  DeployContractReturnType,\n} from './actions/wallet/deployContract.js'\nexport type {\n  GetAddressesErrorType,\n  GetAddressesReturnType,\n} from './actions/wallet/getAddresses.js'\nexport type {\n  GetCallsStatusErrorType,\n  GetCallsStatusParameters,\n  GetCallsStatusReturnType,\n} from './actions/wallet/getCallsStatus.js'\nexport type {\n  GetCapabilitiesErrorType,\n  GetCapabilitiesParameters,\n  GetCapabilitiesReturnType,\n} from './actions/wallet/getCapabilities.js'\nexport type {\n  GetPermissionsErrorType,\n  GetPermissionsReturnType,\n} from './actions/wallet/getPermissions.js'\nexport type {\n  PrepareAuthorizationErrorType,\n  PrepareAuthorizationParameters,\n  PrepareAuthorizationReturnType,\n} from './actions/wallet/prepareAuthorization.js'\nexport type {\n  PrepareTransactionRequestErrorType,\n  PrepareTransactionRequestParameters,\n  PrepareTransactionRequestParameterType,\n  PrepareTransactionRequestRequest,\n  PrepareTransactionRequestReturnType,\n} from './actions/wallet/prepareTransactionRequest.js'\nexport type {\n  RequestAddressesErrorType,\n  RequestAddressesReturnType,\n} from './actions/wallet/requestAddresses.js'\nexport type {\n  RequestPermissionsErrorType,\n  RequestPermissionsParameters,\n  RequestPermissionsReturnType,\n} from './actions/wallet/requestPermissions.js'\nexport type {\n  SendCallsErrorType,\n  SendCallsParameters,\n  SendCallsReturnType,\n} from './actions/wallet/sendCalls.js'\nexport type {\n  SendCallsSyncErrorType,\n  SendCallsSyncParameters,\n  SendCallsSyncReturnType,\n} from './actions/wallet/sendCallsSync.js'\nexport type {\n  SendRawTransactionErrorType,\n  SendRawTransactionParameters,\n  SendRawTransactionReturnType,\n} from './actions/wallet/sendRawTransaction.js'\nexport type {\n  SendRawTransactionSyncErrorType,\n  SendRawTransactionSyncParameters,\n  SendRawTransactionSyncReturnType,\n} from './actions/wallet/sendRawTransactionSync.js'\nexport type {\n  SendTransactionErrorType,\n  SendTransactionParameters,\n  SendTransactionRequest,\n  SendTransactionReturnType,\n} from './actions/wallet/sendTransaction.js'\nexport type {\n  SendTransactionSyncErrorType,\n  SendTransactionSyncParameters,\n  SendTransactionSyncRequest,\n  SendTransactionSyncReturnType,\n} from './actions/wallet/sendTransactionSync.js'\nexport type {\n  ShowCallsStatusErrorType,\n  ShowCallsStatusParameters,\n  ShowCallsStatusReturnType,\n} from './actions/wallet/showCallsStatus.js'\nexport type {\n  SignAuthorizationErrorType,\n  SignAuthorizationParameters,\n  SignAuthorizationReturnType,\n} from './actions/wallet/signAuthorization.js'\nexport type {\n  SignMessageErrorType,\n  SignMessageParameters,\n  SignMessageReturnType,\n} from './actions/wallet/signMessage.js'\nexport type {\n  SignTransactionErrorType,\n  SignTransactionParameters,\n  SignTransactionRequest,\n  SignTransactionReturnType,\n} from './actions/wallet/signTransaction.js'\nexport type {\n  SignTypedDataErrorType,\n  SignTypedDataParameters,\n  SignTypedDataReturnType,\n} from './actions/wallet/signTypedData.js'\nexport type {\n  SwitchChainErrorType,\n  SwitchChainParameters,\n} from './actions/wallet/switchChain.js'\nexport type {\n  WaitForCallsStatusErrorType,\n  WaitForCallsStatusParameters,\n  WaitForCallsStatusReturnType,\n  WaitForCallsStatusTimeoutErrorType,\n} from './actions/wallet/waitForCallsStatus.js'\nexport { WaitForCallsStatusTimeoutError } from './actions/wallet/waitForCallsStatus.js'\nexport type {\n  WatchAssetErrorType,\n  WatchAssetParameters,\n  WatchAssetReturnType,\n} from './actions/wallet/watchAsset.js'\nexport type {\n  WriteContractErrorType,\n  WriteContractParameters,\n  WriteContractReturnType,\n} from './actions/wallet/writeContract.js'\nexport type {\n  WriteContractSyncErrorType,\n  WriteContractSyncParameters,\n  WriteContractSyncReturnType,\n} from './actions/wallet/writeContractSync.js'\nexport {\n  type Client,\n  type ClientConfig,\n  type CreateClientErrorType,\n  createClient,\n  type MulticallBatchOptions,\n  rpcSchema,\n} from './clients/createClient.js'\nexport {\n  type CreatePublicClientErrorType,\n  createPublicClient,\n  type PublicClient,\n  type PublicClientConfig,\n} from './clients/createPublicClient.js'\nexport {\n  type CreateTestClientErrorType,\n  createTestClient,\n  type TestClient,\n  type TestClientConfig,\n} from './clients/createTestClient.js'\nexport {\n  type CreateWalletClientErrorType,\n  createWalletClient,\n  type WalletClient,\n  type WalletClientConfig,\n} from './clients/createWalletClient.js'\nexport {\n  type PublicActions,\n  publicActions,\n} from './clients/decorators/public.js'\nexport {\n  type TestActions,\n  testActions,\n} from './clients/decorators/test.js'\nexport {\n  type WalletActions,\n  walletActions,\n} from './clients/decorators/wallet.js'\nexport {\n  type CreateTransportErrorType,\n  createTransport,\n  type Transport,\n  type TransportConfig,\n} from './clients/transports/createTransport.js'\nexport {\n  type CustomTransport,\n  type CustomTransportConfig,\n  type CustomTransportErrorType,\n  custom,\n} from './clients/transports/custom.js'\nexport {\n  type FallbackTransport,\n  type FallbackTransportConfig,\n  type FallbackTransportErrorType,\n  fallback,\n  shouldThrow,\n} from './clients/transports/fallback.js'\nexport {\n  type HttpTransport,\n  type HttpTransportConfig,\n  type HttpTransportErrorType,\n  http,\n} from './clients/transports/http.js'\nexport {\n  type WebSocketTransport,\n  type WebSocketTransportConfig,\n  type WebSocketTransportErrorType,\n  webSocket,\n} from './clients/transports/webSocket.js'\nexport {\n  erc20Abi,\n  erc20Abi_bytes32,\n  erc721Abi,\n  erc1155Abi,\n  erc4626Abi,\n  erc6492SignatureValidatorAbi,\n  /** @deprecated use `erc6492SignatureValidatorAbi` instead. */\n  erc6492SignatureValidatorAbi as universalSignatureValidatorAbi,\n  multicall3Abi,\n} from './constants/abis.js'\nexport { ethAddress, zeroAddress } from './constants/address.js'\nexport { zeroHash } from './constants/bytes.js'\nexport {\n  deploylessCallViaBytecodeBytecode,\n  deploylessCallViaFactoryBytecode,\n  erc6492SignatureValidatorByteCode,\n  /** @deprecated use `erc6492SignatureValidatorByteCode` instead. */\n  erc6492SignatureValidatorByteCode as universalSignatureValidatorByteCode,\n} from './constants/contracts.js'\nexport {\n  maxInt8,\n  maxInt16,\n  maxInt24,\n  maxInt32,\n  maxInt40,\n  maxInt48,\n  maxInt56,\n  maxInt64,\n  maxInt72,\n  maxInt80,\n  maxInt88,\n  maxInt96,\n  maxInt104,\n  maxInt112,\n  maxInt120,\n  maxInt128,\n  maxInt136,\n  maxInt144,\n  maxInt152,\n  maxInt160,\n  maxInt168,\n  maxInt176,\n  maxInt184,\n  maxInt192,\n  maxInt200,\n  maxInt208,\n  maxInt216,\n  maxInt224,\n  maxInt232,\n  maxInt240,\n  maxInt248,\n  maxInt256,\n  maxUint8,\n  maxUint16,\n  maxUint24,\n  maxUint32,\n  maxUint40,\n  maxUint48,\n  maxUint56,\n  maxUint64,\n  maxUint72,\n  maxUint80,\n  maxUint88,\n  maxUint96,\n  maxUint104,\n  maxUint112,\n  maxUint120,\n  maxUint128,\n  maxUint136,\n  maxUint144,\n  maxUint152,\n  maxUint160,\n  maxUint168,\n  maxUint176,\n  maxUint184,\n  maxUint192,\n  maxUint200,\n  maxUint208,\n  maxUint216,\n  maxUint224,\n  maxUint232,\n  maxUint240,\n  maxUint248,\n  maxUint256,\n  minInt8,\n  minInt16,\n  minInt24,\n  minInt32,\n  minInt40,\n  minInt48,\n  minInt56,\n  minInt64,\n  minInt72,\n  minInt80,\n  minInt88,\n  minInt96,\n  minInt104,\n  minInt112,\n  minInt120,\n  minInt128,\n  minInt136,\n  minInt144,\n  minInt152,\n  minInt160,\n  minInt168,\n  minInt176,\n  minInt184,\n  minInt192,\n  minInt200,\n  minInt208,\n  minInt216,\n  minInt224,\n  minInt232,\n  minInt240,\n  minInt248,\n  minInt256,\n} from './constants/number.js'\nexport { presignMessagePrefix } from './constants/strings.js'\nexport { etherUnits, gweiUnits, weiUnits } from './constants/unit.js'\nexport {\n  AbiConstructorNotFoundError,\n  type AbiConstructorNotFoundErrorType,\n  AbiConstructorParamsNotFoundError,\n  type AbiConstructorParamsNotFoundErrorType,\n  AbiDecodingDataSizeInvalidError,\n  type AbiDecodingDataSizeInvalidErrorType,\n  AbiDecodingDataSizeTooSmallError,\n  type AbiDecodingDataSizeTooSmallErrorType,\n  AbiDecodingZeroDataError,\n  type AbiDecodingZeroDataErrorType,\n  AbiEncodingArrayLengthMismatchError,\n  type AbiEncodingArrayLengthMismatchErrorType,\n  AbiEncodingBytesSizeMismatchError,\n  type AbiEncodingBytesSizeMismatchErrorType,\n  AbiEncodingLengthMismatchError,\n  type AbiEncodingLengthMismatchErrorType,\n  AbiErrorInputsNotFoundError,\n  type AbiErrorInputsNotFoundErrorType,\n  AbiErrorNotFoundError,\n  type AbiErrorNotFoundErrorType,\n  AbiErrorSignatureNotFoundError,\n  type AbiErrorSignatureNotFoundErrorType,\n  AbiEventNotFoundError,\n  type AbiEventNotFoundErrorType,\n  AbiEventSignatureEmptyTopicsError,\n  type AbiEventSignatureEmptyTopicsErrorType,\n  AbiEventSignatureNotFoundError,\n  type AbiEventSignatureNotFoundErrorType,\n  AbiFunctionNotFoundError,\n  type AbiFunctionNotFoundErrorType,\n  AbiFunctionOutputsNotFoundError,\n  type AbiFunctionOutputsNotFoundErrorType,\n  AbiFunctionSignatureNotFoundError,\n  type AbiFunctionSignatureNotFoundErrorType,\n  BytesSizeMismatchError,\n  type BytesSizeMismatchErrorType,\n  DecodeLogDataMismatch,\n  type DecodeLogDataMismatchErrorType,\n  DecodeLogTopicsMismatch,\n  type DecodeLogTopicsMismatchErrorType,\n  InvalidAbiDecodingTypeError,\n  type InvalidAbiDecodingTypeErrorType,\n  InvalidAbiEncodingTypeError,\n  type InvalidAbiEncodingTypeErrorType,\n  InvalidArrayError,\n  type InvalidArrayErrorType,\n  InvalidDefinitionTypeError,\n  type InvalidDefinitionTypeErrorType,\n  UnsupportedPackedAbiType,\n  type UnsupportedPackedAbiTypeErrorType,\n} from './errors/abi.js'\nexport {\n  InvalidAddressError,\n  type InvalidAddressErrorType,\n} from './errors/address.js'\nexport { BaseError, type BaseErrorType, setErrorConfig } from './errors/base.js'\nexport {\n  BlockNotFoundError,\n  type BlockNotFoundErrorType,\n} from './errors/block.js'\nexport {\n  BundleFailedError,\n  type BundleFailedErrorType,\n} from './errors/calls.js'\nexport {\n  ChainDoesNotSupportContract,\n  type ChainDoesNotSupportContractErrorType,\n  ChainMismatchError,\n  type ChainMismatchErrorType,\n  ChainNotFoundError,\n  type ChainNotFoundErrorType,\n  ClientChainNotConfiguredError,\n  type ClientChainNotConfiguredErrorType,\n  InvalidChainIdError,\n  type InvalidChainIdErrorType,\n} from './errors/chain.js'\nexport {\n  CallExecutionError,\n  type CallExecutionErrorType,\n  ContractFunctionExecutionError,\n  type ContractFunctionExecutionErrorType,\n  ContractFunctionRevertedError,\n  type ContractFunctionRevertedErrorType,\n  ContractFunctionZeroDataError,\n  type ContractFunctionZeroDataErrorType,\n  CounterfactualDeploymentFailedError,\n  type CounterfactualDeploymentFailedErrorType,\n  RawContractError,\n  type RawContractErrorType,\n} from './errors/contract.js'\nexport {\n  SizeExceedsPaddingSizeError,\n  type SizeExceedsPaddingSizeErrorType,\n  SliceOffsetOutOfBoundsError,\n  type SliceOffsetOutOfBoundsErrorType,\n} from './errors/data.js'\nexport {\n  IntegerOutOfRangeError,\n  type IntegerOutOfRangeErrorType,\n  InvalidBytesBooleanError,\n  type InvalidBytesBooleanErrorType,\n  InvalidHexBooleanError,\n  type InvalidHexBooleanErrorType,\n  InvalidHexValueError,\n  type InvalidHexValueErrorType,\n  SizeOverflowError,\n  type SizeOverflowErrorType,\n} from './errors/encoding.js'\nexport {\n  type EnsAvatarInvalidMetadataError,\n  type EnsAvatarInvalidMetadataErrorType,\n  EnsAvatarInvalidNftUriError,\n  type EnsAvatarInvalidNftUriErrorType,\n  EnsAvatarUnsupportedNamespaceError,\n  type EnsAvatarUnsupportedNamespaceErrorType,\n  EnsAvatarUriResolutionError,\n  type EnsAvatarUriResolutionErrorType,\n  EnsInvalidChainIdError,\n  type EnsInvalidChainIdErrorType,\n} from './errors/ens.js'\nexport {\n  EstimateGasExecutionError,\n  type EstimateGasExecutionErrorType,\n} from './errors/estimateGas.js'\nexport {\n  BaseFeeScalarError,\n  type BaseFeeScalarErrorType,\n  Eip1559FeesNotSupportedError,\n  type Eip1559FeesNotSupportedErrorType,\n  MaxFeePerGasTooLowError,\n  type MaxFeePerGasTooLowErrorType,\n} from './errors/fee.js'\nexport {\n  FilterTypeNotSupportedError,\n  type FilterTypeNotSupportedErrorType,\n} from './errors/log.js'\nexport {\n  ExecutionRevertedError,\n  type ExecutionRevertedErrorType,\n  FeeCapTooHighError,\n  type FeeCapTooHighErrorType,\n  FeeCapTooLowError,\n  type FeeCapTooLowErrorType,\n  InsufficientFundsError,\n  type InsufficientFundsErrorType,\n  IntrinsicGasTooHighError,\n  type IntrinsicGasTooHighErrorType,\n  IntrinsicGasTooLowError,\n  type IntrinsicGasTooLowErrorType,\n  NonceMaxValueError,\n  type NonceMaxValueErrorType,\n  NonceTooHighError,\n  type NonceTooHighErrorType,\n  NonceTooLowError,\n  type NonceTooLowErrorType,\n  TipAboveFeeCapError,\n  type TipAboveFeeCapErrorType,\n  TransactionTypeNotSupportedError,\n  type TransactionTypeNotSupportedErrorType,\n  UnknownNodeError,\n  type UnknownNodeErrorType,\n} from './errors/node.js'\nexport {\n  HttpRequestError,\n  type HttpRequestErrorType,\n  RpcRequestError,\n  type RpcRequestErrorType,\n  SocketClosedError,\n  type SocketClosedErrorType,\n  TimeoutError,\n  type TimeoutErrorType,\n  WebSocketRequestError,\n  type WebSocketRequestErrorType,\n} from './errors/request.js'\nexport {\n  AtomicityNotSupportedError,\n  type AtomicityNotSupportedErrorType,\n  AtomicReadyWalletRejectedUpgradeError,\n  type AtomicReadyWalletRejectedUpgradeErrorType,\n  BundleTooLargeError,\n  type BundleTooLargeErrorType,\n  ChainDisconnectedError,\n  type ChainDisconnectedErrorType,\n  DuplicateIdError,\n  type DuplicateIdErrorType,\n  InternalRpcError,\n  type InternalRpcErrorType,\n  InvalidInputRpcError,\n  type InvalidInputRpcErrorType,\n  InvalidParamsRpcError,\n  type InvalidParamsRpcErrorType,\n  InvalidRequestRpcError,\n  type InvalidRequestRpcErrorType,\n  JsonRpcVersionUnsupportedError,\n  type JsonRpcVersionUnsupportedErrorType,\n  LimitExceededRpcError,\n  type LimitExceededRpcErrorType,\n  MethodNotFoundRpcError,\n  type MethodNotFoundRpcErrorType,\n  MethodNotSupportedRpcError,\n  type MethodNotSupportedRpcErrorType,\n  ParseRpcError,\n  type ParseRpcErrorType,\n  ProviderDisconnectedError,\n  type ProviderDisconnectedErrorType,\n  ProviderRpcError,\n  type ProviderRpcErrorCode,\n  type ProviderRpcErrorType,\n  ResourceNotFoundRpcError,\n  type ResourceNotFoundRpcErrorType,\n  ResourceUnavailableRpcError,\n  type ResourceUnavailableRpcErrorType,\n  RpcError,\n  type RpcErrorCode,\n  type RpcErrorType,\n  SwitchChainError,\n  TransactionRejectedRpcError,\n  type TransactionRejectedRpcErrorType,\n  UnauthorizedProviderError,\n  type UnauthorizedProviderErrorType,\n  UnknownBundleIdError,\n  type UnknownBundleIdErrorType,\n  UnknownRpcError,\n  type UnknownRpcErrorType,\n  UnsupportedChainIdError,\n  type UnsupportedChainIdErrorType,\n  UnsupportedNonOptionalCapabilityError,\n  type UnsupportedNonOptionalCapabilityErrorType,\n  UnsupportedProviderMethodError,\n  type UnsupportedProviderMethodErrorType,\n  UserRejectedRequestError,\n  type UserRejectedRequestErrorType,\n} from './errors/rpc.js'\nexport {\n  AccountStateConflictError,\n  type AccountStateConflictErrorType,\n  StateAssignmentConflictError,\n  type StateAssignmentConflictErrorType,\n} from './errors/stateOverride.js'\nexport {\n  FeeConflictError,\n  type FeeConflictErrorType,\n  InvalidLegacyVError,\n  type InvalidLegacyVErrorType,\n  InvalidSerializableTransactionError,\n  type InvalidSerializableTransactionErrorType,\n  InvalidSerializedTransactionError,\n  type InvalidSerializedTransactionErrorType,\n  InvalidSerializedTransactionTypeError,\n  type InvalidSerializedTransactionTypeErrorType,\n  InvalidStorageKeySizeError,\n  type InvalidStorageKeySizeErrorType,\n  TransactionExecutionError,\n  type TransactionExecutionErrorType,\n  TransactionNotFoundError,\n  type TransactionNotFoundErrorType,\n  TransactionReceiptNotFoundError,\n  type TransactionReceiptNotFoundErrorType,\n  WaitForTransactionReceiptTimeoutError,\n  type WaitForTransactionReceiptTimeoutErrorType,\n} from './errors/transaction.js'\nexport {\n  UrlRequiredError,\n  type UrlRequiredErrorType,\n} from './errors/transport.js'\nexport {\n  InvalidDomainError,\n  type InvalidDomainErrorType,\n  InvalidPrimaryTypeError,\n  type InvalidPrimaryTypeErrorType,\n  InvalidStructTypeError,\n  type InvalidStructTypeErrorType,\n} from './errors/typedData.js'\nexport {\n  InvalidDecimalNumberError,\n  type InvalidDecimalNumberErrorType,\n} from './errors/unit.js'\nexport type {\n  DeriveAccount,\n  HDKey,\n  ParseAccount,\n} from './types/account.js'\nexport type {\n  Authorization,\n  AuthorizationList,\n  AuthorizationRequest,\n  SerializedAuthorization,\n  SerializedAuthorizationList,\n  SignedAuthorization,\n  SignedAuthorizationList,\n} from './types/authorization.js'\nexport type {\n  Block,\n  BlockIdentifier,\n  BlockNumber,\n  BlockTag,\n  Uncle,\n} from './types/block.js'\nexport type { Call, Calls } from './types/calls.js'\nexport type {\n  Capabilities,\n  /** @deprecated Use `Capabilities` instead. */\n  Capabilities as WalletCapabilities,\n  CapabilitiesSchema,\n  /** @deprecated Use `ChainIdToCapabilities` instead. */\n  ChainIdToCapabilities as WalletCapabilitiesRecord,\n  ChainIdToCapabilities,\n  ExtractCapabilities,\n} from './types/capabilities.js'\nexport type {\n  Chain,\n  ChainConfig,\n  ChainContract,\n  ChainEstimateFeesPerGasFn,\n  ChainEstimateFeesPerGasFnParameters,\n  ChainFees,\n  ChainFeesFnParameters,\n  ChainFormatter,\n  ChainFormatters,\n  ChainMaxPriorityFeePerGasFn,\n  ChainSerializers,\n  DeriveChain,\n  ExtractChainFormatterExclude,\n  ExtractChainFormatterParameters,\n  ExtractChainFormatterReturnType,\n  GetChainParameter,\n} from './types/chain.js'\nexport type {\n  AbiEventParametersToPrimitiveTypes,\n  AbiEventParameterToPrimitiveType,\n  AbiEventTopicToPrimitiveType,\n  AbiItem,\n  AbiItemArgs,\n  AbiItemName,\n  ContractConstructorArgs,\n  ContractErrorArgs,\n  ContractErrorName,\n  ContractEventArgs,\n  ContractEventArgsFromTopics,\n  ContractEventName,\n  ContractFunctionArgs,\n  ContractFunctionName,\n  ContractFunctionParameters,\n  ContractFunctionReturnType,\n  EventDefinition,\n  ExtractAbiFunctionForArgs,\n  ExtractAbiItem,\n  ExtractAbiItemForArgs,\n  ExtractAbiItemNames,\n  GetEventArgs,\n  GetValue,\n  LogTopicType,\n  MaybeAbiEventName,\n  MaybeExtractEventArgsFromAbi,\n  UnionWiden,\n  Widen,\n} from './types/contract.js'\nexport type { DataSuffix } from './types/dataSuffix.js'\nexport type {\n  AddEthereumChainParameter,\n  BundlerRpcSchema,\n  DebugBundlerRpcSchema,\n  EIP1193EventMap,\n  EIP1193Events,\n  EIP1193Parameters,\n  EIP1193Provider,\n  EIP1193RequestFn,\n  EIP1193RequestOptions,\n  EIP1474Methods,\n  NetworkSync,\n  PaymasterRpcSchema,\n  ProviderConnectInfo,\n  ProviderMessage,\n  ProviderRpcErrorType as EIP1193ProviderRpcErrorType,\n  PublicRpcSchema,\n  RpcSchema,\n  RpcSchemaOverride,\n  TestRpcSchema,\n  WalletCallReceipt,\n  WalletGetAssetsParameters,\n  WalletGetAssetsReturnType,\n  WalletGetCallsStatusReturnType,\n  WalletGrantPermissionsParameters,\n  WalletGrantPermissionsReturnType,\n  WalletPermission,\n  WalletPermissionCaveat,\n  WalletRpcSchema,\n  WalletSendCallsParameters,\n  WalletSendCallsReturnType,\n  WatchAssetParams,\n} from './types/eip1193.js'\nexport { ProviderRpcError as EIP1193ProviderRpcError } from './types/eip1193.js'\nexport type { BlobSidecar, BlobSidecars } from './types/eip4844.js'\nexport type { AssetGateway, AssetGatewayUrls } from './types/ens.js'\nexport type {\n  FeeHistory,\n  FeeValues,\n  FeeValuesEIP1559,\n  FeeValuesEIP4844,\n  FeeValuesLegacy,\n  FeeValuesType,\n} from './types/fee.js'\nexport type { Filter, FilterType } from './types/filter.js'\nexport type { GetTransactionRequestKzgParameter, Kzg } from './types/kzg.js'\nexport type { Log } from './types/log.js'\nexport type {\n  ByteArray,\n  CompactSignature,\n  Hash,\n  Hex,\n  LogTopic,\n  SignableMessage,\n  Signature,\n} from './types/misc.js'\nexport type {\n  MulticallContracts,\n  MulticallResponse,\n  MulticallResults,\n} from './types/multicall.js'\nexport type { Register, ResolvedRegister } from './types/register.js'\nexport type {\n  Index,\n  Quantity,\n  RpcAccountStateOverride,\n  RpcAuthorization,\n  RpcAuthorizationList,\n  RpcBlock,\n  RpcBlockIdentifier,\n  RpcBlockNumber,\n  RpcFeeHistory,\n  RpcFeeValues,\n  RpcLog,\n  RpcProof,\n  RpcStateMapping,\n  RpcStateOverride,\n  RpcTransaction,\n  RpcTransactionReceipt,\n  RpcTransactionRequest,\n  RpcUncle,\n  Status,\n} from './types/rpc.js'\nexport type {\n  StateMapping,\n  StateOverride,\n} from './types/stateOverride.js'\nexport type {\n  AccessList,\n  Transaction,\n  TransactionBase,\n  TransactionEIP1559,\n  TransactionEIP2930,\n  TransactionEIP4844,\n  TransactionEIP7702,\n  TransactionLegacy,\n  TransactionReceipt,\n  TransactionRequest,\n  TransactionRequestBase,\n  TransactionRequestEIP1559,\n  TransactionRequestEIP2930,\n  TransactionRequestEIP4844,\n  TransactionRequestEIP7702,\n  TransactionRequestGeneric,\n  TransactionRequestLegacy,\n  TransactionSerializable,\n  TransactionSerializableBase,\n  TransactionSerializableEIP1559,\n  TransactionSerializableEIP2930,\n  TransactionSerializableEIP4844,\n  TransactionSerializableEIP7702,\n  TransactionSerializableGeneric,\n  TransactionSerializableLegacy,\n  TransactionSerialized,\n  TransactionSerializedEIP1559,\n  TransactionSerializedEIP2930,\n  TransactionSerializedEIP4844,\n  TransactionSerializedEIP7702,\n  TransactionSerializedGeneric,\n  TransactionSerializedLegacy,\n  TransactionType,\n} from './types/transaction.js'\nexport type { GetPollOptions, GetTransportConfig } from './types/transport.js'\nexport type {\n  EIP712DomainDefinition,\n  MessageDefinition,\n  TypedDataDefinition,\n} from './types/typedData.js'\nexport type {\n  Assign,\n  Branded,\n  Evaluate,\n  ExactPartial,\n  ExactRequired,\n  IsNarrowable,\n  IsNever,\n  IsUndefined,\n  IsUnion,\n  LooseOmit,\n  MaybePartial,\n  MaybePromise,\n  MaybeRequired,\n  Mutable,\n  NoInfer,\n  NoUndefined,\n  Omit,\n  OneOf,\n  Or,\n  PartialBy,\n  Prettify,\n  RequiredBy,\n  Some,\n  UnionEvaluate,\n  UnionLooseOmit,\n  UnionOmit,\n  UnionPartialBy,\n  UnionPick,\n  UnionRequiredBy,\n  UnionToTuple,\n  ValueOf,\n} from './types/utils.js'\nexport type { Withdrawal } from './types/withdrawal.js'\nexport {\n  type DecodeAbiParametersErrorType,\n  type DecodeAbiParametersReturnType,\n  decodeAbiParameters,\n} from './utils/abi/decodeAbiParameters.js'\nexport {\n  type DecodeDeployDataErrorType,\n  type DecodeDeployDataParameters,\n  type DecodeDeployDataReturnType,\n  decodeDeployData,\n} from './utils/abi/decodeDeployData.js'\nexport {\n  type DecodeErrorResultErrorType,\n  type DecodeErrorResultParameters,\n  type DecodeErrorResultReturnType,\n  decodeErrorResult,\n} from './utils/abi/decodeErrorResult.js'\nexport {\n  type DecodeEventLogErrorType,\n  type DecodeEventLogParameters,\n  type DecodeEventLogReturnType,\n  decodeEventLog,\n} from './utils/abi/decodeEventLog.js'\nexport {\n  type DecodeFunctionDataErrorType,\n  type DecodeFunctionDataParameters,\n  type DecodeFunctionDataReturnType,\n  decodeFunctionData,\n} from './utils/abi/decodeFunctionData.js'\nexport {\n  type DecodeFunctionResultErrorType,\n  type DecodeFunctionResultParameters,\n  type DecodeFunctionResultReturnType,\n  decodeFunctionResult,\n} from './utils/abi/decodeFunctionResult.js'\nexport {\n  type EncodeAbiParametersErrorType,\n  type EncodeAbiParametersReturnType,\n  encodeAbiParameters,\n} from './utils/abi/encodeAbiParameters.js'\nexport {\n  type EncodeDeployDataErrorType,\n  type EncodeDeployDataParameters,\n  type EncodeDeployDataReturnType,\n  encodeDeployData,\n} from './utils/abi/encodeDeployData.js'\nexport {\n  type EncodeErrorResultErrorType,\n  type EncodeErrorResultParameters,\n  type EncodeErrorResultReturnType,\n  encodeErrorResult,\n} from './utils/abi/encodeErrorResult.js'\nexport {\n  type EncodeEventTopicsErrorType,\n  type EncodeEventTopicsParameters,\n  type EncodeEventTopicsReturnType,\n  encodeEventTopics,\n} from './utils/abi/encodeEventTopics.js'\nexport {\n  type EncodeFunctionDataErrorType,\n  type EncodeFunctionDataParameters,\n  type EncodeFunctionDataReturnType,\n  encodeFunctionData,\n} from './utils/abi/encodeFunctionData.js'\nexport {\n  type EncodeFunctionResultErrorType,\n  type EncodeFunctionResultParameters,\n  type EncodeFunctionResultReturnType,\n  encodeFunctionResult,\n} from './utils/abi/encodeFunctionResult.js'\nexport {\n  type EncodePackedErrorType,\n  encodePacked,\n} from './utils/abi/encodePacked.js'\nexport {\n  type GetAbiItemErrorType,\n  type GetAbiItemParameters,\n  type GetAbiItemReturnType,\n  getAbiItem,\n} from './utils/abi/getAbiItem.js'\nexport {\n  type ParseEventLogsErrorType,\n  type ParseEventLogsParameters,\n  type ParseEventLogsReturnType,\n  parseEventLogs,\n} from './utils/abi/parseEventLogs.js'\nexport {\n  type PrepareEncodeFunctionDataErrorType,\n  type PrepareEncodeFunctionDataParameters,\n  type PrepareEncodeFunctionDataReturnType,\n  prepareEncodeFunctionData,\n} from './utils/abi/prepareEncodeFunctionData.js'\nexport {\n  type ChecksumAddressErrorType,\n  checksumAddress,\n  type GetAddressErrorType,\n  getAddress,\n} from './utils/address/getAddress.js'\nexport {\n  type GetContractAddressOptions,\n  type GetCreate2AddressErrorType,\n  type GetCreate2AddressOptions,\n  type GetCreateAddressErrorType,\n  type GetCreateAddressOptions,\n  getContractAddress,\n  getCreate2Address,\n  getCreateAddress,\n} from './utils/address/getContractAddress.js'\nexport {\n  type IsAddressErrorType,\n  type IsAddressOptions,\n  isAddress,\n} from './utils/address/isAddress.js'\nexport {\n  type IsAddressEqualErrorType,\n  type IsAddressEqualReturnType,\n  isAddressEqual,\n} from './utils/address/isAddressEqual.js'\nexport {\n  type BlobsToCommitmentsErrorType,\n  type BlobsToCommitmentsParameters,\n  type BlobsToCommitmentsReturnType,\n  blobsToCommitments,\n} from './utils/blob/blobsToCommitments.js'\nexport {\n  blobsToProofs,\n  type blobsToProofsErrorType,\n  type blobsToProofsParameters,\n  type blobsToProofsReturnType,\n} from './utils/blob/blobsToProofs.js'\nexport {\n  type CommitmentsToVersionedHashesErrorType,\n  type CommitmentsToVersionedHashesParameters,\n  type CommitmentsToVersionedHashesReturnType,\n  commitmentsToVersionedHashes,\n} from './utils/blob/commitmentsToVersionedHashes.js'\nexport {\n  type CommitmentToVersionedHashErrorType,\n  type CommitmentToVersionedHashParameters,\n  type CommitmentToVersionedHashReturnType,\n  commitmentToVersionedHash,\n} from './utils/blob/commitmentToVersionedHash.js'\nexport {\n  type FromBlobsErrorType,\n  type FromBlobsParameters,\n  type FromBlobsReturnType,\n  fromBlobs,\n} from './utils/blob/fromBlobs.js'\nexport {\n  type SidecarsToVersionedHashesErrorType,\n  type SidecarsToVersionedHashesParameters,\n  type SidecarsToVersionedHashesReturnType,\n  sidecarsToVersionedHashes,\n} from './utils/blob/sidecarsToVersionedHashes.js'\nexport {\n  type ToBlobSidecarsErrorType,\n  type ToBlobSidecarsParameters,\n  type ToBlobSidecarsReturnType,\n  toBlobSidecars,\n} from './utils/blob/toBlobSidecars.js'\nexport {\n  type ToBlobsErrorType,\n  type ToBlobsParameters,\n  type ToBlobsReturnType,\n  toBlobs,\n} from './utils/blob/toBlobs.js'\nexport {\n  type CcipRequestErrorType,\n  type CcipRequestParameters,\n  ccipRequest,\n  /** @deprecated Use `ccipRequest`. */\n  ccipRequest as ccipFetch,\n  type OffchainLookupErrorType,\n  offchainLookup,\n  offchainLookupAbiItem,\n  offchainLookupSignature,\n} from './utils/ccip.js'\nexport {\n  type CcipReadTunnelParameters,\n  ccipReadTunnel,\n} from './utils/ccipTunnel.js'\nexport {\n  type AssertCurrentChainErrorType,\n  type AssertCurrentChainParameters,\n  assertCurrentChain,\n} from './utils/chain/assertCurrentChain.js'\nexport {\n  type DefineChainReturnType,\n  defineChain,\n  extendSchema,\n} from './utils/chain/defineChain.js'\nexport {\n  type ExtractChainErrorType,\n  type ExtractChainParameters,\n  type ExtractChainReturnType,\n  extractChain,\n} from './utils/chain/extractChain.js'\nexport {\n  type GetChainContractAddressErrorType,\n  getChainContractAddress,\n} from './utils/chain/getChainContractAddress.js'\nexport {\n  type ConcatBytesErrorType,\n  type ConcatErrorType,\n  type ConcatHexErrorType,\n  type ConcatReturnType,\n  concat,\n  concatBytes,\n  concatHex,\n} from './utils/data/concat.js'\nexport { type IsBytesErrorType, isBytes } from './utils/data/isBytes.js'\nexport { type IsHexErrorType, isHex } from './utils/data/isHex.js'\nexport {\n  type PadBytesErrorType,\n  type PadErrorType,\n  type PadHexErrorType,\n  type PadReturnType,\n  pad,\n  padBytes,\n  padHex,\n} from './utils/data/pad.js'\nexport { type SizeErrorType, size } from './utils/data/size.js'\nexport {\n  type SliceBytesErrorType,\n  type SliceErrorType,\n  type SliceHexErrorType,\n  slice,\n  sliceBytes,\n  sliceHex,\n} from './utils/data/slice.js'\nexport {\n  type TrimErrorType,\n  type TrimReturnType,\n  trim,\n} from './utils/data/trim.js'\nexport {\n  type BytesToBigIntErrorType,\n  type BytesToBigIntOpts,\n  type BytesToBoolErrorType,\n  type BytesToBoolOpts,\n  type BytesToNumberErrorType,\n  type BytesToNumberOpts,\n  type BytesToStringErrorType,\n  type BytesToStringOpts,\n  bytesToBigInt,\n  bytesToBool,\n  bytesToNumber,\n  bytesToString,\n  type FromBytesErrorType,\n  type FromBytesParameters,\n  fromBytes,\n} from './utils/encoding/fromBytes.js'\nexport {\n  type FromHexErrorType,\n  fromHex,\n  type HexToBigIntErrorType,\n  type HexToBoolErrorType,\n  type HexToNumberErrorType,\n  type HexToStringErrorType,\n  hexToBigInt,\n  hexToBool,\n  hexToNumber,\n  hexToString,\n} from './utils/encoding/fromHex.js'\nexport {\n  type FromRlpErrorType,\n  type FromRlpReturnType,\n  fromRlp,\n} from './utils/encoding/fromRlp.js'\nexport {\n  type BoolToBytesErrorType,\n  type BoolToBytesOpts,\n  boolToBytes,\n  type HexToBytesErrorType,\n  type HexToBytesOpts,\n  hexToBytes,\n  type NumberToBytesErrorType,\n  numberToBytes,\n  type StringToBytesErrorType,\n  type StringToBytesOpts,\n  stringToBytes,\n  type ToBytesErrorType,\n  type ToBytesParameters,\n  toBytes,\n} from './utils/encoding/toBytes.js'\nexport {\n  type BoolToHexErrorType,\n  type BoolToHexOpts,\n  type BytesToHexErrorType,\n  type BytesToHexOpts,\n  boolToHex,\n  bytesToHex,\n  type NumberToHexErrorType,\n  type NumberToHexOpts,\n  numberToHex,\n  type StringToHexErrorType,\n  type StringToHexOpts,\n  stringToHex,\n  type ToHexErrorType,\n  type ToHexParameters,\n  toHex,\n} from './utils/encoding/toHex.js'\nexport {\n  type BytesToRlpErrorType,\n  bytesToRlp,\n  type HexToRlpErrorType,\n  hexToRlp,\n  type ToRlpErrorType,\n  type ToRlpReturnType,\n  toRlp,\n} from './utils/encoding/toRlp.js'\nexport { type LabelhashErrorType, labelhash } from './utils/ens/labelhash.js'\nexport { type NamehashErrorType, namehash } from './utils/ens/namehash.js'\nexport {\n  type ToCoinTypeError,\n  toCoinType,\n} from './utils/ens/toCoinType.js'\nexport {\n  type GetContractErrorReturnType,\n  getContractError,\n} from './utils/errors/getContractError.js'\nexport {\n  type DefineBlockErrorType,\n  defineBlock,\n  type FormatBlockErrorType,\n  type FormattedBlock,\n  formatBlock,\n} from './utils/formatters/block.js'\nexport { type FormatLogErrorType, formatLog } from './utils/formatters/log.js'\nexport {\n  type DefineTransactionErrorType,\n  defineTransaction,\n  type FormatTransactionErrorType,\n  type FormattedTransaction,\n  formatTransaction,\n  transactionType,\n} from './utils/formatters/transaction.js'\nexport {\n  type DefineTransactionReceiptErrorType,\n  defineTransactionReceipt,\n  type FormatTransactionReceiptErrorType,\n  type FormattedTransactionReceipt,\n  formatTransactionReceipt,\n} from './utils/formatters/transactionReceipt.js'\nexport {\n  type DefineTransactionRequestErrorType,\n  defineTransactionRequest,\n  type ExtractFormattedTransactionRequest,\n  type FormatTransactionRequestErrorType,\n  type FormattedTransactionRequest,\n  formatTransactionRequest,\n  rpcTransactionType,\n} from './utils/formatters/transactionRequest.js'\nexport { type IsHashErrorType, isHash } from './utils/hash/isHash.js'\nexport {\n  type Keccak256ErrorType,\n  type Keccak256Hash,\n  keccak256,\n} from './utils/hash/keccak256.js'\nexport {\n  type Ripemd160ErrorType,\n  type Ripemd160Hash,\n  ripemd160,\n} from './utils/hash/ripemd160.js'\nexport {\n  type Sha256ErrorType,\n  type Sha256Hash,\n  sha256,\n} from './utils/hash/sha256.js'\nexport {\n  type ToEventHashErrorType,\n  toEventHash,\n} from './utils/hash/toEventHash.js'\nexport {\n  type ToEventSelectorErrorType,\n  /** @deprecated use `ToEventSelectorErrorType`. */\n  type ToEventSelectorErrorType as GetEventSelectorErrorType,\n  toEventSelector,\n  /** @deprecated use `toEventSelector`. */\n  toEventSelector as getEventSelector,\n} from './utils/hash/toEventSelector.js'\nexport {\n  type ToEventSignatureErrorType,\n  /** @deprecated use `ToEventSignatureErrorType`. */\n  type ToEventSignatureErrorType as GetEventSignatureErrorType,\n  toEventSignature,\n  /** @deprecated use `toEventSignature`. */\n  toEventSignature as getEventSignature,\n} from './utils/hash/toEventSignature.js'\nexport {\n  type ToFunctionHashErrorType,\n  toFunctionHash,\n} from './utils/hash/toFunctionHash.js'\nexport {\n  type ToFunctionSelectorErrorType,\n  /** @deprecated use `ToFunctionSelectorErrorType`. */\n  type ToFunctionSelectorErrorType as GetFunctionSelectorErrorType,\n  toFunctionSelector,\n  /** @deprecated use `toFunctionSelector`. */\n  toFunctionSelector as getFunctionSelector,\n} from './utils/hash/toFunctionSelector.js'\nexport {\n  type ToFunctionSignatureErrorType,\n  /** @deprecated use `ToFunctionSignatureErrorType`. */\n  type ToFunctionSignatureErrorType as GetFunctionSignatureErrorType,\n  toFunctionSignature,\n  /** @deprecated use `toFunctionSignature`. */\n  toFunctionSignature as getFunctionSignature,\n} from './utils/hash/toFunctionSignature.js'\nexport {\n  type DefineKzgErrorType,\n  type DefineKzgParameters,\n  type DefineKzgReturnType,\n  defineKzg,\n} from './utils/kzg/defineKzg.js'\nexport {\n  type SetupKzgErrorType,\n  type SetupKzgParameters,\n  type SetupKzgReturnType,\n  setupKzg,\n} from './utils/kzg/setupKzg.js'\nexport {\n  type CreateNonceManagerParameters,\n  createNonceManager,\n  type NonceManager,\n  type NonceManagerSource,\n  nonceManager,\n} from './utils/nonceManager.js'\nexport { withCache } from './utils/promise/withCache.js'\nexport {\n  type WithRetryErrorType,\n  withRetry,\n} from './utils/promise/withRetry.js'\nexport {\n  type WithTimeoutErrorType,\n  withTimeout,\n} from './utils/promise/withTimeout.js'\nexport {\n  type CompactSignatureToSignatureErrorType,\n  compactSignatureToSignature,\n} from './utils/signature/compactSignatureToSignature.js'\nexport {\n  type HashMessageErrorType,\n  hashMessage,\n} from './utils/signature/hashMessage.js'\nexport {\n  type HashDomainErrorType,\n  type HashStructErrorType,\n  type HashTypedDataErrorType,\n  type HashTypedDataParameters,\n  type HashTypedDataReturnType,\n  hashDomain,\n  hashStruct,\n  hashTypedData,\n} from './utils/signature/hashTypedData.js'\nexport {\n  type IsErc6492SignatureErrorType,\n  type IsErc6492SignatureParameters,\n  type IsErc6492SignatureReturnType,\n  isErc6492Signature,\n} from './utils/signature/isErc6492Signature.js'\nexport {\n  type IsErc8010SignatureErrorType,\n  type IsErc8010SignatureParameters,\n  type IsErc8010SignatureReturnType,\n  isErc8010Signature,\n} from './utils/signature/isErc8010Signature.js'\nexport {\n  /** @deprecated Use `ParseCompactSignatureErrorType`. */\n  type ParseCompactSignatureErrorType as HexToCompactSignatureErrorType,\n  type ParseCompactSignatureErrorType,\n  /** @deprecated Use `parseCompactSignature`. */\n  parseCompactSignature as hexToCompactSignature,\n  parseCompactSignature,\n} from './utils/signature/parseCompactSignature.js'\nexport {\n  type ParseErc6492SignatureErrorType,\n  type ParseErc6492SignatureParameters,\n  type ParseErc6492SignatureReturnType,\n  parseErc6492Signature,\n} from './utils/signature/parseErc6492Signature.js'\nexport {\n  type ParseErc8010SignatureErrorType,\n  type ParseErc8010SignatureParameters,\n  type ParseErc8010SignatureReturnType,\n  parseErc8010Signature,\n} from './utils/signature/parseErc8010Signature.js'\nexport {\n  /** @deprecated Use `ParseSignatureErrorType`. */\n  type ParseSignatureErrorType as HexToSignatureErrorType,\n  type ParseSignatureErrorType,\n  /** @deprecated Use `parseSignature`. */\n  parseSignature as hexToSignature,\n  parseSignature,\n} from './utils/signature/parseSignature.js'\nexport {\n  type RecoverAddressErrorType,\n  type RecoverAddressParameters,\n  type RecoverAddressReturnType,\n  recoverAddress,\n} from './utils/signature/recoverAddress.js'\nexport {\n  type RecoverMessageAddressErrorType,\n  type RecoverMessageAddressParameters,\n  type RecoverMessageAddressReturnType,\n  recoverMessageAddress,\n} from './utils/signature/recoverMessageAddress.js'\nexport {\n  type RecoverPublicKeyErrorType,\n  type RecoverPublicKeyParameters,\n  type RecoverPublicKeyReturnType,\n  recoverPublicKey,\n} from './utils/signature/recoverPublicKey.js'\nexport {\n  type RecoverTransactionAddressErrorType,\n  type RecoverTransactionAddressParameters,\n  type RecoverTransactionAddressReturnType,\n  recoverTransactionAddress,\n} from './utils/signature/recoverTransactionAddress.js'\nexport {\n  type RecoverTypedDataAddressErrorType,\n  type RecoverTypedDataAddressParameters,\n  type RecoverTypedDataAddressReturnType,\n  recoverTypedDataAddress,\n} from './utils/signature/recoverTypedDataAddress.js'\nexport {\n  /** @deprecated Use `SignatureToHexErrorType` instead. */\n  type SerializeCompactSignatureErrorType as CompactSignatureToHexErrorType,\n  type SerializeCompactSignatureErrorType,\n  /** @deprecated Use `serializeCompactSignature` instead. */\n  serializeCompactSignature as compactSignatureToHex,\n  serializeCompactSignature,\n} from './utils/signature/serializeCompactSignature.js'\nexport {\n  type SerializeErc6492SignatureErrorType,\n  type SerializeErc6492SignatureParameters,\n  type SerializeErc6492SignatureReturnType,\n  serializeErc6492Signature,\n} from './utils/signature/serializeErc6492Signature.js'\nexport {\n  type SerializeErc8010SignatureErrorType,\n  type SerializeErc8010SignatureParameters,\n  type SerializeErc8010SignatureReturnType,\n  serializeErc8010Signature,\n} from './utils/signature/serializeErc8010Signature.js'\nexport {\n  /** @deprecated Use `SignatureToHexErrorType` instead. */\n  type SerializeSignatureErrorType as SignatureToHexErrorType,\n  type SerializeSignatureErrorType,\n  type SerializeSignatureParameters,\n  type SerializeSignatureReturnType,\n  /** @deprecated Use `serializeSignature` instead. */\n  serializeSignature as signatureToHex,\n  serializeSignature,\n} from './utils/signature/serializeSignature.js'\nexport {\n  type SignatureToCompactSignatureErrorType,\n  signatureToCompactSignature,\n} from './utils/signature/signatureToCompactSignature.js'\nexport {\n  type ToPrefixedMessageErrorType,\n  toPrefixedMessage,\n} from './utils/signature/toPrefixedMessage.js'\nexport {\n  type VerifyHashErrorType,\n  type VerifyHashParameters,\n  type VerifyHashReturnType,\n  verifyHash,\n} from './utils/signature/verifyHash.js'\nexport {\n  type VerifyMessageErrorType,\n  type VerifyMessageParameters,\n  type VerifyMessageReturnType,\n  verifyMessage,\n} from './utils/signature/verifyMessage.js'\nexport {\n  type VerifyTypedDataErrorType,\n  type VerifyTypedDataParameters,\n  type VerifyTypedDataReturnType,\n  verifyTypedData,\n} from './utils/signature/verifyTypedData.js'\nexport { type StringifyErrorType, stringify } from './utils/stringify.js'\nexport {\n  type AssertRequestErrorType,\n  assertRequest,\n} from './utils/transaction/assertRequest.js'\nexport {\n  type AssertTransactionEIP1559ErrorType,\n  type AssertTransactionEIP2930ErrorType,\n  type AssertTransactionLegacyErrorType,\n  assertTransactionEIP1559,\n  assertTransactionEIP2930,\n  assertTransactionLegacy,\n} from './utils/transaction/assertTransaction.js'\nexport {\n  type GetSerializedTransactionType,\n  type GetSerializedTransactionTypeErrorType,\n  getSerializedTransactionType,\n} from './utils/transaction/getSerializedTransactionType.js'\nexport {\n  type GetTransactionType,\n  type GetTransactionTypeErrorType,\n  getTransactionType,\n} from './utils/transaction/getTransactionType.js'\nexport {\n  type ParseTransactionErrorType,\n  type ParseTransactionReturnType,\n  parseTransaction,\n} from './utils/transaction/parseTransaction.js'\nexport {\n  type SerializeAccessListErrorType,\n  serializeAccessList,\n} from './utils/transaction/serializeAccessList.js'\nexport {\n  type SerializedTransactionReturnType,\n  type SerializeTransactionErrorType,\n  type SerializeTransactionFn,\n  serializeTransaction,\n} from './utils/transaction/serializeTransaction.js'\nexport {\n  type DomainSeparatorErrorType,\n  domainSeparator,\n  type GetTypesForEIP712DomainErrorType,\n  getTypesForEIP712Domain,\n  type SerializeTypedDataErrorType,\n  serializeTypedData,\n  type ValidateTypedDataErrorType,\n  validateTypedData,\n} from './utils/typedData.js'\nexport {\n  type FormatEtherErrorType,\n  formatEther,\n} from './utils/unit/formatEther.js'\nexport {\n  type FormatGweiErrorType,\n  formatGwei,\n} from './utils/unit/formatGwei.js'\nexport {\n  type FormatUnitsErrorType,\n  formatUnits,\n} from './utils/unit/formatUnits.js'\nexport {\n  type ParseEtherErrorType,\n  parseEther,\n} from './utils/unit/parseEther.js'\nexport { type ParseGweiErrorType, parseGwei } from './utils/unit/parseGwei.js'\nexport {\n  type ParseUnitsErrorType,\n  parseUnits,\n} from './utils/unit/parseUnits.js'\n","import type {\n  Abi,\n  AbiEvent,\n  AbiFunction,\n  AbiParametersToPrimitiveTypes,\n  Address,\n  ExtractAbiEvent,\n  ExtractAbiEventNames,\n  ExtractAbiFunction,\n  ExtractAbiFunctionNames,\n} from 'abitype'\n\nimport type { Account } from '../accounts/types.js'\nimport type { Client } from '../clients/createClient.js'\nimport type { Transport } from '../clients/transports/createTransport.js'\nimport type { ErrorType } from '../errors/utils.js'\nimport type { Chain } from '../types/chain.js'\nimport type {\n  AbiEventParametersToPrimitiveTypes,\n  ContractEventName,\n  ContractFunctionArgs,\n  ContractFunctionName,\n  MaybeExtractEventArgsFromAbi,\n} from '../types/contract.js'\nimport type {\n  IsNarrowable,\n  IsNever,\n  IsUndefined,\n  Or,\n  Prettify,\n  UnionOmit,\n} from '../types/utils.js'\nimport { getAction } from '../utils/getAction.js'\nimport {\n  type CreateContractEventFilterParameters,\n  type CreateContractEventFilterReturnType,\n  createContractEventFilter,\n} from './public/createContractEventFilter.js'\nimport {\n  type EstimateContractGasParameters,\n  type EstimateContractGasReturnType,\n  estimateContractGas,\n} from './public/estimateContractGas.js'\nimport {\n  type GetContractEventsParameters,\n  type GetContractEventsReturnType,\n  getContractEvents,\n} from './public/getContractEvents.js'\nimport {\n  type ReadContractParameters,\n  type ReadContractReturnType,\n  readContract,\n} from './public/readContract.js'\nimport {\n  type SimulateContractParameters,\n  type SimulateContractReturnType,\n  simulateContract,\n} from './public/simulateContract.js'\nimport {\n  type WatchContractEventParameters,\n  type WatchContractEventReturnType,\n  watchContractEvent,\n} from './public/watchContractEvent.js'\nimport {\n  type WriteContractParameters,\n  type WriteContractReturnType,\n  writeContract,\n} from './wallet/writeContract.js'\n\ntype KeyedClient\u003c\n  transport extends Transport = Transport,\n  chain extends Chain | undefined = Chain | undefined,\n  account extends Account | undefined = Account | undefined,\n\u003e =\n  | {\n      public?: Client\u003ctransport, chain\u003e | undefined\n      wallet: Client\u003ctransport, chain, account\u003e\n    }\n  | {\n      public: Client\u003ctransport, chain\u003e\n      wallet?: Client\u003ctransport, chain, account\u003e | undefined\n    }\n\nexport type GetContractParameters\u003c\n  transport extends Transport = Transport,\n  chain extends Chain | undefined = Chain | undefined,\n  account extends Account | undefined = Account | undefined,\n  abi extends Abi | readonly unknown[] = Abi,\n  client extends\n    | Client\u003ctransport, chain, account\u003e\n    | KeyedClient\u003ctransport, chain, account\u003e =\n    | Client\u003ctransport, chain, account\u003e\n    | KeyedClient\u003ctransport, chain, account\u003e,\n  address extends Address = Address,\n\u003e = {\n  /** Contract ABI */\n  abi: abi\n  /** Contract address */\n  address: address\n  /** The Client.\n   *\n   * If you pass in a [`publicClient`](https://viem.sh/docs/clients/public), the following methods are available:\n   *\n   * - [`createEventFilter`](https://viem.sh/docs/contract/createContractEventFilter)\n   * - [`estimateGas`](https://viem.sh/docs/contract/estimateContractGas)\n   * - [`getEvents`](https://viem.sh/docs/contract/getContractEvents)\n   * - [`read`](https://viem.sh/docs/contract/readContract)\n   * - [`simulate`](https://viem.sh/docs/contract/simulateContract)\n   * - [`watchEvent`](https://viem.sh/docs/contract/watchContractEvent)\n   *\n   * If you pass in a [`walletClient`](https://viem.sh/docs/clients/wallet), the following methods are available:\n   *\n   * - [`estimateGas`](https://viem.sh/docs/contract/estimateContractGas)\n   * - [`write`](https://viem.sh/docs/contract/writeContract)\n   */\n  client: client\n}\n\nexport type GetContractReturnType\u003c\n  abi extends Abi | readonly unknown[] = Abi,\n  client extends Client | KeyedClient = Client | KeyedClient,\n  address extends Address = Address,\n  //\n  _eventNames extends string = abi extends Abi\n    ? Abi extends abi\n      ? string\n      : ExtractAbiEventNames\u003cabi\u003e\n    : string,\n  _readFunctionNames extends string = abi extends Abi\n    ? Abi extends abi\n      ? string\n      : ExtractAbiFunctionNames\u003cabi, 'pure' | 'view'\u003e\n    : string,\n  _writeFunctionNames extends string = abi extends Abi\n    ? Abi extends abi\n      ? string\n      : ExtractAbiFunctionNames\u003cabi, 'nonpayable' | 'payable'\u003e\n    : string,\n  _narrowable extends boolean = IsNarrowable\u003cabi, Abi\u003e,\n  _publicClient extends Client | unknown = client extends {\n    public: Client\n  }\n    ? client['public']\n    : client,\n  _walletClient extends Client | unknown = client extends {\n    wallet: Client\n  }\n    ? client['wallet']\n    : client,\n\u003e = Prettify\u003c\n  Prettify\u003c\n    (_publicClient extends Client\n      ? (IsNever\u003c_readFunctionNames\u003e extends true\n          ? unknown\n          : {\n              /**\n               * Calls a read-only function on a contract, and returns the response.\n               *\n               * A \"read-only\" function (constant function) on a Solidity contract is denoted by a `view` or `pure` keyword. They can only read the state of the contract, and cannot make any changes to it. Since read-only methods do not change the state of the contract, they do not require any gas to be executed, and can be called by any user without the need to pay for gas.\n               *\n               * Internally, `read` uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`call` action](https://viem.sh/docs/actions/public/call) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData).\n               *\n               * @example\n               * import { createPublicClient, getContract, http, parseAbi } from 'viem'\n               * import { mainnet } from 'viem/chains'\n               *\n               * const publicClient = createPublicClient({\n               *   chain: mainnet,\n               *   transport: http(),\n               * })\n               * const contract = getContract({\n               *   address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n               *   abi: parseAbi([\n               *     'function balanceOf(address owner) view returns (uint256)',\n               *   ]),\n               *   client: publicClient,\n               * })\n               * const result = await contract.read.balanceOf(['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'])\n               * // 424122n\n               */\n              read: {\n                [functionName in _readFunctionNames]: GetReadFunction\u003c\n                  _narrowable,\n                  abi,\n                  functionName extends ContractFunctionName\u003c\n                    abi,\n                    'pure' | 'view'\n                  \u003e\n                    ? functionName\n                    : never\n                \u003e\n              }\n            }) \u0026\n          (IsNever\u003c_writeFunctionNames\u003e extends true\n            ? unknown\n            : {\n                /**\n                 * Estimates the gas necessary to complete a transaction without submitting it to the network.\n                 *\n                 * @example\n                 * import { createPublicClient, getContract, http, parseAbi } from 'viem'\n                 * import { mainnet } from 'viem/chains'\n                 *\n                 * const publicClient = createPublicClient({\n                 *   chain: mainnet,\n                 *   transport: http(),\n                 * })\n                 * const contract = getContract({\n                 *   address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n                 *   abi: parseAbi(['function mint() public']),\n                 *   client: publicClient,\n                 * })\n                 * const gas = await contract.estimateGas.mint({\n                 *   account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',\n                 * })\n                 */\n                estimateGas: {\n                  [functionName in _writeFunctionNames]: GetEstimateFunction\u003c\n                    _narrowable,\n                    _publicClient['chain'],\n                    undefined,\n                    abi,\n                    functionName extends ContractFunctionName\u003c\n                      abi,\n                      'nonpayable' | 'payable'\n                    \u003e\n                      ? functionName\n                      : never\n                  \u003e\n                }\n                /**\n                 * Simulates/validates a contract interaction. This is useful for retrieving return data and revert reasons of contract write functions.\n                 *\n                 * This function does not require gas to execute and does not change the state of the blockchain. It is almost identical to [`readContract`](https://viem.sh/docs/contract/readContract), but also supports contract write functions.\n                 *\n                 * Internally, `simulate` uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`call` action](https://viem.sh/docs/actions/public/call) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData).\n                 *\n                 * @example\n                 * import { createPublicClient, getContract, http, parseAbi } from 'viem'\n                 * import { mainnet } from 'viem/chains'\n                 *\n                 * const publicClient = createPublicClient({\n                 *   chain: mainnet,\n                 *   transport: http(),\n                 * })\n                 * const contract = getContract({\n                 *   address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n                 *   abi: parseAbi(['function mint() public']),\n                 *   client: publicClient,\n                 * })\n                 * const result = await contract.simulate.mint({\n                 *   account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',\n                 * })\n                 */\n                simulate: {\n                  [functionName in _writeFunctionNames]: GetSimulateFunction\u003c\n                    _narrowable,\n                    _publicClient['chain'],\n                    _walletClient extends Client\n                      ? _walletClient['account']\n                      : _publicClient['account'],\n                    abi,\n                    functionName extends ContractFunctionName\u003c\n                      abi,\n                      'nonpayable' | 'payable'\n                    \u003e\n                      ? functionName\n                      : never\n                  \u003e\n                }\n              }) \u0026\n          (IsNever\u003c_eventNames\u003e extends true\n            ? unknown\n            : {\n                /**\n                 * Creates a Filter to retrieve event logs that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges) or [`getFilterLogs`](https://viem.sh/docs/actions/public/getFilterLogs).\n                 *\n                 * @example\n                 * import { createPublicClient, getContract, http, parseAbi } from 'viem'\n                 * import { mainnet } from 'viem/chains'\n                 *\n                 * const publicClient = createPublicClient({\n                 *   chain: mainnet,\n                 *   transport: http(),\n                 * })\n                 * const contract = getContract({\n                 *   address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n                 *   abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']),\n                 *   client: publicClient,\n                 * })\n                 * const filter = await contract.createEventFilter.Transfer()\n                 */\n                createEventFilter: {\n                  [EventName in _eventNames]: GetEventFilter\u003c\n                    _narrowable,\n                    abi,\n                    EventName extends ContractEventName\u003cabi\u003e ? EventName : never\n                  \u003e\n                }\n                /**\n                 * Creates a Filter to retrieve event logs that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges) or [`getFilterLogs`](https://viem.sh/docs/actions/public/getFilterLogs).\n                 *\n                 * @example\n                 * import { createPublicClient, getContract, http, parseAbi } from 'viem'\n                 * import { mainnet } from 'viem/chains'\n                 *\n                 * const publicClient = createPublicClient({\n                 *   chain: mainnet,\n                 *   transport: http(),\n                 * })\n                 * const contract = getContract({\n                 *   address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n                 *   abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']),\n                 *   client: publicClient,\n                 * })\n                 * const filter = await contract.createEventFilter.Transfer()\n                 */\n                getEvents: {\n                  [EventName in _eventNames]: GetEventsFunction\u003c\n                    _narrowable,\n                    abi,\n                    EventName extends ContractEventName\u003cabi\u003e ? EventName : never\n                  \u003e\n                }\n                /**\n                 * Watches and returns emitted contract event logs.\n                 *\n                 * This Action will batch up all the event logs found within the [`pollingInterval`](https://viem.sh/docs/contract/watchContractEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/contract/watchContractEvent#onLogs).\n                 *\n                 * `watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/contract/createContractEventFilter) and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. `eth_newFilter`), then `watchEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead.\n                 *\n                 * @example\n                 * import { createPublicClient, getContract, http, parseAbi } from 'viem'\n                 * import { mainnet } from 'viem/chains'\n                 *\n                 * const publicClient = createPublicClient({\n                 *   chain: mainnet,\n                 *   transport: http(),\n                 * })\n                 * const contract = getContract({\n                 *   address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n                 *   abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']),\n                 *   client: publicClient,\n                 * })\n                 * const filter = await contract.createEventFilter.Transfer()\n                 * const unwatch = contract.watchEvent.Transfer(\n                 *   { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' },\n                 *   { onLogs: (logs) =\u003e console.log(logs) },\n                 * )\n                 */\n                watchEvent: {\n                  [EventName in _eventNames]: GetWatchEvent\u003c\n                    _narrowable,\n                    abi,\n                    EventName extends ContractEventName\u003cabi\u003e ? EventName : never\n                  \u003e\n                }\n              })\n      : unknown) \u0026\n      (_walletClient extends Client\n        ? IsNever\u003c_writeFunctionNames\u003e extends true\n          ? unknown\n          : {\n              /**\n               * Estimates the gas necessary to complete a transaction without submitting it to the network.\n               *\n               * @example\n               * import { createWalletClient, getContract, http, parseAbi } from 'viem'\n               * import { mainnet } from 'viem/chains'\n               *\n               * const walletClient = createWalletClient({\n               *   chain: mainnet,\n               *   transport: http(),\n               * })\n               * const contract = getContract({\n               *   address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n               *   abi: parseAbi(['function mint() public']),\n               *   client: walletClient,\n               * })\n               * const gas = await contract.estimateGas.mint({\n               *   account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',\n               * })\n               */\n              estimateGas: {\n                [functionName in _writeFunctionNames]: GetEstimateFunction\u003c\n                  _narrowable,\n                  _walletClient['chain'],\n                  _walletClient['account'],\n                  abi,\n                  functionName extends ContractFunctionName\u003c\n                    abi,\n                    'nonpayable' | 'payable'\n                  \u003e\n                    ? functionName\n                    : never\n                \u003e\n              }\n              /**\n               * Executes a write function on a contract.\n               *\n               * A \"write\" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a [Transaction](https://viem.sh/docs/glossary/terms) is needed to be broadcast in order to change the state.\n               *\n               * Internally, `write` uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData).\n               *\n               * __Warning: The `write` internally sends a transaction – it does not validate if the contract write will succeed (the contract may throw an error). It is highly recommended to [simulate the contract write with `contract.simulate`](https://viem.sh/docs/contract/writeContract#usage) before you execute it.__\n               *\n               * @example\n               * import { createWalletClient, getContract, http, parseAbi } from 'viem'\n               * import { mainnet } from 'viem/chains'\n               *\n               * const walletClient = createWalletClient({\n               *   chain: mainnet,\n               *   transport: http(),\n               * })\n               * const contract = getContract({\n               *   address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n               *   abi: parseAbi(['function mint(uint32 tokenId) nonpayable']),\n               *   client: walletClient,\n               * })\n               * const hash = await contract.write.min([69420], {\n               *   address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n               * })\n               */\n              write: {\n                [functionName in _writeFunctionNames]: GetWriteFunction\u003c\n                  _narrowable,\n                  _walletClient['chain'],\n                  _walletClient['account'],\n                  abi,\n                  functionName extends ContractFunctionName\u003c\n                    abi,\n                    'nonpayable' | 'payable'\n                  \u003e\n                    ? functionName\n                    : never\n                \u003e\n              }\n            }\n        : unknown)\n  \u003e \u0026 { address: address; abi: abi }\n\u003e\n\nexport type GetContractErrorType = ErrorType\n\n/**\n * Gets type-safe interface for performing contract-related actions with a specific `abi` and `address`.\n *\n * - Docs https://viem.sh/docs/contract/getContract\n *\n * Using Contract Instances can make it easier to work with contracts if you don't want to pass the `abi` and `address` properties every time you perform contract actions, e.g. [`readContract`](https://viem.sh/docs/contract/readContract), [`writeContract`](https://viem.sh/docs/contract/writeContract), [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas), etc.\n *\n * @example\n * import { createPublicClient, getContract, http, parseAbi } from 'viem'\n * import { mainnet } from 'viem/chains'\n *\n * const publicClient = createPublicClient({\n *   chain: mainnet,\n *   transport: http(),\n * })\n * const contract = getContract({\n *   address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n *   abi: parseAbi([\n *     'function balanceOf(address owner) view returns (uint256)',\n *     'function ownerOf(uint256 tokenId) view returns (address)',\n *     'function totalSupply() view returns (uint256)',\n *   ]),\n *   client: publicClient,\n * })\n */\nexport function getContract\u003c\n  transport extends Transport,\n  address extends Address,\n  const abi extends Abi | readonly unknown[],\n  const client extends\n    | Client\u003ctransport, chain, account\u003e\n    | KeyedClient\u003ctransport, chain, account\u003e,\n  chain extends Chain | undefined = Chain | undefined,\n  account extends Account | undefined = Account | undefined,\n\u003e({\n  abi,\n  address,\n  client: client_,\n}: GetContractParameters\u003c\n  transport,\n  chain,\n  account,\n  abi,\n  client,\n  address\n\u003e): GetContractReturnType\u003cabi, client, address\u003e {\n  const client = client_ as\n    | Client\u003ctransport, chain, account\u003e\n    | KeyedClient\u003ctransport, chain, account\u003e\n\n  const [publicClient, walletClient] = (() =\u003e {\n    if (!client) return [undefined, undefined]\n    if ('public' in client \u0026\u0026 'wallet' in client)\n      return [client.public as Client, client.wallet as Client]\n    if ('public' in client) return [client.public as Client, undefined]\n    if ('wallet' in client) return [undefined, client.wallet as Client]\n    return [client, client]\n  })()\n\n  const hasPublicClient = publicClient !== undefined \u0026\u0026 publicClient !== null\n  const hasWalletClient = walletClient !== undefined \u0026\u0026 walletClient !== null\n\n  const contract: {\n    [_ in\n      | 'abi'\n      | 'address'\n      | 'createEventFilter'\n      | 'estimateGas'\n      | 'getEvents'\n      | 'read'\n      | 'simulate'\n      | 'watchEvent'\n      | 'write']?: unknown\n  } = {}\n\n  let hasReadFunction = false\n  let hasWriteFunction = false\n  let hasEvent = false\n  for (const item of abi as Abi) {\n    if (item.type === 'function')\n      if (item.stateMutability === 'view' || item.stateMutability === 'pure')\n        hasReadFunction = true\n      else hasWriteFunction = true\n    else if (item.type === 'event') hasEvent = true\n    // Exit early if all flags are `true`\n    if (hasReadFunction \u0026\u0026 hasWriteFunction \u0026\u0026 hasEvent) break\n  }\n\n  if (hasPublicClient) {\n    if (hasReadFunction)\n      contract.read = new Proxy(\n        {},\n        {\n          get(_, functionName: string) {\n            return (\n              ...parameters: [\n                args?: readonly unknown[] | undefined,\n                options?: UnionOmit\u003c\n                  ReadContractParameters,\n                  'abi' | 'address' | 'functionName' | 'args'\n                \u003e,\n              ]\n            ) =\u003e {\n              const { args, options } = getFunctionParameters(parameters)\n              return getAction(\n                publicClient,\n                readContract,\n                'readContract',\n              )({\n                abi,\n                address,\n                functionName,\n                args,\n                ...options,\n              } as ReadContractParameters)\n            }\n          },\n        },\n      )\n\n    if (hasWriteFunction)\n      contract.simulate = new Proxy(\n        {},\n        {\n          get(_, functionName: string) {\n            return (\n              ...parameters: [\n                args?: readonly unknown[],\n                options?: UnionOmit\u003c\n                  SimulateContractParameters,\n                  'abi' | 'address' | 'functionName' | 'args'\n                \u003e,\n              ]\n            ) =\u003e {\n              const { args, options } = getFunctionParameters(parameters)\n              return getAction(\n                publicClient,\n                simulateContract,\n                'simulateContract',\n              )({\n                abi,\n                address,\n                functionName,\n                args,\n                ...options,\n              } as SimulateContractParameters)\n            }\n          },\n        },\n      )\n\n    if (hasEvent) {\n      contract.createEventFilter = new Proxy(\n        {},\n        {\n          get(_, eventName: string) {\n            return (\n              ...parameters: [\n                args?: readonly unknown[] | object,\n                options?: Omit\u003c\n                  CreateContractEventFilterParameters,\n                  'abi' | 'address' | 'eventName' | 'args'\n                \u003e,\n              ]\n            ) =\u003e {\n              const abiEvent = (abi as readonly AbiEvent[]).find(\n                (x: AbiEvent) =\u003e x.type === 'event' \u0026\u0026 x.name === eventName,\n              )\n              const { args, options } = getEventParameters(\n                parameters,\n                abiEvent!,\n              )\n              return getAction(\n                publicClient,\n                createContractEventFilter,\n                'createContractEventFilter',\n              )({\n                abi,\n                address,\n                eventName,\n                args,\n                ...options,\n              } as CreateContractEventFilterParameters)\n            }\n          },\n        },\n      )\n      contract.getEvents = new Proxy(\n        {},\n        {\n          get(_, eventName: string) {\n            return (\n              ...parameters: [\n                args?: readonly unknown[] | object,\n                options?: Omit\u003c\n                  GetContractEventsParameters,\n                  'abi' | 'address' | 'eventName'\n                \u003e,\n              ]\n            ) =\u003e {\n              const abiEvent = (abi as readonly AbiEvent[]).find(\n                (x: AbiEvent) =\u003e x.type === 'event' \u0026\u0026 x.name === eventName,\n              )\n              const { args, options } = getEventParameters(\n                parameters,\n                abiEvent!,\n              )\n              return getAction(\n                publicClient,\n                getContractEvents,\n                'getContractEvents',\n              )({\n                abi,\n                address,\n                eventName,\n                args,\n                ...options,\n              } as unknown as GetContractEventsParameters)\n            }\n          },\n        },\n      )\n      contract.watchEvent = new Proxy(\n        {},\n        {\n          get(_, eventName: string) {\n            return (\n              ...parameters: [\n                args?: readonly unknown[] | object,\n                options?: Omit\u003c\n                  WatchContractEventParameters,\n                  'abi' | 'address' | 'eventName'\n                \u003e,\n              ]\n            ) =\u003e {\n              const abiEvent = (abi as readonly AbiEvent[]).find(\n                (x: AbiEvent) =\u003e x.type === 'event' \u0026\u0026 x.name === eventName,\n              )\n              const { args, options } = getEventParameters(\n                parameters,\n                abiEvent!,\n              )\n              return getAction(\n                publicClient,\n                watchContractEvent,\n                'watchContractEvent',\n              )({\n                abi,\n                address,\n                eventName,\n                args,\n                ...options,\n              } as unknown as WatchContractEventParameters)\n            }\n          },\n        },\n      )\n    }\n  }\n\n  if (hasWalletClient) {\n    if (hasWriteFunction)\n      contract.write = new Proxy(\n        {},\n        {\n          get(_, functionName: string) {\n            return (\n              ...parameters: [\n                args?: readonly unknown[],\n                options?: UnionOmit\u003c\n                  WriteContractParameters,\n                  'abi' | 'address' | 'functionName' | 'args'\n                \u003e,\n              ]\n            ) =\u003e {\n              const { args, options } = getFunctionParameters(parameters)\n              return getAction(\n                walletClient,\n                writeContract,\n                'writeContract',\n              )({\n                abi,\n                address,\n                functionName,\n                args,\n                ...(options as any),\n              })\n            }\n          },\n        },\n      )\n  }\n\n  if (hasPublicClient || hasWalletClient)\n    if (hasWriteFunction)\n      contract.estimateGas = new Proxy(\n        {},\n        {\n          get(_, functionName: string) {\n            return (\n              ...parameters: [\n                args?: readonly unknown[],\n                options?: UnionOmit\u003c\n                  EstimateContractGasParameters,\n                  'abi' | 'address' | 'functionName' | 'args'\n                \u003e,\n              ]\n            ) =\u003e {\n              const { args, options } = getFunctionParameters(parameters)\n              const client = (publicClient ?? walletClient)!\n              return getAction(\n                client,\n                estimateContractGas,\n                'estimateContractGas',\n              )({\n                abi,\n                address,\n                functionName,\n                args,\n                ...options,\n                account:\n                  (options as EstimateContractGasParameters).account ??\n                  (walletClient as unknown as Client).account,\n              } as any)\n            }\n          },\n        },\n      )\n  contract.address = address\n  contract.abi = abi\n\n  return contract as unknown as GetContractReturnType\u003cabi, client, address\u003e\n}\n\n/**\n * @internal exporting for testing only\n */\nexport function getFunctionParameters(\n  values: [args?: readonly unknown[] | undefined, options?: object | undefined],\n) {\n  const hasArgs = values.length \u0026\u0026 Array.isArray(values[0])\n  const args = hasArgs ? values[0]! : []\n  const options = (hasArgs ? values[1] : values[0]) ?? {}\n  return { args, options }\n}\n\n/**\n * @internal exporting for testing only\n */\nexport function getEventParameters(\n  values: [args?: object | unknown[], options?: object],\n  abiEvent: AbiEvent,\n) {\n  let hasArgs = false\n  // If first item is array, must be `args`\n  if (Array.isArray(values[0])) hasArgs = true\n  // Check if first item is `args` or `options`\n  else if (values.length === 1) {\n    // if event has indexed inputs, must have `args`\n    hasArgs = abiEvent.inputs.some((x) =\u003e x.indexed)\n    // If there are two items in array, must have `args`\n  } else if (values.length === 2) {\n    hasArgs = true\n  }\n\n  const args = hasArgs ? values[0]! : undefined\n  const options = (hasArgs ? values[1] : values[0]) ?? {}\n  return { args, options }\n}\n\ntype GetReadFunction\u003c\n  narrowable extends boolean,\n  abi extends Abi | readonly unknown[],\n  functionName extends ContractFunctionName\u003cabi, 'pure' | 'view'\u003e,\n  args extends ContractFunctionArgs\u003c\n    abi,\n    'pure' | 'view',\n    functionName\n  \u003e = ContractFunctionArgs\u003cabi, 'pure' | 'view', functionName\u003e,\n  abiFunction extends AbiFunction = abi extends Abi\n    ? ExtractAbiFunction\u003cabi, functionName\u003e\n    : AbiFunction,\n  //\n  _args = AbiParametersToPrimitiveTypes\u003cabiFunction['inputs'], 'inputs', true\u003e,\n  _options = Prettify\u003c\n    UnionOmit\u003c\n      ReadContractParameters\u003cabi, functionName, args\u003e,\n      'abi' | 'address' | 'args' | 'functionName'\n    \u003e\n  \u003e,\n\u003e = narrowable extends true\n  ? (\n      ...parameters: _args extends readonly []\n        ? [options?: _options]\n        : [args: _args, options?: _options]\n    ) =\u003e Promise\u003cReadContractReturnType\u003cabi, functionName, args\u003e\u003e\n  : (\n      ...parameters:\n        | [options?: _options]\n        | [args: readonly unknown[], options?: _options]\n    ) =\u003e Promise\u003cReadContractReturnType\u003e\n\ntype GetEstimateFunction\u003c\n  narrowable extends boolean,\n  chain extends Chain | undefined,\n  account extends Account | undefined,\n  abi extends Abi | readonly unknown[],\n  functionName extends ContractFunctionName\u003cabi, 'nonpayable' | 'payable'\u003e,\n  args extends ContractFunctionArgs\u003c\n    abi,\n    'nonpayable' | 'payable',\n    functionName\n  \u003e = ContractFunctionArgs\u003cabi, 'nonpayable' | 'payable', functionName\u003e,\n  abiFunction extends AbiFunction = abi extends Abi\n    ? ExtractAbiFunction\u003cabi, functionName\u003e\n    : AbiFunction,\n  //\n  _args = AbiParametersToPrimitiveTypes\u003cabiFunction['inputs'], 'inputs', true\u003e,\n  _options = Prettify\u003c\n    UnionOmit\u003c\n      EstimateContractGasParameters\u003cabi, functionName, args, chain\u003e,\n      'abi' | 'address' | 'args' | 'functionName'\n    \u003e\n  \u003e,\n  // For making `options` parameter required if `account`\n  IsOptionsRequired = IsUndefined\u003caccount\u003e,\n\u003e = narrowable extends true\n  ? (\n      ...parameters: _args extends readonly []\n        ? IsOptionsRequired extends true\n          ? [options: _options]\n          : [options?: _options]\n        : [\n            args: _args,\n            ...parameters: IsOptionsRequired extends true\n              ? [options: _options]\n              : [options?: _options],\n          ]\n    ) =\u003e Promise\u003cEstimateContractGasReturnType\u003e\n  : (\n      ...parameters:\n        | (IsOptionsRequired extends true\n            ? [options: _options]\n            : [options?: _options])\n        | [\n            args: readonly unknown[],\n            ...parameters: IsOptionsRequired extends true\n              ? [options: _options]\n              : [options?: _options],\n          ]\n    ) =\u003e Promise\u003cEstimateContractGasReturnType\u003e\n\ntype GetSimulateFunction\u003c\n  narrowable extends boolean,\n  chain extends Chain | undefined,\n  account extends Account | undefined,\n  abi extends Abi | readonly unknown[],\n  functionName extends ContractFunctionName\u003cabi, 'nonpayable' | 'payable'\u003e,\n  args extends ContractFunctionArgs\u003c\n    abi,\n    'nonpayable' | 'payable',\n    functionName\n  \u003e = ContractFunctionArgs\u003cabi, 'nonpayable' | 'payable', functionName\u003e,\n  abiFunction extends AbiFunction = abi extends Abi\n    ? ExtractAbiFunction\u003cabi, functionName\u003e\n    : AbiFunction,\n  //\n  _args = AbiParametersToPrimitiveTypes\u003cabiFunction['inputs'], 'inputs', true\u003e,\n\u003e = narrowable extends true\n  ? \u003c\n      chainOverride extends Chain | undefined = undefined,\n      accountOverride extends Account | Address | undefined = undefined,\n    \u003e(\n      ...parameters: _args extends readonly []\n        ? [\n            options?: Omit\u003c\n              SimulateContractParameters\u003c\n                abi,\n                functionName,\n                args,\n                chain,\n                chainOverride,\n                accountOverride\n              \u003e,\n              'abi' | 'address' | 'args' | 'functionName'\n            \u003e,\n          ]\n        : [\n            args: _args,\n            options?: Omit\u003c\n              SimulateContractParameters\u003c\n                abi,\n                functionName,\n                args,\n                chain,\n                chainOverride,\n                accountOverride\n              \u003e,\n              'abi' | 'address' | 'args' | 'functionName'\n            \u003e,\n          ]\n    ) =\u003e Promise\u003c\n      SimulateContractReturnType\u003c\n        abi,\n        functionName,\n        args,\n        chain,\n        account,\n        chainOverride,\n        accountOverride\n      \u003e\n    \u003e\n  : \u003c\n      chainOverride extends Chain | undefined = undefined,\n      accountOverride extends Account | Address | undefined = undefined,\n    \u003e(\n      ...parameters:\n        | [\n            options?: Omit\u003c\n              SimulateContractParameters\u003c\n                abi,\n                functionName,\n                args,\n                chain,\n                chainOverride,\n                accountOverride\n              \u003e,\n              'abi' | 'address' | 'args' | 'functionName'\n            \u003e,\n          ]\n        | [\n            args: readonly unknown[],\n            options?: Omit\u003c\n              SimulateContractParameters\u003c\n                abi,\n                functionName,\n                args,\n                chain,\n                chainOverride,\n                accountOverride\n              \u003e,\n              'abi' | 'address' | 'args' | 'functionName'\n            \u003e,\n          ]\n    ) =\u003e Promise\u003cSimulateContractReturnType\u003e\n\ntype GetWriteFunction\u003c\n  narrowable extends boolean,\n  chain extends Chain | undefined,\n  account extends Account | undefined,\n  abi extends Abi | readonly unknown[],\n  functionName extends ContractFunctionName\u003cabi, 'nonpayable' | 'payable'\u003e,\n  args extends ContractFunctionArgs\u003c\n    abi,\n    'nonpayable' | 'payable',\n    functionName\n  \u003e = ContractFunctionArgs\u003cabi, 'nonpayable' | 'payable', functionName\u003e,\n  abiFunction extends AbiFunction = abi extends Abi\n    ? ExtractAbiFunction\u003cabi, functionName\u003e\n    : AbiFunction,\n  //\n  _args = AbiParametersToPrimitiveTypes\u003cabiFunction['inputs'], 'inputs', true\u003e,\n  // For making `options` parameter required if `account` or `chain` is undefined\n  _isOptionsRequired = Or\u003c[IsUndefined\u003caccount\u003e, IsUndefined\u003cchain\u003e]\u003e,\n\u003e = narrowable extends true\n  ? \u003c\n      chainOverride extends Chain | undefined,\n      options extends Prettify\u003c\n        UnionOmit\u003c\n          WriteContractParameters\u003c\n            abi,\n            functionName,\n            args,\n            chain,\n            account,\n            chainOverride\n          \u003e,\n          'abi' | 'address' | 'args' | 'functionName'\n        \u003e\n      \u003e,\n    \u003e(\n      ...parameters: _args extends readonly []\n        ? _isOptionsRequired extends true\n          ? [options: options]\n          : [options?: options]\n        : [\n            args: _args,\n            ...parameters: _isOptionsRequired extends true\n              ? [options: options]\n              : [options?: options],\n          ]\n    ) =\u003e Promise\u003cWriteContractReturnType\u003e\n  : \u003c\n      chainOverride extends Chain | undefined,\n      options extends Prettify\u003c\n        UnionOmit\u003c\n          WriteContractParameters\u003c\n            abi,\n            functionName,\n            args,\n            chain,\n            account,\n            chainOverride\n          \u003e,\n          'abi' | 'address' | 'args' | 'functionName'\n        \u003e\n      \u003e,\n      Rest extends unknown[] = _isOptionsRequired extends true\n        ? [options: options]\n        : [options?: options],\n    \u003e(\n      ...parameters: Rest | [args: readonly unknown[], ...parameters: Rest]\n    ) =\u003e Promise\u003cWriteContractReturnType\u003e\n\ntype GetEventFilter\u003c\n  narrowable extends boolean,\n  abi extends Abi | readonly unknown[],\n  eventName extends ContractEventName\u003cabi\u003e,\n  abiEvent extends AbiEvent = abi extends Abi\n    ? ExtractAbiEvent\u003cabi, eventName\u003e\n    : AbiEvent,\n  //\n  _args = AbiEventParametersToPrimitiveTypes\u003cabiEvent['inputs']\u003e,\n  _options = Prettify\u003c\n    Omit\u003c\n      CreateContractEventFilterParameters\u003cabi, eventName\u003e,\n      'abi' | 'address' | 'args' | 'eventName' | 'strict'\n    \u003e\n  \u003e,\n  IndexedInputs = Extract\u003cabiEvent['inputs'][number], { indexed: true }\u003e,\n\u003e = narrowable extends true\n  ? \u003c\n      const args extends\n        | MaybeExtractEventArgsFromAbi\u003cabi, eventName\u003e\n        | undefined,\n      strict extends boolean | undefined = undefined,\n    \u003e(\n      ...parameters: IsNever\u003cIndexedInputs\u003e extends true\n        ? [options?: _options \u0026 { strict?: strict }]\n        : [\n            args: _args | (_args extends args ? Readonly\u003cargs\u003e : never),\n            options?: _options \u0026 { strict?: strict },\n          ]\n    ) =\u003e Promise\u003c\n      CreateContractEventFilterReturnType\u003cabi, eventName, args, strict\u003e\n    \u003e\n  : \u003cstrict extends boolean | undefined = undefined\u003e(\n      ...parameters:\n        | [options?: _options \u0026 { strict?: strict }]\n        | [\n            args: readonly unknown[] | CreateContractFilterOptions,\n            options?: _options \u0026 { strict?: strict },\n          ]\n    ) =\u003e Promise\u003cCreateContractEventFilterReturnType\u003e\n\ntype GetEventsFunction\u003c\n  narrowable extends boolean,\n  abi extends Abi | readonly unknown[],\n  eventName extends ContractEventName\u003cabi\u003e,\n  abiEvent extends AbiEvent = abi extends Abi\n    ? ExtractAbiEvent\u003cabi, eventName\u003e\n    : AbiEvent,\n  //\n  _args = AbiEventParametersToPrimitiveTypes\u003cabiEvent['inputs']\u003e,\n  _options = Prettify\u003c\n    Omit\u003c\n      GetContractEventsParameters\u003cabi, eventName\u003e,\n      'abi' | 'address' | 'args' | 'eventName'\n    \u003e\n  \u003e,\n  IndexedInputs = Extract\u003cabiEvent['inputs'][number], { indexed: true }\u003e,\n\u003e = narrowable extends true\n  ? (\n      ...parameters: IsNever\u003cIndexedInputs\u003e extends true\n        ? [options?: _options]\n        : [args?: _args, options?: _options]\n    ) =\u003e Promise\u003cGetContractEventsReturnType\u003cabi, eventName\u003e\u003e\n  : (\n      ...parameters:\n        | [options?: _options]\n        | [\n            args?: readonly unknown[] | WatchContractEventOptions,\n            options?: _options,\n          ]\n    ) =\u003e Promise\u003cGetContractEventsReturnType\u003cabi, eventName\u003e\u003e\n\ntype GetWatchEvent\u003c\n  narrowable extends boolean,\n  abi extends Abi | readonly unknown[],\n  eventName extends ContractEventName\u003cabi\u003e,\n  abiEvent extends AbiEvent = abi extends Abi\n    ? ExtractAbiEvent\u003cabi, eventName\u003e\n    : AbiEvent,\n  //\n  _args = AbiEventParametersToPrimitiveTypes\u003cabiEvent['inputs']\u003e,\n  _options = Prettify\u003c\n    Omit\u003c\n      WatchContractEventParameters\u003cabi, eventName\u003e,\n      'abi' | 'address' | 'args' | 'eventName'\n    \u003e\n  \u003e,\n  _indexedInputs = Extract\u003cabiEvent['inputs'][number], { indexed: true }\u003e,\n\u003e = narrowable extends true\n  ? (\n      ...parameters: IsNever\u003c_indexedInputs\u003e extends true\n        ? [options: _options]\n        : [args: _args, options: _options]\n    ) =\u003e WatchContractEventReturnType\n  : (\n      ...parameters:\n        | [options?: _options]\n        | [\n            args: readonly unknown[] | WatchContractEventOptions,\n            options?: _options,\n          ]\n    ) =\u003e WatchContractEventReturnType\n\ntype CreateContractFilterOptions =\n  RemoveProperties\u003cCreateContractEventFilterParameters\u003e\ntype WatchContractEventOptions = RemoveProperties\u003cWatchContractEventParameters\u003e\n\ntype RemoveProperties\u003cT extends object\u003e = Prettify\u003c\n  {\n    [key: string]: unknown\n  } \u0026 {\n    [_ in keyof T]?: never\n  }\n\u003e\n","import type { Address } from 'abitype'\nimport type { ErrorType } from '../errors/utils.js'\nimport type { Account, ParseAccount } from '../types/account.js'\nimport type { Chain } from '../types/chain.js'\nimport type { PublicRpcSchema, RpcSchema } from '../types/eip1193.js'\nimport type { Prettify } from '../types/utils.js'\nimport {\n  type Client,\n  type ClientConfig,\n  type CreateClientErrorType,\n  createClient,\n} from './createClient.js'\nimport { type PublicActions, publicActions } from './decorators/public.js'\nimport type { Transport } from './transports/createTransport.js'\n\nexport type PublicClientConfig\u003c\n  transport extends Transport = Transport,\n  chain extends Chain | undefined = Chain | undefined,\n  accountOrAddress extends Account | Address | undefined = undefined,\n  rpcSchema extends RpcSchema | undefined = undefined,\n\u003e = Prettify\u003c\n  Pick\u003c\n    ClientConfig\u003ctransport, chain, accountOrAddress, rpcSchema\u003e,\n    | 'batch'\n    | 'cacheTime'\n    | 'ccipRead'\n    | 'chain'\n    | 'experimental_blockTag'\n    | 'key'\n    | 'name'\n    | 'pollingInterval'\n    | 'rpcSchema'\n    | 'transport'\n  \u003e\n\u003e\n\nexport type PublicClient\u003c\n  transport extends Transport = Transport,\n  chain extends Chain | undefined = Chain | undefined,\n  accountOrAddress extends Account | undefined = undefined,\n  rpcSchema extends RpcSchema | undefined = undefined,\n\u003e = Prettify\u003c\n  Client\u003c\n    transport,\n    chain,\n    accountOrAddress,\n    rpcSchema extends RpcSchema\n      ? [...PublicRpcSchema, ...rpcSchema]\n      : PublicRpcSchema,\n    PublicActions\u003ctransport, chain\u003e\n  \u003e\n\u003e\n\nexport type CreatePublicClientErrorType = CreateClientErrorType | ErrorType\n\n/**\n * Creates a Public Client with a given [Transport](https://viem.sh/docs/clients/intro) configured for a [Chain](https://viem.sh/docs/clients/chains).\n *\n * - Docs: https://viem.sh/docs/clients/public\n *\n * A Public Client is an interface to \"public\" [JSON-RPC API](https://ethereum.org/en/developers/docs/apis/json-rpc/) methods such as retrieving block numbers, transactions, reading from smart contracts, etc through [Public Actions](/docs/actions/public/introduction).\n *\n * @param config - {@link PublicClientConfig}\n * @returns A Public Client. {@link PublicClient}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n *\n * const client = createPublicClient({\n *   chain: mainnet,\n *   transport: http(),\n * })\n */\nexport function createPublicClient\u003c\n  transport extends Transport,\n  chain extends Chain | undefined = undefined,\n  accountOrAddress extends Account | Address | undefined = undefined,\n  rpcSchema extends RpcSchema | undefined = undefined,\n\u003e(\n  parameters: PublicClientConfig\u003ctransport, chain, accountOrAddress, rpcSchema\u003e,\n): PublicClient\u003ctransport, chain, ParseAccount\u003caccountOrAddress\u003e, rpcSchema\u003e {\n  const { key = 'public', name = 'Public Client' } = parameters\n  const client = createClient({\n    ...parameters,\n    key,\n    name,\n    type: 'publicClient',\n  })\n  return client.extend(publicActions) as any\n}\n","import type { Address } from 'abitype'\n\nimport type { Account } from '../accounts/types.js'\nimport type { ErrorType } from '../errors/utils.js'\nimport type { ParseAccount } from '../types/account.js'\nimport type { Chain } from '../types/chain.js'\nimport type { RpcSchema, TestRpcSchema } from '../types/eip1193.js'\nimport type { Prettify } from '../types/utils.js'\nimport {\n  type Client,\n  type ClientConfig,\n  type CreateClientErrorType,\n  createClient,\n} from './createClient.js'\nimport { type TestActions, testActions } from './decorators/test.js'\nimport type { Transport } from './transports/createTransport.js'\n\nexport type TestClientMode = 'anvil' | 'hardhat' | 'ganache'\n\nexport type TestClientConfig\u003c\n  mode extends TestClientMode = TestClientMode,\n  transport extends Transport = Transport,\n  chain extends Chain | undefined = Chain | undefined,\n  accountOrAddress extends Account | Address | undefined =\n    | Account\n    | Address\n    | undefined,\n  rpcSchema extends RpcSchema | undefined = undefined,\n\u003e = Prettify\u003c\n  Pick\u003c\n    ClientConfig\u003ctransport, chain, accountOrAddress, rpcSchema\u003e,\n    | 'account'\n    | 'cacheTime'\n    | 'chain'\n    | 'key'\n    | 'name'\n    | 'pollingInterval'\n    | 'rpcSchema'\n    | 'transport'\n  \u003e \u0026 {\n    /** Mode of the test client. */\n    mode: mode | ('anvil' | 'hardhat' | 'ganache') // TODO: Type utility that expands `TestClientMode`\n  }\n\u003e\n\nexport type TestClient\u003c\n  mode extends TestClientMode = TestClientMode,\n  transport extends Transport = Transport,\n  chain extends Chain | undefined = Chain | undefined,\n  account extends Account | undefined = Account | undefined,\n  includeActions extends boolean = true,\n  rpcSchema extends RpcSchema | undefined = undefined,\n\u003e = Prettify\u003c\n  { mode: mode } \u0026 Client\u003c\n    transport,\n    chain,\n    account,\n    rpcSchema extends RpcSchema\n      ? [...TestRpcSchema\u003cmode\u003e, ...rpcSchema]\n      : TestRpcSchema\u003cmode\u003e,\n    { mode: mode } \u0026 (includeActions extends true\n      ? TestActions\n      : Record\u003cstring, unknown\u003e)\n  \u003e\n\u003e\n\nexport type CreateTestClientErrorType = CreateClientErrorType | ErrorType\n\n/**\n * @description Creates a test client with a given transport.\n */\n/**\n * Creates a Test Client with a given [Transport](https://viem.sh/docs/clients/intro) configured for a [Chain](https://viem.sh/docs/clients/chains).\n *\n * - Docs: https://viem.sh/docs/clients/test\n *\n * A Test Client is an interface to \"test\" JSON-RPC API methods accessible through a local Ethereum test node such as [Anvil](https://book.getfoundry.sh/anvil/) or [Hardhat](https://hardhat.org/) such as mining blocks, impersonating accounts, setting fees, etc through [Test Actions](https://viem.sh/docs/actions/test/introduction).\n *\n * @param config - {@link TestClientConfig}\n * @returns A Test Client. {@link TestClient}\n *\n * @example\n * import { createTestClient, custom } from 'viem'\n * import { foundry } from 'viem/chains'\n *\n * const client = createTestClient({\n *   mode: 'anvil',\n *   chain: foundry,\n *   transport: http(),\n * })\n */\nexport function createTestClient\u003c\n  mode extends 'anvil' | 'hardhat' | 'ganache', // TODO: Type utility that expands `TestClientMode`\n  transport extends Transport,\n  chain extends Chain | undefined = undefined,\n  accountOrAddress extends Account | Address | undefined = undefined,\n  rpcSchema extends RpcSchema | undefined = undefined,\n\u003e(\n  parameters: TestClientConfig\u003c\n    mode,\n    transport,\n    chain,\n    accountOrAddress,\n    rpcSchema\n  \u003e,\n): TestClient\u003c\n  mode,\n  transport,\n  chain,\n  ParseAccount\u003caccountOrAddress\u003e,\n  true,\n  rpcSchema\n\u003e\n\nexport function createTestClient(parameters: TestClientConfig): TestClient {\n  const { key = 'test', name = 'Test Client', mode } = parameters\n  const client = createClient({\n    ...parameters,\n    key,\n    name,\n    type: 'testClient',\n  })\n  return client.extend((config) =\u003e ({\n    mode,\n    ...testActions({ mode })(config),\n  }))\n}\n","import {\n  type DropTransactionParameters,\n  dropTransaction,\n} from '../../actions/test/dropTransaction.js'\nimport {\n  type DumpStateReturnType,\n  dumpState,\n} from '../../actions/test/dumpState.js'\nimport {\n  type GetAutomineReturnType,\n  getAutomine,\n} from '../../actions/test/getAutomine.js'\nimport {\n  type GetTxpoolContentReturnType,\n  getTxpoolContent,\n} from '../../actions/test/getTxpoolContent.js'\nimport {\n  type GetTxpoolStatusReturnType,\n  getTxpoolStatus,\n} from '../../actions/test/getTxpoolStatus.js'\nimport {\n  type ImpersonateAccountParameters,\n  impersonateAccount,\n} from '../../actions/test/impersonateAccount.js'\nimport {\n  type IncreaseTimeParameters,\n  increaseTime,\n} from '../../actions/test/increaseTime.js'\nimport {\n  type InspectTxpoolReturnType,\n  inspectTxpool,\n} from '../../actions/test/inspectTxpool.js'\nimport {\n  type LoadStateParameters,\n  type LoadStateReturnType,\n  loadState,\n} from '../../actions/test/loadState.js'\nimport { type MineParameters, mine } from '../../actions/test/mine.js'\nimport { removeBlockTimestampInterval } from '../../actions/test/removeBlockTimestampInterval.js'\nimport { type ResetParameters, reset } from '../../actions/test/reset.js'\nimport { type RevertParameters, revert } from '../../actions/test/revert.js'\nimport {\n  type SendUnsignedTransactionParameters,\n  type SendUnsignedTransactionReturnType,\n  sendUnsignedTransaction,\n} from '../../actions/test/sendUnsignedTransaction.js'\nimport { setAutomine } from '../../actions/test/setAutomine.js'\nimport {\n  type SetBalanceParameters,\n  setBalance,\n} from '../../actions/test/setBalance.js'\nimport {\n  type SetBlockGasLimitParameters,\n  setBlockGasLimit,\n} from '../../actions/test/setBlockGasLimit.js'\nimport {\n  type SetBlockTimestampIntervalParameters,\n  setBlockTimestampInterval,\n} from '../../actions/test/setBlockTimestampInterval.js'\nimport { type SetCodeParameters, setCode } from '../../actions/test/setCode.js'\nimport {\n  type SetCoinbaseParameters,\n  setCoinbase,\n} from '../../actions/test/setCoinbase.js'\nimport {\n  type SetIntervalMiningParameters,\n  setIntervalMining,\n} from '../../actions/test/setIntervalMining.js'\nimport { setLoggingEnabled } from '../../actions/test/setLoggingEnabled.js'\nimport {\n  type SetMinGasPriceParameters,\n  setMinGasPrice,\n} from '../../actions/test/setMinGasPrice.js'\nimport {\n  type SetNextBlockBaseFeePerGasParameters,\n  setNextBlockBaseFeePerGas,\n} from '../../actions/test/setNextBlockBaseFeePerGas.js'\nimport {\n  type SetNextBlockTimestampParameters,\n  setNextBlockTimestamp,\n} from '../../actions/test/setNextBlockTimestamp.js'\nimport {\n  type SetNonceParameters,\n  setNonce,\n} from '../../actions/test/setNonce.js'\nimport { setRpcUrl } from '../../actions/test/setRpcUrl.js'\nimport {\n  type SetStorageAtParameters,\n  setStorageAt,\n} from '../../actions/test/setStorageAt.js'\nimport { snapshot } from '../../actions/test/snapshot.js'\nimport {\n  type StopImpersonatingAccountParameters,\n  stopImpersonatingAccount,\n} from '../../actions/test/stopImpersonatingAccount.js'\nimport type { Account } from '../../types/account.js'\nimport type { Chain } from '../../types/chain.js'\nimport type { Quantity } from '../../types/rpc.js'\nimport type { Client } from '../createClient.js'\nimport type { TestClientMode } from '../createTestClient.js'\nimport type { Transport } from '../transports/createTransport.js'\n\nexport type TestActions = {\n  /**\n   * Removes a transaction from the mempool.\n   *\n   * - Docs: https://viem.sh/docs/actions/test/dropTransaction\n   *\n   * @param args - {@link DropTransactionParameters}\n   *\n   * @example\n   * import { createTestClient, http } from 'viem'\n   * import { foundry } from 'viem/chains'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * await client.dropTransaction({\n   *   hash: '0xe58dceb6b20b03965bb678e27d141e151d7d4efc2334c2d6a49b9fac523f7364'\n   * })\n   */\n  dropTransaction: (args: DropTransactionParameters) =\u003e Promise\u003cvoid\u003e\n  /**\n   * Serializes the current state (including contracts code, contract's storage,\n   * accounts properties, etc.) into a savable data blob.\n   *\n   * - Docs: https://viem.sh/docs/actions/test/dumpState\n   *\n   * @param client - Client to use\n   *\n   * @example\n   * import { createTestClient, http } from 'viem'\n   * import { foundry } from 'viem/chains'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * await client.dumpState()\n   */\n  dumpState: () =\u003e Promise\u003cDumpStateReturnType\u003e\n  /**\n   * Returns the automatic mining status of the node.\n   *\n   * - Docs: https://viem.sh/docs/actions/test/getAutomine\n   *\n   * @returns Whether or not the node is auto mining. {@link GetAutomineReturnType}\n   *\n   * @example\n   * import { createTestClient, http } from 'viem'\n   * import { foundry } from 'viem/chains'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * const isAutomining = await client.getAutomine()\n   */\n  getAutomine: () =\u003e Promise\u003cGetAutomineReturnType\u003e\n  /**\n   * Returns the details of all transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only.\n   *\n   * - Docs: https://viem.sh/docs/actions/test/getTxpoolContent\n   *\n   * @returns Transaction pool content. {@link GetTxpoolContentReturnType}\n   *\n   * @example\n   * import { createTestClient, http } from 'viem'\n   * import { foundry } from 'viem/chains'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * const content = await client.getTxpoolContent()\n   */\n  getTxpoolContent: () =\u003e Promise\u003cGetTxpoolContentReturnType\u003e\n  /**\n   * Returns a summary of all the transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only.\n   *\n   * - Docs: https://viem.sh/docs/actions/test/getTxpoolStatus\n   *\n   * @returns Transaction pool status. {@link GetTxpoolStatusReturnType}\n   *\n   * @example\n   * import { createTestClient, http } from 'viem'\n   * import { foundry } from 'viem/chains'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * const status = await client.getTxpoolStatus()\n   */\n  getTxpoolStatus: () =\u003e Promise\u003cGetTxpoolStatusReturnType\u003e\n  /**\n   * Impersonate an account or contract address. This lets you send transactions from that account even if you don't have access to its private key.\n   *\n   * - Docs: https://viem.sh/docs/actions/test/impersonateAccount\n   *\n   * @param args - {@link ImpersonateAccountParameters}\n   *\n   * @example\n   * import { createTestClient, http } from 'viem'\n   * import { foundry } from 'viem/chains'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * await client.impersonateAccount({\n   *   address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',\n   * })\n   */\n  impersonateAccount: (args: ImpersonateAccountParameters) =\u003e Promise\u003cvoid\u003e\n  /**\n   * Jump forward in time by the given amount of time, in seconds.\n   *\n   * - Docs: https://viem.sh/docs/actions/test/increaseTime\n   *\n   * @param args – {@link IncreaseTimeParameters}\n   *\n   * @example\n   * import { createTestClient, http } from 'viem'\n   * import { foundry } from 'viem/chains'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * await client.increaseTime({\n   *   seconds: 420,\n   * })\n   */\n  increaseTime: (args: IncreaseTimeParameters) =\u003e Promise\u003cQuantity\u003e\n  /**\n   * Returns a summary of all the transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only.\n   *\n   * - Docs: https://viem.sh/docs/actions/test/inspectTxpool\n   *\n   * @returns Transaction pool inspection data. {@link InspectTxpoolReturnType}\n   *\n   * @example\n   * import { createTestClient, http } from 'viem'\n   * import { foundry } from 'viem/chains'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * const data = await client.inspectTxpool()\n   */\n  inspectTxpool: () =\u003e Promise\u003cInspectTxpoolReturnType\u003e\n  /**\n   * Adds state previously dumped with `dumpState` to the current chain.\n   *\n   * - Docs: https://viem.sh/docs/actions/test/loadState\n   *\n   * @param client - Client to use\n   *\n   * @example\n   * import { createTestClient, http } from 'viem'\n   * import { foundry } from 'viem/chains'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * await client.loadState({ state: '0x...' })\n   */\n  loadState: (args: LoadStateParameters) =\u003e Promise\u003cLoadStateReturnType\u003e\n  /**\n   * Mine a specified number of blocks.\n   *\n   * - Docs: https://viem.sh/docs/actions/test/mine\n   *\n   * @param client - Client to use\n   * @param args – {@link MineParameters}\n   *\n   * @example\n   * import { createTestClient, http } from 'viem'\n   * import { foundry } from 'viem/chains'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * await client.mine({ blocks: 1 })\n   */\n  mine: (args: MineParameters) =\u003e Promise\u003cvoid\u003e\n  /**\n   * Removes [`setBlockTimestampInterval`](https://viem.sh/docs/actions/test/setBlockTimestampInterval) if it exists.\n   *\n   * - Docs: https://viem.sh/docs/actions/test/removeBlockTimestampInterval\n   *\n   * @example\n   * import { createTestClient, http } from 'viem'\n   * import { foundry } from 'viem/chains'\n   * import { removeBlockTimestampInterval } from 'viem/test'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * await client.removeBlockTimestampInterval()\n   */\n  removeBlockTimestampInterval: () =\u003e Promise\u003cvoid\u003e\n  /**\n   * Resets fork back to its original state.\n   *\n   * - Docs: https://viem.sh/docs/actions/test/reset\n   *\n   * @param args – {@link ResetParameters}\n   *\n   * @example\n   * import { createTestClient, http } from 'viem'\n   * import { foundry } from 'viem/chains'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * await client.reset({ blockNumber: 69420n })\n   */\n  reset: (args?: ResetParameters | undefined) =\u003e Promise\u003cvoid\u003e\n  /**\n   * Revert the state of the blockchain at the current block.\n   *\n   * - Docs: https://viem.sh/docs/actions/test/revert\n   *\n   * @param args – {@link RevertParameters}\n   *\n   * @example\n   * import { createTestClient, http } from 'viem'\n   * import { foundry } from 'viem/chains'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * await client.revert({ id: '0x…' })\n   */\n  revert: (args: RevertParameters) =\u003e Promise\u003cvoid\u003e\n  /**\n   * Executes a transaction regardless of the signature.\n   *\n   * - Docs: https://viem.sh/docs/actions/test/sendUnsignedTransaction\n   *\n   * @param args – {@link SendUnsignedTransactionParameters}\n   * @returns The transaction hash. {@link SendUnsignedTransactionReturnType}\n   *\n   * @example\n   * import { createTestClient, http } from 'viem'\n   * import { foundry } from 'viem/chains'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * const hash = await client.sendUnsignedTransaction({\n   *   from: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',\n   *   to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',\n   *   value: 1000000000000000000n,\n   * })\n   */\n  sendUnsignedTransaction: \u003cchain extends Chain | undefined\u003e(\n    args: SendUnsignedTransactionParameters\u003cchain\u003e,\n  ) =\u003e Promise\u003cSendUnsignedTransactionReturnType\u003e\n  /**\n   * Enables or disables the automatic mining of new blocks with each new transaction submitted to the network.\n   *\n   * - Docs: https://viem.sh/docs/actions/test/setAutomine\n   *\n   * @example\n   * import { createTestClient, http } from 'viem'\n   * import { foundry } from 'viem/chains'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * await client.setAutomine()\n   */\n  setAutomine: (args: boolean) =\u003e Promise\u003cvoid\u003e\n  /**\n   * Modifies the balance of an account.\n   *\n   * - Docs: https://viem.sh/docs/actions/test/setBalance\n   *\n   * @param args – {@link SetBalanceParameters}\n   *\n   * @example\n   * import { createTestClient, http, parseEther } from 'viem'\n   * import { foundry } from 'viem/chains'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * await client.setBalance({\n   *   address: '0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC',\n   *   value: parseEther('1'),\n   * })\n   */\n  setBalance: (args: SetBalanceParameters) =\u003e Promise\u003cvoid\u003e\n  /**\n   * Sets the block's gas limit.\n   *\n   * - Docs: https://viem.sh/docs/actions/test/setBlockGasLimit\n   *\n   * @param args – {@link SetBlockGasLimitParameters}\n   *\n   * @example\n   * import { createTestClient, http } from 'viem'\n   * import { foundry } from 'viem/chains'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * await client.setBlockGasLimit({ gasLimit: 420_000n })\n   */\n  setBlockGasLimit: (args: SetBlockGasLimitParameters) =\u003e Promise\u003cvoid\u003e\n  /**\n   * Similar to [`increaseTime`](https://viem.sh/docs/actions/test/increaseTime), but sets a block timestamp `interval`. The timestamp of future blocks will be computed as `lastBlock_timestamp` + `interval`.\n   *\n   * - Docs: https://viem.sh/docs/actions/test/setBlockTimestampInterval\n   *\n   * @param args – {@link SetBlockTimestampIntervalParameters}\n   *\n   * @example\n   * import { createTestClient, http } from 'viem'\n   * import { foundry } from 'viem/chains'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * await client.setBlockTimestampInterval({ interval: 5 })\n   */\n  setBlockTimestampInterval: (\n    args: SetBlockTimestampIntervalParameters,\n  ) =\u003e Promise\u003cvoid\u003e\n  /**\n   * Modifies the bytecode stored at an account's address.\n   *\n   * - Docs: https://viem.sh/docs/actions/test/setCode\n   *\n   * @param args – {@link SetCodeParameters}\n   *\n   * @example\n   * import { createTestClient, http } from 'viem'\n   * import { foundry } from 'viem/chains'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * await client.setCode({\n   *   address: '0xe846c6fcf817734ca4527b28ccb4aea2b6663c79',\n   *   bytecode: '0x60806040526000600355600019600955600c80546001600160a01b031916737a250d5630b4cf539739df…',\n   * })\n   */\n  setCode: (args: SetCodeParameters) =\u003e Promise\u003cvoid\u003e\n  /**\n   * Sets the coinbase address to be used in new blocks.\n   *\n   * - Docs: https://viem.sh/docs/actions/test/setCoinbase\n   *\n   * @param args – {@link SetCoinbaseParameters}\n   *\n   * @example\n   * import { createTestClient, http } from 'viem'\n   * import { foundry } from 'viem/chains'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * await client.setCoinbase({\n   *   address: '0xe846c6fcf817734ca4527b28ccb4aea2b6663c79',\n   * })\n   */\n  setCoinbase: (args: SetCoinbaseParameters) =\u003e Promise\u003cvoid\u003e\n  /**\n   * Sets the automatic mining interval (in seconds) of blocks. Setting the interval to 0 will disable automatic mining.\n   *\n   * - Docs: https://viem.sh/docs/actions/test/setIntervalMining\n   *\n   * @param args – {@link SetIntervalMiningParameters}\n   *\n   * @example\n   * import { createTestClient, http } from 'viem'\n   * import { foundry } from 'viem/chains'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * await client.setIntervalMining({ interval: 5 })\n   */\n  setIntervalMining: (args: SetIntervalMiningParameters) =\u003e Promise\u003cvoid\u003e\n  /**\n   * Enable or disable logging on the test node network.\n   *\n   * - Docs: https://viem.sh/docs/actions/test/setLoggingEnabled\n   *\n   * @param client - Client to use\n   *\n   * @example\n   * import { createTestClient, http } from 'viem'\n   * import { foundry } from 'viem/chains'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * await client.setLoggingEnabled()\n   */\n  setLoggingEnabled: (args: boolean) =\u003e Promise\u003cvoid\u003e\n  /**\n   * Change the minimum gas price accepted by the network (in wei).\n   *\n   * - Docs: https://viem.sh/docs/actions/test/setMinGasPrice\n   *\n   * Note: `setMinGasPrice` can only be used on clients that do not have EIP-1559 enabled.\n   *\n   * @param args – {@link SetBlockGasLimitParameters}\n   *\n   * @example\n   * import { createTestClient, http, parseGwei } from 'viem'\n   * import { foundry } from 'viem/chains'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * await client.setMinGasPrice({\n   *   gasPrice: parseGwei('20'),\n   * })\n   */\n  setMinGasPrice: (args: SetMinGasPriceParameters) =\u003e Promise\u003cvoid\u003e\n  /**\n   * Sets the next block's base fee per gas.\n   *\n   * - Docs: https://viem.sh/docs/actions/test/setNextBlockBaseFeePerGas\n   *\n   * @param args – {@link SetNextBlockBaseFeePerGasParameters}\n   *\n   * @example\n   * import { createTestClient, http, parseGwei } from 'viem'\n   * import { foundry } from 'viem/chains'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * await client.setNextBlockBaseFeePerGas({\n   *   baseFeePerGas: parseGwei('20'),\n   * })\n   */\n  setNextBlockBaseFeePerGas: (\n    args: SetNextBlockBaseFeePerGasParameters,\n  ) =\u003e Promise\u003cvoid\u003e\n  /**\n   * Sets the next block's timestamp.\n   *\n   * - Docs: https://viem.sh/docs/actions/test/setNextBlockTimestamp\n   *\n   * @param args – {@link SetNextBlockTimestampParameters}\n   *\n   * @example\n   * import { createTestClient, http } from 'viem'\n   * import { foundry } from 'viem/chains'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * await client.setNextBlockTimestamp({ timestamp: 1671744314n })\n   */\n  setNextBlockTimestamp: (\n    args: SetNextBlockTimestampParameters,\n  ) =\u003e Promise\u003cvoid\u003e\n  /**\n   * Modifies (overrides) the nonce of an account.\n   *\n   * - Docs: https://viem.sh/docs/actions/test/setNonce\n   *\n   * @param args – {@link SetNonceParameters}\n   *\n   * @example\n   * import { createTestClient, http } from 'viem'\n   * import { foundry } from 'viem/chains'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * await client.setNonce({\n   *   address: '0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC',\n   *   nonce: 420,\n   * })\n   */\n  setNonce: (args: SetNonceParameters) =\u003e Promise\u003cvoid\u003e\n  /**\n   * Sets the backend RPC URL.\n   *\n   * - Docs: https://viem.sh/docs/actions/test/setRpcUrl\n   *\n   * @param jsonRpcUrl – RPC URL\n   *\n   * @example\n   * import { createTestClient, http } from 'viem'\n   * import { foundry } from 'viem/chains'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * await client.setRpcUrl('https://eth-mainnet.g.alchemy.com/v2')\n   */\n  setRpcUrl: (args: string) =\u003e Promise\u003cvoid\u003e\n  /**\n   * Writes to a slot of an account's storage.\n   *\n   * - Docs: https://viem.sh/docs/actions/test/setStorageAt\n   *\n   * @param args – {@link SetStorageAtParameters}\n   *\n   * @example\n   * import { createTestClient, http } from 'viem'\n   * import { foundry } from 'viem/chains'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * await client.setStorageAt({\n   *   address: '0xe846c6fcf817734ca4527b28ccb4aea2b6663c79',\n   *   index: 2,\n   *   value: '0x0000000000000000000000000000000000000000000000000000000000000069',\n   * })\n   */\n  setStorageAt: (args: SetStorageAtParameters) =\u003e Promise\u003cvoid\u003e\n  /**\n   * Snapshot the state of the blockchain at the current block.\n   *\n   * - Docs: https://viem.sh/docs/actions/test/snapshot\n   *\n   * @example\n   * import { createTestClient, http } from 'viem'\n   * import { foundry } from 'viem/chains'\n   * import { snapshot } from 'viem/test'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * await client.snapshot()\n   */\n  snapshot: () =\u003e Promise\u003cQuantity\u003e\n  /**\n   * Stop impersonating an account after having previously used [`impersonateAccount`](https://viem.sh/docs/actions/test/impersonateAccount).\n   *\n   * - Docs: https://viem.sh/docs/actions/test/stopImpersonatingAccount\n   *\n   * @param args – {@link StopImpersonatingAccountParameters}\n   *\n   * @example\n   * import { createTestClient, http } from 'viem'\n   * import { foundry } from 'viem/chains'\n   * import { stopImpersonatingAccount } from 'viem/test'\n   *\n   * const client = createTestClient({\n   *   mode: 'anvil',\n   *   chain: 'foundry',\n   *   transport: http(),\n   * })\n   * await client.stopImpersonatingAccount({\n   *   address: '0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC',\n   * })\n   */\n  stopImpersonatingAccount: (\n    args: StopImpersonatingAccountParameters,\n  ) =\u003e Promise\u003cvoid\u003e\n}\n\nexport function testActions\u003cmode extends TestClientMode\u003e({\n  mode,\n}: {\n  mode: mode\n}): \u003c\n  transport extends Transport = Transport,\n  chain extends Chain | undefined = Chain | undefined,\n  account extends Account | undefined = Account | undefined,\n\u003e(\n  client: Client\u003ctransport, chain, account\u003e,\n) =\u003e TestActions {\n  return \u003c\n    transport extends Transport = Transport,\n    chain extends Chain | undefined = Chain | undefined,\n    account extends Account | undefined = Account | undefined,\n  \u003e(\n    client_: Client\u003ctransport, chain, account\u003e,\n  ): TestActions =\u003e {\n    const client = client_.extend(() =\u003e ({\n      mode,\n    }))\n    return {\n      dropTransaction: (args) =\u003e dropTransaction(client, args),\n      dumpState: () =\u003e dumpState(client),\n      getAutomine: () =\u003e getAutomine(client),\n      getTxpoolContent: () =\u003e getTxpoolContent(client),\n      getTxpoolStatus: () =\u003e getTxpoolStatus(client),\n      impersonateAccount: (args) =\u003e impersonateAccount(client, args),\n      increaseTime: (args) =\u003e increaseTime(client, args),\n      inspectTxpool: () =\u003e inspectTxpool(client),\n      loadState: (args) =\u003e loadState(client, args),\n      mine: (args) =\u003e mine(client, args),\n      removeBlockTimestampInterval: () =\u003e removeBlockTimestampInterval(client),\n      reset: (args) =\u003e reset(client, args),\n      revert: (args) =\u003e revert(client, args),\n      sendUnsignedTransaction: (args) =\u003e\n        sendUnsignedTransaction(client, args as any),\n      setAutomine: (args) =\u003e setAutomine(client, args),\n      setBalance: (args) =\u003e setBalance(client, args),\n      setBlockGasLimit: (args) =\u003e setBlockGasLimit(client, args),\n      setBlockTimestampInterval: (args) =\u003e\n        setBlockTimestampInterval(client, args),\n      setCode: (args) =\u003e setCode(client, args),\n      setCoinbase: (args) =\u003e setCoinbase(client, args),\n      setIntervalMining: (args) =\u003e setIntervalMining(client, args),\n      setLoggingEnabled: (args) =\u003e setLoggingEnabled(client, args),\n      setMinGasPrice: (args) =\u003e setMinGasPrice(client, args),\n      setNextBlockBaseFeePerGas: (args) =\u003e\n        setNextBlockBaseFeePerGas(client, args),\n      setNextBlockTimestamp: (args) =\u003e setNextBlockTimestamp(client, args),\n      setNonce: (args) =\u003e setNonce(client, args),\n      setRpcUrl: (args) =\u003e setRpcUrl(client, args),\n      setStorageAt: (args) =\u003e setStorageAt(client, args),\n      snapshot: () =\u003e snapshot(client),\n      stopImpersonatingAccount: (args) =\u003e\n        stopImpersonatingAccount(client, args),\n    }\n  }\n}\n","import type { Address } from 'abitype'\n\nimport type { Account } from '../accounts/types.js'\nimport type { ErrorType } from '../errors/utils.js'\nimport type { ParseAccount } from '../types/account.js'\nimport type { Chain } from '../types/chain.js'\nimport type { RpcSchema, WalletRpcSchema } from '../types/eip1193.js'\nimport type { Prettify } from '../types/utils.js'\nimport {\n  type Client,\n  type ClientConfig,\n  type CreateClientErrorType,\n  createClient,\n} from './createClient.js'\nimport { type WalletActions, walletActions } from './decorators/wallet.js'\nimport type { Transport } from './transports/createTransport.js'\n\nexport type WalletClientConfig\u003c\n  transport extends Transport = Transport,\n  chain extends Chain | undefined = Chain | undefined,\n  accountOrAddress extends Account | Address | undefined =\n    | Account\n    | Address\n    | undefined,\n  rpcSchema extends RpcSchema | undefined = undefined,\n\u003e = Prettify\u003c\n  Pick\u003c\n    ClientConfig\u003ctransport, chain, accountOrAddress, rpcSchema\u003e,\n    | 'account'\n    | 'cacheTime'\n    | 'ccipRead'\n    | 'chain'\n    | 'dataSuffix'\n    | 'key'\n    | 'name'\n    | 'pollingInterval'\n    | 'rpcSchema'\n    | 'transport'\n  \u003e\n\u003e\n\nexport type WalletClient\u003c\n  transport extends Transport = Transport,\n  chain extends Chain | undefined = Chain | undefined,\n  account extends Account | undefined = Account | undefined,\n  rpcSchema extends RpcSchema | undefined = undefined,\n\u003e = Prettify\u003c\n  Client\u003c\n    transport,\n    chain,\n    account,\n    rpcSchema extends RpcSchema\n      ? [...WalletRpcSchema, ...rpcSchema]\n      : WalletRpcSchema,\n    WalletActions\u003cchain, account\u003e\n  \u003e\n\u003e\n\nexport type CreateWalletClientErrorType = CreateClientErrorType | ErrorType\n\n/**\n * Creates a Wallet Client with a given [Transport](https://viem.sh/docs/clients/intro) configured for a [Chain](https://viem.sh/docs/clients/chains).\n *\n * - Docs: https://viem.sh/docs/clients/wallet\n *\n * A Wallet Client is an interface to interact with [Ethereum Account(s)](https://ethereum.org/en/glossary/#account) and provides the ability to retrieve accounts, execute transactions, sign messages, etc. through [Wallet Actions](https://viem.sh/docs/actions/wallet/introduction).\n *\n * The Wallet Client supports signing over:\n * - [JSON-RPC Accounts](https://viem.sh/docs/clients/wallet#json-rpc-accounts) (e.g. Browser Extension Wallets, WalletConnect, etc).\n * - [Local Accounts](https://viem.sh/docs/clients/wallet#local-accounts-private-key-mnemonic-etc) (e.g. private key/mnemonic wallets).\n *\n * @param config - {@link WalletClientConfig}\n * @returns A Wallet Client. {@link WalletClient}\n *\n * @example\n * // JSON-RPC Account\n * import { createWalletClient, custom } from 'viem'\n * import { mainnet } from 'viem/chains'\n *\n * const client = createWalletClient({\n *   chain: mainnet,\n *   transport: custom(window.ethereum),\n * })\n *\n * @example\n * // Local Account\n * import { createWalletClient, custom } from 'viem'\n * import { privateKeyToAccount } from 'viem/accounts'\n * import { mainnet } from 'viem/chains'\n *\n * const client = createWalletClient({\n *   account: privateKeyToAccount('0x…')\n *   chain: mainnet,\n *   transport: http(),\n * })\n */\nexport function createWalletClient\u003c\n  transport extends Transport,\n  chain extends Chain | undefined = undefined,\n  accountOrAddress extends Account | Address | undefined = undefined,\n  rpcSchema extends RpcSchema | undefined = undefined,\n\u003e(\n  parameters: WalletClientConfig\u003ctransport, chain, accountOrAddress, rpcSchema\u003e,\n): WalletClient\u003ctransport, chain, ParseAccount\u003caccountOrAddress\u003e, rpcSchema\u003e\n\nexport function createWalletClient(\n  parameters: WalletClientConfig,\n): WalletClient {\n  const { key = 'wallet', name = 'Wallet Client', transport } = parameters\n  const client = createClient({\n    ...parameters,\n    key,\n    name,\n    transport,\n    type: 'walletClient',\n  })\n  return client.extend(walletActions)\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport {\n  type CreateTransportErrorType,\n  createTransport,\n  type Transport,\n  type TransportConfig,\n} from './createTransport.js'\n\ntype EthereumProvider = { request(...args: any): Promise\u003cany\u003e }\n\nexport type CustomTransportConfig = {\n  /** The key of the transport. */\n  key?: TransportConfig['key'] | undefined\n  /** Methods to include or exclude from executing RPC requests. */\n  methods?: TransportConfig['methods'] | undefined\n  /** The name of the transport. */\n  name?: TransportConfig['name'] | undefined\n  /** The max number of times to retry. */\n  retryCount?: TransportConfig['retryCount'] | undefined\n  /** The base delay (in ms) between retries. */\n  retryDelay?: TransportConfig['retryDelay'] | undefined\n}\n\nexport type CustomTransport = Transport\u003c\n  'custom',\n  {},\n  EthereumProvider['request']\n\u003e\n\nexport type CustomTransportErrorType = CreateTransportErrorType | ErrorType\n\n/**\n * @description Creates a custom transport given an EIP-1193 compliant `request` attribute.\n */\nexport function custom\u003cprovider extends EthereumProvider\u003e(\n  provider: provider,\n  config: CustomTransportConfig = {},\n): CustomTransport {\n  const {\n    key = 'custom',\n    methods,\n    name = 'Custom Provider',\n    retryDelay,\n  } = config\n  return ({ retryCount: defaultRetryCount }) =\u003e\n    createTransport({\n      key,\n      methods,\n      name,\n      request: provider.request.bind(provider),\n      retryCount: config.retryCount ?? defaultRetryCount,\n      retryDelay,\n      type: 'custom',\n    })\n}\n","import { ExecutionRevertedError } from '../../errors/node.js'\nimport {\n  TransactionRejectedRpcError,\n  UserRejectedRequestError,\n  WalletConnectSessionSettlementError,\n} from '../../errors/rpc.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { Chain } from '../../types/chain.js'\nimport { wait } from '../../utils/wait.js'\n\nimport {\n  type CreateTransportErrorType,\n  createTransport,\n  type Transport,\n  type TransportConfig,\n} from './createTransport.js'\n// TODO: Narrow `method` \u0026 `params` types.\nexport type OnResponseFn = (\n  args: {\n    method: string\n    params: unknown[]\n    transport: ReturnType\u003cTransport\u003e\n  } \u0026 (\n    | {\n        error?: undefined\n        response: unknown\n        status: 'success'\n      }\n    | {\n        error: Error\n        response?: undefined\n        status: 'error'\n      }\n  ),\n) =\u003e void\n\ntype RankOptions = {\n  /**\n   * The polling interval (in ms) at which the ranker should ping the RPC URL.\n   * @default client.pollingInterval\n   */\n  interval?: number | undefined\n  /**\n   * Ping method to determine latency.\n   */\n  ping?: (parameters: {\n    transport: ReturnType\u003cTransport\u003e\n  }) =\u003e Promise\u003cunknown\u003e | undefined\n  /**\n   * The number of previous samples to perform ranking on.\n   * @default 10\n   */\n  sampleCount?: number | undefined\n  /**\n   * Timeout when sampling transports.\n   * @default 1_000\n   */\n  timeout?: number | undefined\n  /**\n   * Weights to apply to the scores. Weight values are proportional.\n   */\n  weights?:\n    | {\n        /**\n         * The weight to apply to the latency score.\n         * @default 0.3\n         */\n        latency?: number | undefined\n        /**\n         * The weight to apply to the stability score.\n         * @default 0.7\n         */\n        stability?: number | undefined\n      }\n    | undefined\n}\n\nexport type FallbackTransportConfig = {\n  /** The key of the Fallback transport. */\n  key?: TransportConfig['key'] | undefined\n  /** The name of the Fallback transport. */\n  name?: TransportConfig['name'] | undefined\n  /** Toggle to enable ranking, or rank options. */\n  rank?: boolean | RankOptions | undefined\n  /** The max number of times to retry. */\n  retryCount?: TransportConfig['retryCount'] | undefined\n  /** The base delay (in ms) between retries. */\n  retryDelay?: TransportConfig['retryDelay'] | undefined\n  /** Callback on whether an error should throw or try the next transport in the fallback. */\n  shouldThrow?: (error: Error) =\u003e boolean | undefined\n}\n\nexport type FallbackTransport\u003c\n  transports extends readonly Transport[] = readonly Transport[],\n\u003e = Transport\u003c\n  'fallback',\n  {\n    onResponse: (fn: OnResponseFn) =\u003e void\n    transports: {\n      [key in keyof transports]: ReturnType\u003ctransports[key]\u003e\n    }\n  }\n\u003e\n\nexport type FallbackTransportErrorType = CreateTransportErrorType | ErrorType\n\nexport function fallback\u003cconst transports extends readonly Transport[]\u003e(\n  transports_: transports,\n  config: FallbackTransportConfig = {},\n): FallbackTransport\u003ctransports\u003e {\n  const {\n    key = 'fallback',\n    name = 'Fallback',\n    rank = false,\n    shouldThrow: shouldThrow_ = shouldThrow,\n    retryCount,\n    retryDelay,\n  } = config\n  return (({ chain, pollingInterval = 4_000, timeout, ...rest }) =\u003e {\n    let transports = transports_\n\n    let onResponse: OnResponseFn = () =\u003e {}\n\n    const transport = createTransport(\n      {\n        key,\n        name,\n        async request({ method, params }) {\n          let includes: boolean | undefined\n\n          const fetch = async (i = 0): Promise\u003cany\u003e =\u003e {\n            const transport = transports[i]({\n              ...rest,\n              chain,\n              retryCount: 0,\n              timeout,\n            })\n            try {\n              const response = await transport.request({\n                method,\n                params,\n              } as any)\n\n              onResponse({\n                method,\n                params: params as unknown[],\n                response,\n                transport,\n                status: 'success',\n              })\n\n              return response\n            } catch (err) {\n              onResponse({\n                error: err as Error,\n                method,\n                params: params as unknown[],\n                transport,\n                status: 'error',\n              })\n\n              if (shouldThrow_(err as Error)) throw err\n\n              // If we've reached the end of the fallbacks, throw the error.\n              if (i === transports.length - 1) throw err\n\n              // Check if at least one other transport includes the method\n              includes ??= transports.slice(i + 1).some((transport) =\u003e {\n                const { include, exclude } =\n                  transport({ chain }).config.methods || {}\n                if (include) return include.includes(method)\n                if (exclude) return !exclude.includes(method)\n                return true\n              })\n              if (!includes) throw err\n\n              // Otherwise, try the next fallback.\n              return fetch(i + 1)\n            }\n          }\n          return fetch()\n        },\n        retryCount,\n        retryDelay,\n        type: 'fallback',\n      },\n      {\n        onResponse: (fn: OnResponseFn) =\u003e (onResponse = fn),\n        transports: transports.map((fn) =\u003e fn({ chain, retryCount: 0 })),\n      },\n    )\n\n    if (rank) {\n      const rankOptions = (typeof rank === 'object' ? rank : {}) as RankOptions\n      rankTransports({\n        chain,\n        interval: rankOptions.interval ?? pollingInterval,\n        onTransports: (transports_) =\u003e (transports = transports_ as transports),\n        ping: rankOptions.ping,\n        sampleCount: rankOptions.sampleCount,\n        timeout: rankOptions.timeout,\n        transports,\n        weights: rankOptions.weights,\n      })\n    }\n    return transport\n  }) as FallbackTransport\u003ctransports\u003e\n}\n\nexport function shouldThrow(error: Error) {\n  if ('code' in error \u0026\u0026 typeof error.code === 'number') {\n    if (\n      error.code === TransactionRejectedRpcError.code ||\n      error.code === UserRejectedRequestError.code ||\n      error.code === WalletConnectSessionSettlementError.code ||\n      ExecutionRevertedError.nodeMessage.test(error.message) ||\n      error.code === 5000 // CAIP UserRejectedRequestError\n    )\n      return true\n  }\n  return false\n}\n\n/** @internal */\nexport function rankTransports({\n  chain,\n  interval = 4_000,\n  onTransports,\n  ping,\n  sampleCount = 10,\n  timeout = 1_000,\n  transports,\n  weights = {},\n}: {\n  chain?: Chain | undefined\n  interval: RankOptions['interval']\n  onTransports: (transports: readonly Transport[]) =\u003e void\n  ping?: RankOptions['ping'] | undefined\n  sampleCount?: RankOptions['sampleCount'] | undefined\n  timeout?: RankOptions['timeout'] | undefined\n  transports: readonly Transport[]\n  weights?: RankOptions['weights'] | undefined\n}) {\n  const { stability: stabilityWeight = 0.7, latency: latencyWeight = 0.3 } =\n    weights\n\n  type SampleData = { latency: number; success: number }\n  type Sample = SampleData[]\n  const samples: Sample[] = []\n\n  const rankTransports_ = async () =\u003e {\n    // 1. Take a sample from each Transport.\n    const sample: Sample = await Promise.all(\n      transports.map(async (transport) =\u003e {\n        const transport_ = transport({ chain, retryCount: 0, timeout })\n\n        const start = Date.now()\n        let end: number\n        let success: number\n        try {\n          await (ping\n            ? ping({ transport: transport_ })\n            : transport_.request({ method: 'net_listening' }))\n          success = 1\n        } catch {\n          success = 0\n        } finally {\n          end = Date.now()\n        }\n        const latency = end - start\n        return { latency, success }\n      }),\n    )\n\n    // 2. Store the sample. If we have more than `sampleCount` samples, remove\n    // the oldest sample.\n    samples.push(sample)\n    if (samples.length \u003e sampleCount) samples.shift()\n\n    // 3. Calculate the max latency from samples.\n    const maxLatency = Math.max(\n      ...samples.map((sample) =\u003e\n        Math.max(...sample.map(({ latency }) =\u003e latency)),\n      ),\n    )\n\n    // 4. Calculate the score for each Transport.\n    const scores = transports\n      .map((_, i) =\u003e {\n        const latencies = samples.map((sample) =\u003e sample[i].latency)\n        const meanLatency =\n          latencies.reduce((acc, latency) =\u003e acc + latency, 0) /\n          latencies.length\n        const latencyScore = 1 - meanLatency / maxLatency\n\n        const successes = samples.map((sample) =\u003e sample[i].success)\n        const stabilityScore =\n          successes.reduce((acc, success) =\u003e acc + success, 0) /\n          successes.length\n\n        if (stabilityScore === 0) return [0, i]\n        return [\n          latencyWeight * latencyScore + stabilityWeight * stabilityScore,\n          i,\n        ]\n      })\n      .sort((a, b) =\u003e b[0] - a[0])\n\n    // 5. Sort the Transports by score.\n    onTransports(scores.map(([, i]) =\u003e transports[i]))\n\n    // 6. Wait, and then rank again.\n    await wait(interval)\n    rankTransports_()\n  }\n  rankTransports_()\n}\n","import type { Address } from 'abitype'\nimport { RpcRequestError } from '../../errors/request.js'\nimport {\n  UrlRequiredError,\n  type UrlRequiredErrorType,\n} from '../../errors/transport.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { Hash, LogTopic } from '../../types/misc.js'\nimport type { RpcResponse } from '../../types/rpc.js'\nimport { getSocket } from '../../utils/rpc/compat.js'\nimport type { SocketRpcClient } from '../../utils/rpc/socket.js'\nimport {\n  type GetWebSocketRpcClientOptions,\n  getWebSocketRpcClient,\n} from '../../utils/rpc/webSocket.js'\nimport {\n  type CreateTransportErrorType,\n  createTransport,\n  type Transport,\n  type TransportConfig,\n} from './createTransport.js'\n\ntype WebSocketTransportSubscribeParameters = {\n  onData: (data: RpcResponse) =\u003e void\n  onError?: ((error: any) =\u003e void) | undefined\n}\n\ntype WebSocketTransportSubscribeReturnType = {\n  subscriptionId: Hash\n  unsubscribe: () =\u003e Promise\u003cRpcResponse\u003cboolean\u003e\u003e\n}\n\ntype WebSocketTransportSubscribe = {\n  subscribe(\n    args: WebSocketTransportSubscribeParameters \u0026\n      (\n        | {\n            params: ['newHeads']\n          }\n        | {\n            params: ['newPendingTransactions']\n          }\n        | {\n            params: [\n              'logs',\n              {\n                address?: Address | Address[]\n                topics?: LogTopic[]\n              },\n            ]\n          }\n        | {\n            params: ['syncing']\n          }\n      ),\n  ): Promise\u003cWebSocketTransportSubscribeReturnType\u003e\n}\n\nexport type WebSocketTransportConfig = {\n  /**\n   * Whether or not to send keep-alive ping messages.\n   * @default true\n   */\n  keepAlive?: GetWebSocketRpcClientOptions['keepAlive'] | undefined\n  /** The key of the WebSocket transport. */\n  key?: TransportConfig['key'] | undefined\n  /** Methods to include or exclude from executing RPC requests. */\n  methods?: TransportConfig['methods'] | undefined\n  /** The name of the WebSocket transport. */\n  name?: TransportConfig['name'] | undefined\n  /**\n   * Whether or not to attempt to reconnect on socket failure.\n   * @default true\n   */\n  reconnect?: GetWebSocketRpcClientOptions['reconnect'] | undefined\n  /** The max number of times to retry. */\n  retryCount?: TransportConfig['retryCount'] | undefined\n  /** The base delay (in ms) between retries. */\n  retryDelay?: TransportConfig['retryDelay'] | undefined\n  /** The timeout (in ms) for async WebSocket requests. Default: 10_000 */\n  timeout?: TransportConfig['timeout'] | undefined\n}\n\nexport type WebSocketTransport = Transport\u003c\n  'webSocket',\n  {\n    /**\n     * @deprecated use `getRpcClient` instead.\n     */\n    getSocket(): Promise\u003cWebSocket\u003e\n    getRpcClient(): Promise\u003cSocketRpcClient\u003cWebSocket\u003e\u003e\n    subscribe: WebSocketTransportSubscribe['subscribe']\n  }\n\u003e\n\nexport type WebSocketTransportErrorType =\n  | CreateTransportErrorType\n  | UrlRequiredErrorType\n  | ErrorType\n\n/**\n * @description Creates a WebSocket transport that connects to a JSON-RPC API.\n */\nexport function webSocket(\n  /** URL of the JSON-RPC API. Defaults to the chain's public RPC URL. */\n  url?: string,\n  config: WebSocketTransportConfig = {},\n): WebSocketTransport {\n  const {\n    keepAlive,\n    key = 'webSocket',\n    methods,\n    name = 'WebSocket JSON-RPC',\n    reconnect,\n    retryDelay,\n  } = config\n  return ({ chain, retryCount: retryCount_, timeout: timeout_ }) =\u003e {\n    const retryCount = config.retryCount ?? retryCount_\n    const timeout = timeout_ ?? config.timeout ?? 10_000\n    const url_ = url || chain?.rpcUrls.default.webSocket?.[0]\n    const wsRpcClientOpts = { keepAlive, reconnect }\n    if (!url_) throw new UrlRequiredError()\n    return createTransport(\n      {\n        key,\n        methods,\n        name,\n        async request({ method, params }) {\n          const body = { method, params }\n          const rpcClient = await getWebSocketRpcClient(url_, wsRpcClientOpts)\n          const { error, result } = await rpcClient.requestAsync({\n            body,\n            timeout,\n          })\n          if (error)\n            throw new RpcRequestError({\n              body,\n              error,\n              url: url_,\n            })\n          return result\n        },\n        retryCount,\n        retryDelay,\n        timeout,\n        type: 'webSocket',\n      },\n      {\n        getSocket() {\n          return getSocket(url_)\n        },\n        getRpcClient() {\n          return getWebSocketRpcClient(url_, wsRpcClientOpts)\n        },\n        async subscribe({ params, onData, onError }: any) {\n          const rpcClient = await getWebSocketRpcClient(url_, wsRpcClientOpts)\n          const { result: subscriptionId } = await new Promise\u003cany\u003e(\n            (resolve, reject) =\u003e\n              rpcClient.request({\n                body: {\n                  method: 'eth_subscribe',\n                  params,\n                },\n                onError(error) {\n                  reject(error)\n                  onError?.(error)\n                  return\n                },\n                onResponse(response) {\n                  if (response.error) {\n                    reject(response.error)\n                    onError?.(response.error)\n                    return\n                  }\n\n                  if (typeof response.id === 'number') {\n                    resolve(response)\n                    return\n                  }\n                  if (response.method !== 'eth_subscription') return\n                  onData(response.params)\n                },\n              }),\n          )\n          return {\n            subscriptionId,\n            async unsubscribe() {\n              return new Promise\u003cany\u003e((resolve) =\u003e\n                rpcClient.request({\n                  body: {\n                    method: 'eth_unsubscribe',\n                    params: [subscriptionId],\n                  },\n                  onResponse: resolve,\n                }),\n              )\n            },\n          }\n        },\n      },\n    )\n  }\n}\n","import type { Address } from 'abitype'\n\nimport type * as BlockOverrides from 'ox/BlockOverrides'\nimport type * as Rpc from 'ox/RpcResponse'\nimport type {\n  RpcEstimateUserOperationGasReturnType,\n  RpcGetUserOperationByHashReturnType,\n  RpcUserOperation,\n  RpcUserOperationReceipt,\n} from '../account-abstraction/types/rpc.js'\nimport type { BlockTag } from './block.js'\nimport type { Capabilities, ChainIdToCapabilities } from './capabilities.js'\nimport type { Hash, Hex, LogTopic } from './misc.js'\nimport type {\n  RpcBlock as Block,\n  RpcBlockIdentifier as BlockIdentifier,\n  RpcBlockNumber as BlockNumber,\n  RpcFeeHistory as FeeHistory,\n  RpcLog as Log,\n  RpcProof as Proof,\n  Quantity,\n  RpcStateOverride,\n  RpcTransaction as Transaction,\n  RpcTransactionReceipt as TransactionReceipt,\n  RpcTransactionRequest as TransactionRequest,\n  RpcUncle as Uncle,\n} from './rpc.js'\nimport type { AccessList } from './transaction.js'\nimport type { ExactPartial, OneOf, PartialBy, Prettify } from './utils.js'\n\n//////////////////////////////////////////////////\n// Provider\n\nexport type EIP1474Methods = [\n  ...PublicRpcSchema,\n  ...WalletRpcSchema,\n  ...BundlerRpcSchema,\n  ...PaymasterRpcSchema,\n]\n\nexport type EIP1193Provider = Prettify\u003c\n  EIP1193Events \u0026 {\n    request: EIP1193RequestFn\u003cEIP1474Methods\u003e\n  }\n\u003e\n\n//////////////////////////////////////////////////\n// Errors\n\nexport type ProviderRpcErrorType = ProviderRpcError \u0026 {\n  name: 'ProviderRpcError'\n}\nexport class ProviderRpcError extends Error {\n  code: number\n  details: string\n\n  constructor(code: number, message: string) {\n    super(message)\n    this.code = code\n    this.details = message\n  }\n}\n\n//////////////////////////////////////////////////\n// Provider Events\n\nexport type ProviderConnectInfo = {\n  chainId: string\n}\n\nexport type ProviderMessage = {\n  type: string\n  data: unknown\n}\n\nexport type EIP1193EventMap = {\n  accountsChanged(accounts: Address[]): void\n  chainChanged(chainId: string): void\n  connect(connectInfo: ProviderConnectInfo): void\n  disconnect(error: ProviderRpcError): void\n  message(message: ProviderMessage): void\n}\n\nexport type EIP1193Events = {\n  on\u003cevent extends keyof EIP1193EventMap\u003e(\n    event: event,\n    listener: EIP1193EventMap[event],\n  ): void\n  removeListener\u003cevent extends keyof EIP1193EventMap\u003e(\n    event: event,\n    listener: EIP1193EventMap[event],\n  ): void\n}\n\n//////////////////////////////////////////////////\n// Provider Requests\n\nexport type AddEthereumChainParameter = {\n  /** A 0x-prefixed hexadecimal string */\n  chainId: string\n  /** The chain name. */\n  chainName: string\n  /** Native currency for the chain. */\n  nativeCurrency?:\n    | {\n        name: string\n        symbol: string\n        decimals: number\n      }\n    | undefined\n  rpcUrls: readonly string[]\n  blockExplorerUrls?: string[] | undefined\n  iconUrls?: string[] | undefined\n}\n\nexport type NetworkSync = {\n  /** The current block number */\n  currentBlock: Quantity\n  /** Number of latest block on the network */\n  highestBlock: Quantity\n  /** Block number at which syncing started */\n  startingBlock: Quantity\n}\n\nexport type WalletCallReceipt\u003cquantity = Hex, status = Hex\u003e = {\n  logs: {\n    address: Hex\n    data: Hex\n    topics: Hex[]\n  }[]\n  status: status\n  blockHash: Hex\n  blockNumber: quantity\n  gasUsed: quantity\n  transactionHash: Hex\n}\n\nexport type WalletGrantPermissionsParameters = {\n  signer?:\n    | {\n        type: string\n        data?: unknown | undefined\n      }\n    | undefined\n  permissions: readonly {\n    data: unknown\n    policies: readonly {\n      data: unknown\n      type: string\n    }[]\n    required?: boolean | undefined\n    type: string\n  }[]\n  expiry: number\n}\n\nexport type WalletGrantPermissionsReturnType = {\n  expiry: number\n  factory?: `0x${string}` | undefined\n  factoryData?: string | undefined\n  grantedPermissions: readonly {\n    data: unknown\n    policies: readonly {\n      data: unknown\n      type: string\n    }[]\n    required?: boolean | undefined\n    type: string\n  }[]\n  permissionsContext: string\n  signerData?:\n    | {\n        userOpBuilder?: `0x${string}` | undefined\n        submitToAddress?: `0x${string}` | undefined\n      }\n    | undefined\n}\n\nexport type WalletGetAssetsParameters = {\n  account: Address\n  assetFilter?:\n    | {\n        [chainId: Hex]: readonly {\n          address: Address\n          type: 'native' | 'erc20' | 'erc721' | (string \u0026 {})\n        }[]\n      }\n    | undefined\n  assetTypeFilter?:\n    | readonly ('native' | 'erc20' | 'erc721' | (string \u0026 {}))[]\n    | undefined\n  chainFilter?: readonly Hex[] | undefined\n}\n\nexport type WalletGetAssetsReturnType = {\n  [chainId: Hex]: readonly {\n    address: Address | 'native'\n    balance: Hex\n    metadata?: unknown | undefined\n    type: 'native' | 'erc20' | 'erc721' | (string \u0026 {})\n  }[]\n}\n\nexport type WalletGetCallsStatusReturnType\u003c\n  capabilities extends Capabilities = Capabilities,\n  numberType = Hex,\n  bigintType = Hex,\n  receiptStatus = Hex,\n\u003e = {\n  atomic: boolean\n  capabilities?: capabilities | Capabilities | undefined\n  chainId: numberType\n  id: string\n  receipts?: WalletCallReceipt\u003cbigintType, receiptStatus\u003e[] | undefined\n  status: number\n  version: string\n}\n\nexport type WalletPermissionCaveat = {\n  type: string\n  value: any\n}\n\nexport type WalletPermission = {\n  caveats: WalletPermissionCaveat[]\n  date: number\n  id: string\n  invoker: `http://${string}` | `https://${string}`\n  parentCapability: 'eth_accounts' | string\n}\n\nexport type WalletSendCallsParameters\u003c\n  capabilities extends Capabilities = Capabilities,\n  chainId extends Hex | number = Hex,\n  quantity extends Quantity | bigint = Quantity,\n\u003e = [\n  {\n    atomicRequired: boolean\n    calls: readonly {\n      capabilities?: capabilities | Capabilities | undefined\n      to?: Address | undefined\n      data?: Hex | undefined\n      value?: quantity | undefined\n    }[]\n    capabilities?: capabilities | Capabilities | undefined\n    chainId?: chainId | undefined\n    id?: string | undefined\n    from?: Address | undefined\n    version: string\n  },\n]\n\nexport type WalletSendCallsReturnType\u003c\n  capabilities extends Capabilities = Capabilities,\n\u003e = {\n  capabilities?: capabilities | undefined\n  id: string\n}\n\nexport type WatchAssetParams = {\n  /** Token type. */\n  type: 'ERC20'\n  options: {\n    /** The address of the token contract */\n    address: string\n    /** A ticker symbol or shorthand, up to 11 characters */\n    symbol: string\n    /** The number of token decimals */\n    decimals: number\n    /** A string url of the token logo */\n    image?: string | undefined\n  }\n}\n\nexport type BundlerRpcSchema = [\n  /**\n   * @description Returns the chain ID associated with the current network\n   *\n   * @link https://eips.ethereum.org/EIPS/eip-4337#-eth_chainid\n   */\n  {\n    Method: 'eth_chainId'\n    Parameters?: undefined\n    ReturnType: Hex\n  },\n  /**\n   * @description Estimate the gas values for a UserOperation.\n   *\n   * @link https://eips.ethereum.org/EIPS/eip-4337#-eth_estimateuseroperationgas\n   *\n   * @example\n   * provider.request({\n   *  method: 'eth_estimateUserOperationGas',\n   *  params: [{ ... }]\n   * })\n   * // =\u003e { ... }\n   */\n  {\n    Method: 'eth_estimateUserOperationGas'\n    Parameters:\n      | [userOperation: RpcUserOperation, entrypoint: Address]\n      | [\n          userOperation: RpcUserOperation,\n          entrypoint: Address,\n          stateOverrideSet: RpcStateOverride,\n        ]\n    ReturnType: RpcEstimateUserOperationGasReturnType\n  },\n  /**\n   * @description Return a UserOperation based on a hash.\n   *\n   * @link https://eips.ethereum.org/EIPS/eip-4337#-eth_getuseroperationbyhash\n   *\n   * @example\n   * provider.request({\n   *  method: 'eth_getUserOperationByHash',\n   *  params: ['0x...']\n   * })\n   * // =\u003e { ... }\n   */\n  {\n    Method: 'eth_getUserOperationByHash'\n    Parameters: [hash: Hash]\n    ReturnType: RpcGetUserOperationByHashReturnType | null\n  },\n  /**\n   * @description Return a UserOperation receipt based on a hash.\n   *\n   * @link https://eips.ethereum.org/EIPS/eip-4337#-eth_getuseroperationreceipt\n   *\n   * @example\n   * provider.request({\n   *  method: 'eth_getUserOperationReceipt',\n   *  params: ['0x...']\n   * })\n   * // =\u003e { ... }\n   */\n  {\n    Method: 'eth_getUserOperationReceipt'\n    Parameters: [hash: Hash]\n    ReturnType: RpcUserOperationReceipt | null\n  },\n  /**\n   * @description Submits a User Operation object to the User Operation pool of the client.\n   *\n   * @link https://eips.ethereum.org/EIPS/eip-4337#-eth_senduseroperation\n   *\n   * @example\n   * provider.request({\n   *  method: 'eth_sendUserOperation',\n   *  params: [{ ... }]\n   * })\n   * // =\u003e '0x...'\n   */\n  {\n    Method: 'eth_sendUserOperation'\n    Parameters: [userOperation: RpcUserOperation, entrypoint: Address]\n    ReturnType: Hash\n  },\n  /**\n   * @description Return the list of supported entry points by the client.\n   *\n   * @link https://eips.ethereum.org/EIPS/eip-4337#-eth_supportedentrypoints\n   */\n  {\n    Method: 'eth_supportedEntryPoints'\n    Parameters?: undefined\n    ReturnType: readonly Address[]\n  },\n]\n\nexport type DebugBundlerRpcSchema = [\n  /**\n   * @description Clears the bundler mempool and reputation data of paymasters/accounts/factories/aggregators.\n   *\n   * @link https://github.com/eth-infinitism/bundler-spec/blob/a247b5de59a702063ea5b09d6136f119a061642b/src/debug/debug.yaml#L1\n   */\n  {\n    Method: 'debug_bundler_clearState'\n    Parameters?: undefined\n    ReturnType: undefined\n  },\n  /**\n   * @description Returns the current mempool\n   *\n   * @link https://github.com/eth-infinitism/bundler-spec/blob/a247b5de59a702063ea5b09d6136f119a061642b/src/debug/debug.yaml#L8\n   */\n  {\n    Method: 'debug_bundler_dumpMempool'\n    Parameters: [entryPoint: Address]\n    ReturnType: readonly { userOp: RpcUserOperation }[]\n  },\n  /**\n   * @description Forces the bundler to execute the entire current mempool.\n   *\n   * @link https://github.com/eth-infinitism/bundler-spec/blob/a247b5de59a702063ea5b09d6136f119a061642b/src/debug/debug.yaml#L19\n   */\n  {\n    Method: 'debug_bundler_sendBundleNow'\n    Parameters?: undefined\n    ReturnType: Hash\n  },\n  /**\n   * @description Toggles bundling mode between 'auto' and 'manual'\n   *\n   * @link https://github.com/eth-infinitism/bundler-spec/blob/a247b5de59a702063ea5b09d6136f119a061642b/src/debug/debug.yaml#L26\n   */\n  {\n    Method: 'debug_bundler_setBundlingMode'\n    Parameters: [mode: 'auto' | 'manual']\n    ReturnType: undefined\n  },\n  /**\n   * @description Sets reputation of given addresses.\n   *\n   * @link https://github.com/eth-infinitism/bundler-spec/blob/a247b5de59a702063ea5b09d6136f119a061642b/src/debug/debug.yaml#L37\n   */\n  {\n    Method: 'debug_bundler_setReputation'\n    Parameters: [\n      reputations: readonly {\n        address: Address\n        opsSeen: Hex\n        opsIncluded: Hex\n      }[],\n      entryPoint: Address,\n    ]\n    ReturnType: undefined\n  },\n  /**\n   * @description Returns the reputation data of all observed addresses.\n   *\n   * @link https://github.com/eth-infinitism/bundler-spec/blob/a247b5de59a702063ea5b09d6136f119a061642b/src/debug/debug.yaml#L52\n   */\n  {\n    Method: 'debug_bundler_dumpReputation'\n    Parameters: [entryPoint: Address]\n    ReturnType: readonly {\n      address: Address\n      opsSeen: Hex\n      opsIncluded: Hex\n    }[]\n  },\n  /**\n   * @description Add a bulk of UserOps into the mempool\n   *\n   * @link https://github.com/eth-infinitism/bundler-spec/blob/a247b5de59a702063ea5b09d6136f119a061642b/src/debug/debug.yaml#L64\n   */\n  {\n    Method: 'debug_bundler_addUserOps'\n    Parameters: [userOps: readonly RpcUserOperation[], entryPoint: Address]\n    ReturnType: undefined\n  },\n]\n\nexport type PaymasterRpcSchema = [\n  /**\n   * @description Returns the chain ID associated with the current network\n   *\n   * @link https://eips.ethereum.org/EIPS/eip-4337#-eth_chainid\n   */\n  {\n    Method: 'pm_getPaymasterStubData'\n    Parameters?: [\n      userOperation: OneOf\u003c\n        | PartialBy\u003c\n            Pick\u003c\n              RpcUserOperation\u003c'0.6'\u003e,\n              | 'callData'\n              | 'callGasLimit'\n              | 'initCode'\n              | 'maxFeePerGas'\n              | 'maxPriorityFeePerGas'\n              | 'nonce'\n              | 'sender'\n              | 'preVerificationGas'\n              | 'verificationGasLimit'\n            \u003e,\n            | 'callGasLimit'\n            | 'initCode'\n            | 'maxFeePerGas'\n            | 'maxPriorityFeePerGas'\n            | 'preVerificationGas'\n            | 'verificationGasLimit'\n          \u003e\n        | PartialBy\u003c\n            Pick\u003c\n              RpcUserOperation\u003c'0.7'\u003e,\n              | 'callData'\n              | 'callGasLimit'\n              | 'factory'\n              | 'factoryData'\n              | 'maxFeePerGas'\n              | 'maxPriorityFeePerGas'\n              | 'nonce'\n              | 'sender'\n              | 'preVerificationGas'\n              | 'verificationGasLimit'\n            \u003e,\n            | 'callGasLimit'\n            | 'factory'\n            | 'factoryData'\n            | 'maxFeePerGas'\n            | 'maxPriorityFeePerGas'\n            | 'preVerificationGas'\n            | 'verificationGasLimit'\n          \u003e\n      \u003e,\n      entrypoint: Address,\n      chainId: Hex,\n      context: unknown,\n    ]\n    ReturnType: OneOf\u003c\n      | { paymasterAndData: Hex }\n      | {\n          paymaster: Address\n          paymasterData: Hex\n          paymasterVerificationGasLimit: Hex\n          paymasterPostOpGasLimit: Hex\n        }\n    \u003e \u0026 {\n      sponsor?: { name: string; icon?: string | undefined } | undefined\n      isFinal?: boolean | undefined\n    }\n  },\n  /**\n   * @description Returns values to be used in paymaster-related fields of a signed user operation.\n   *\n   * @link https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7677.md#pm_getpaymasterdata\n   */\n  {\n    Method: 'pm_getPaymasterData'\n    Parameters?: [\n      userOperation:\n        | Pick\u003c\n            RpcUserOperation\u003c'0.6'\u003e,\n            | 'callData'\n            | 'callGasLimit'\n            | 'initCode'\n            | 'maxFeePerGas'\n            | 'maxPriorityFeePerGas'\n            | 'nonce'\n            | 'sender'\n            | 'preVerificationGas'\n            | 'verificationGasLimit'\n          \u003e\n        | Pick\u003c\n            RpcUserOperation\u003c'0.7'\u003e,\n            | 'callData'\n            | 'callGasLimit'\n            | 'factory'\n            | 'factoryData'\n            | 'maxFeePerGas'\n            | 'maxPriorityFeePerGas'\n            | 'nonce'\n            | 'sender'\n            | 'preVerificationGas'\n            | 'verificationGasLimit'\n          \u003e,\n      entrypoint: Address,\n      chainId: Hex,\n      context: unknown,\n    ]\n    ReturnType: OneOf\u003c\n      | { paymasterAndData: Hex }\n      | {\n          paymaster: Address\n          paymasterData: Hex\n          paymasterVerificationGasLimit: Hex\n          paymasterPostOpGasLimit: Hex\n        }\n    \u003e\n  },\n]\n\nexport type PublicRpcSchema = [\n  /**\n   * @description Returns the version of the current client\n   *\n   * @example\n   * provider.request({ method: 'web3_clientVersion' })\n   * // =\u003e 'MetaMask/v1.0.0'\n   */\n  {\n    Method: 'web3_clientVersion'\n    Parameters?: undefined\n    ReturnType: string\n  },\n  /**\n   * @description Hashes data using the Keccak-256 algorithm\n   *\n   * @example\n   * provider.request({ method: 'web3_sha3', params: ['0x68656c6c6f20776f726c64'] })\n   * // =\u003e '0xc94770007dda54cF92009BFF0dE90c06F603a09f'\n   */\n  {\n    Method: 'web3_sha3'\n    Parameters: [data: Hash]\n    ReturnType: string\n  },\n  /**\n   * @description Determines if this client is listening for new network connections\n   *\n   * @example\n   * provider.request({ method: 'net_listening' })\n   * // =\u003e true\n   */\n  {\n    Method: 'net_listening'\n    Parameters?: undefined\n    ReturnType: boolean\n  },\n  /**\n   * @description Returns the number of peers currently connected to this client\n   *\n   * @example\n   * provider.request({ method: 'net_peerCount' })\n   * // =\u003e '0x1'\n   */\n  {\n    Method: 'net_peerCount'\n    Parameters?: undefined\n    ReturnType: Quantity\n  },\n  /**\n   * @description Returns the chain ID associated with the current network\n   *\n   * @example\n   * provider.request({ method: 'net_version' })\n   * // =\u003e '1'\n   */\n  {\n    Method: 'net_version'\n    Parameters?: undefined\n    ReturnType: Quantity\n  },\n  /**\n   * @description Returns the base fee per blob gas in wei.\n   *\n   * @example\n   * provider.request({ method: 'eth_blobBaseFee' })\n   * // =\u003e '0x09184e72a000'\n   */\n  {\n    Method: 'eth_blobBaseFee'\n    Parameters?: undefined\n    ReturnType: Quantity\n  },\n  /**\n   * @description Returns the number of the most recent block seen by this client\n   *\n   * @example\n   * provider.request({ method: 'eth_blockNumber' })\n   * // =\u003e '0x1b4'\n   */\n  {\n    Method: 'eth_blockNumber'\n    Parameters?: undefined\n    ReturnType: Quantity\n  },\n  /**\n   * @description Executes a new message call immediately without submitting a transaction to the network\n   *\n   * @example\n   * provider.request({ method: 'eth_call', params: [{ to: '0x...', data: '0x...' }] })\n   * // =\u003e '0x...'\n   */\n  {\n    Method: 'eth_call'\n    Parameters:\n      | readonly [transaction: ExactPartial\u003cTransactionRequest\u003e]\n      | readonly [\n          transaction: ExactPartial\u003cTransactionRequest\u003e,\n          block: BlockNumber | BlockTag | BlockIdentifier,\n        ]\n      | readonly [\n          transaction: ExactPartial\u003cTransactionRequest\u003e,\n          block: BlockNumber | BlockTag | BlockIdentifier,\n          stateOverrideSet: RpcStateOverride,\n        ]\n      | readonly [\n          transaction: ExactPartial\u003cTransactionRequest\u003e,\n          block: BlockNumber | BlockTag | BlockIdentifier,\n          stateOverrideSet: RpcStateOverride,\n          blockOverrides: BlockOverrides.Rpc,\n        ]\n    ReturnType: Hex\n  },\n  /**\n   * @description Creates an EIP-2930 access list that can be included in a transaction.\n   *\n   * @example\n   * provider.request({ method: 'eth_createAccessList', params: [{ to: '0x...', data: '0x...' }] })\n   * // =\u003e {\n   * //   accessList: ['0x...', '0x...'],\n   * //   gasUsed: '0x123',\n   * // }\n   */\n  {\n    Method: 'eth_createAccessList'\n    Parameters:\n      | [transaction: ExactPartial\u003cTransactionRequest\u003e]\n      | [\n          transaction: ExactPartial\u003cTransactionRequest\u003e,\n          block: BlockNumber | BlockTag | BlockIdentifier,\n        ]\n    ReturnType: {\n      accessList: AccessList\n      error?: string | undefined\n      gasUsed: Quantity\n    }\n  },\n  /**\n   * @description Returns the chain ID associated with the current network\n   * @example\n   * provider.request({ method: 'eth_chainId' })\n   * // =\u003e '1'\n   */\n  {\n    Method: 'eth_chainId'\n    Parameters?: undefined\n    ReturnType: Quantity\n  },\n  /**\n   * @description Returns the client coinbase address.\n   * @example\n   * provider.request({ method: 'eth_coinbase' })\n   * // =\u003e '0x...'\n   */\n  {\n    Method: 'eth_coinbase'\n    Parameters?: undefined\n    ReturnType: Address\n  },\n  /**\n   * @description Estimates the gas necessary to complete a transaction without submitting it to the network\n   *\n   * @example\n   * provider.request({\n   *  method: 'eth_estimateGas',\n   *  params: [{ from: '0x...', to: '0x...', value: '0x...' }]\n   * })\n   * // =\u003e '0x5208'\n   */\n  {\n    Method: 'eth_estimateGas'\n    Parameters:\n      | [transaction: TransactionRequest]\n      | [transaction: TransactionRequest, block: BlockNumber | BlockTag]\n      | [\n          transaction: TransactionRequest,\n          block: BlockNumber | BlockTag,\n          stateOverride: RpcStateOverride,\n        ]\n    ReturnType: Quantity\n  },\n  /**\n   * @description Fills a transaction with the necessary data to be signed.\n   *\n   * @example\n   * provider.request({ method: 'eth_fillTransaction', params: [{ from: '0x...', to: '0x...', value: '0x...' }] })\n   * // =\u003e '0x...'\n   */\n  {\n    Method: 'eth_fillTransaction'\n    Parameters: [transaction: TransactionRequest]\n    ReturnType: {\n      capabilities?: Record\u003cstring, unknown\u003e | undefined\n      raw: Hex\n      tx: Transaction\n    }\n  },\n  /**\n   * @description Returns a collection of historical gas information\n   *\n   * @example\n   * provider.request({\n   *  method: 'eth_feeHistory',\n   *  params: ['4', 'latest', ['25', '75']]\n   * })\n   * // =\u003e {\n   * //   oldestBlock: '0x1',\n   * //   baseFeePerGas: ['0x1', '0x2', '0x3', '0x4'],\n   * //   gasUsedRatio: ['0x1', '0x2', '0x3', '0x4'],\n   * //   reward: [['0x1', '0x2'], ['0x3', '0x4'], ['0x5', '0x6'], ['0x7', '0x8']]\n   * // }\n   * */\n  {\n    Method: 'eth_feeHistory'\n    Parameters: [\n      /** Number of blocks in the requested range. Between 1 and 1024 blocks can be requested in a single query. Less than requested may be returned if not all blocks are available. */\n      blockCount: Quantity,\n      /** Highest number block of the requested range. */\n      newestBlock: BlockNumber | BlockTag,\n      /** A monotonically increasing list of percentile values to sample from each block's effective priority fees per gas in ascending order, weighted by gas used. */\n      rewardPercentiles: number[] | undefined,\n    ]\n    ReturnType: FeeHistory\n  },\n  /**\n   * @description Returns the current price of gas expressed in wei\n   *\n   * @example\n   * provider.request({ method: 'eth_gasPrice' })\n   * // =\u003e '0x09184e72a000'\n   */\n  {\n    Method: 'eth_gasPrice'\n    Parameters?: undefined\n    ReturnType: Quantity\n  },\n  /**\n   * @description Returns the balance of an address in wei\n   *\n   * @example\n   * provider.request({ method: 'eth_getBalance', params: ['0x...', 'latest'] })\n   * // =\u003e '0x12a05...'\n   */\n  {\n    Method: 'eth_getBalance'\n    Parameters: [\n      address: Address,\n      block: BlockNumber | BlockTag | BlockIdentifier,\n    ]\n    ReturnType: Quantity\n  },\n  /**\n   * @description Returns information about a block specified by hash\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_getBlockByHash', params: ['0x...', true] })\n   * // =\u003e {\n   * //   number: '0x1b4',\n   * //   hash: '0x...',\n   * //   parentHash: '0x...',\n   * //   ...\n   * // }\n   */\n  {\n    Method: 'eth_getBlockByHash'\n    Parameters: [\n      /** hash of a block */\n      hash: Hash,\n      /** true will pull full transaction objects, false will pull transaction hashes */\n      includeTransactionObjects: boolean,\n    ]\n    ReturnType: Block | null\n  },\n  /**\n   * @description Returns information about a block specified by number\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_getBlockByNumber', params: ['0x1b4', true] })\n   * // =\u003e {\n   * //   number: '0x1b4',\n   * //   hash: '0x...',\n   * //   parentHash: '0x...',\n   * //   ...\n   * // }\n   */\n  {\n    Method: 'eth_getBlockByNumber'\n    Parameters: [\n      /** block number, or one of \"latest\", \"safe\", \"finalized\", \"earliest\" or \"pending\" */\n      block: BlockNumber | BlockTag,\n      /** true will pull full transaction objects, false will pull transaction hashes */\n      includeTransactionObjects: boolean,\n    ]\n    ReturnType: Block | null\n  },\n  /**\n   * @description Returns the receipts of a block specified by block number, block tag, or block hash\n   * @link https://ethereum.github.io/execution-apis/api/methods/eth_getBlockReceipts/\n   * @example\n   * provider.request({ method: 'eth_getBlockReceipts', params: ['latest'] })\n   * // =\u003e [{ ... }, { ... }]\n   */\n  {\n    Method: 'eth_getBlockReceipts'\n    Parameters: [block: BlockNumber | BlockTag | Hash]\n    ReturnType: TransactionReceipt[] | null\n  },\n  /**\n   * @description Returns the number of transactions in a block specified by block hash\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_getBlockTransactionCountByHash', params: ['0x...'] })\n   * // =\u003e '0x1'\n   */\n  {\n    Method: 'eth_getBlockTransactionCountByHash'\n    Parameters: [hash: Hash]\n    ReturnType: Quantity\n  },\n  /**\n   * @description Returns the number of transactions in a block specified by block number\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_getBlockTransactionCountByNumber', params: ['0x1b4'] })\n   * // =\u003e '0x1'\n   */\n  {\n    Method: 'eth_getBlockTransactionCountByNumber'\n    Parameters: [block: BlockNumber | BlockTag]\n    ReturnType: Quantity\n  },\n  /**\n   * @description Returns the contract code stored at a given address\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_getCode', params: ['0x...', 'latest'] })\n   * // =\u003e '0x...'\n   */\n  {\n    Method: 'eth_getCode'\n    Parameters: [\n      address: Address,\n      block: BlockNumber | BlockTag | BlockIdentifier,\n    ]\n    ReturnType: Hex\n  },\n  /**\n   * @description Returns a list of all logs based on filter ID since the last log retrieval\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_getFilterChanges', params: ['0x...'] })\n   * // =\u003e [{ ... }, { ... }]\n   */\n  {\n    Method: 'eth_getFilterChanges'\n    Parameters: [filterId: Quantity]\n    ReturnType: Log[] | Hex[]\n  },\n  /**\n   * @description Returns a list of all logs based on filter ID\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_getFilterLogs', params: ['0x...'] })\n   * // =\u003e [{ ... }, { ... }]\n   */\n  {\n    Method: 'eth_getFilterLogs'\n    Parameters: [filterId: Quantity]\n    ReturnType: Log[]\n  },\n  /**\n   * @description Returns a list of all logs based on a filter object\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_getLogs', params: [{ fromBlock: '0x...', toBlock: '0x...', address: '0x...', topics: ['0x...'] }] })\n   * // =\u003e [{ ... }, { ... }]\n   */\n  {\n    Method: 'eth_getLogs'\n    Parameters: [\n      {\n        address?: Address | Address[] | undefined\n        topics?: LogTopic[] | undefined\n      } \u0026 (\n        | {\n            fromBlock?: BlockNumber | BlockTag | undefined\n            toBlock?: BlockNumber | BlockTag | undefined\n            blockHash?: undefined\n          }\n        | {\n            fromBlock?: undefined\n            toBlock?: undefined\n            blockHash?: Hash | undefined\n          }\n      ),\n    ]\n    ReturnType: Log[]\n  },\n  /**\n   * @description Returns the account and storage values of the specified account including the Merkle-proof.\n   * @link https://eips.ethereum.org/EIPS/eip-1186\n   * @example\n   * provider.request({ method: 'eth_getProof', params: ['0x...', ['0x...'], 'latest'] })\n   * // =\u003e {\n   * //   ...\n   * // }\n   */\n  {\n    Method: 'eth_getProof'\n    Parameters: [\n      /** Address of the account. */\n      address: Address,\n      /** An array of storage-keys that should be proofed and included. */\n      storageKeys: Hash[],\n      block: BlockNumber | BlockTag | BlockIdentifier,\n    ]\n    ReturnType: Proof\n  },\n  /**\n   * @description Returns the value from a storage position at an address\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_getStorageAt', params: ['0x...', '0x...', 'latest'] })\n   * // =\u003e '0x...'\n   */\n  {\n    Method: 'eth_getStorageAt'\n    Parameters: [\n      address: Address,\n      index: Quantity,\n      block: BlockNumber | BlockTag | BlockIdentifier,\n    ]\n    ReturnType: Hex\n  },\n  /**\n   * @description Returns information about a transaction specified by block hash and transaction index\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_getTransactionByBlockHashAndIndex', params: ['0x...', '0x...'] })\n   * // =\u003e { ... }\n   */\n  {\n    Method: 'eth_getTransactionByBlockHashAndIndex'\n    Parameters: [hash: Hash, index: Quantity]\n    ReturnType: Transaction | null\n  },\n  /**\n   * @description Returns information about a transaction specified by block number and transaction index\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_getTransactionByBlockNumberAndIndex', params: ['0x...', '0x...'] })\n   * // =\u003e { ... }\n   */\n  {\n    Method: 'eth_getTransactionByBlockNumberAndIndex'\n    Parameters: [block: BlockNumber | BlockTag, index: Quantity]\n    ReturnType: Transaction | null\n  },\n  /**\n   * @description Returns information about a transaction specified by hash\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_getTransactionByHash', params: ['0x...'] })\n   * // =\u003e { ... }\n   */\n  {\n    Method: 'eth_getTransactionByHash'\n    Parameters: [hash: Hash]\n    ReturnType: Transaction | null\n  },\n  /**\n   * @description Returns information about a transaction specified by sender and nonce\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_getTransactionBySenderAndNonce', params: ['0x...', '0x...'] })\n   * // =\u003e { ... }\n   */\n  {\n    Method: 'eth_getTransactionBySenderAndNonce'\n    Parameters: [sender: Address, nonce: Quantity]\n    ReturnType: Transaction | null\n  },\n  /**\n   * @description Returns the number of transactions sent from an address\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_getTransactionCount', params: ['0x...', 'latest'] })\n   * // =\u003e '0x1'\n   */\n  {\n    Method: 'eth_getTransactionCount'\n    Parameters: [\n      address: Address,\n      block: BlockNumber | BlockTag | BlockIdentifier,\n    ]\n    ReturnType: Quantity\n  },\n  /**\n   * @description Returns the receipt of a transaction specified by hash\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_getTransactionReceipt', params: ['0x...'] })\n   * // =\u003e { ... }\n   */\n  {\n    Method: 'eth_getTransactionReceipt'\n    Parameters: [hash: Hash]\n    ReturnType: TransactionReceipt | null\n  },\n  /**\n   * @description Returns information about an uncle specified by block hash and uncle index position\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_getUncleByBlockHashAndIndex', params: ['0x...', '0x...'] })\n   * // =\u003e { ... }\n   */\n  {\n    Method: 'eth_getUncleByBlockHashAndIndex'\n    Parameters: [hash: Hash, index: Quantity]\n    ReturnType: Uncle | null\n  },\n  /**\n   * @description Returns information about an uncle specified by block number and uncle index position\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_getUncleByBlockNumberAndIndex', params: ['0x...', '0x...'] })\n   * // =\u003e { ... }\n   */\n  {\n    Method: 'eth_getUncleByBlockNumberAndIndex'\n    Parameters: [block: BlockNumber | BlockTag, index: Quantity]\n    ReturnType: Uncle | null\n  },\n  /**\n   * @description Returns the number of uncles in a block specified by block hash\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_getUncleCountByBlockHash', params: ['0x...'] })\n   * // =\u003e '0x1'\n   */\n  {\n    Method: 'eth_getUncleCountByBlockHash'\n    Parameters: [hash: Hash]\n    ReturnType: Quantity\n  },\n  /**\n   * @description Returns the number of uncles in a block specified by block number\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_getUncleCountByBlockNumber', params: ['0x...'] })\n   * // =\u003e '0x1'\n   */\n  {\n    Method: 'eth_getUncleCountByBlockNumber'\n    Parameters: [block: BlockNumber | BlockTag]\n    ReturnType: Quantity\n  },\n  /**\n   * @description Returns the current maxPriorityFeePerGas in wei.\n   * @link https://ethereum.github.io/execution-apis/api-documentation/\n   * @example\n   * provider.request({ method: 'eth_maxPriorityFeePerGas' })\n   * // =\u003e '0x5f5e100'\n   */\n  {\n    Method: 'eth_maxPriorityFeePerGas'\n    Parameters?: undefined\n    ReturnType: Quantity\n  },\n  /**\n   * @description Creates a filter to listen for new blocks that can be used with `eth_getFilterChanges`\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_newBlockFilter' })\n   * // =\u003e '0x1'\n   */\n  {\n    Method: 'eth_newBlockFilter'\n    Parameters?: undefined\n    ReturnType: Quantity\n  },\n  /**\n   * @description Creates a filter to listen for specific state changes that can then be used with `eth_getFilterChanges`\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_newFilter', params: [{ fromBlock: '0x...', toBlock: '0x...', address: '0x...', topics: ['0x...'] }] })\n   * // =\u003e '0x1'\n   */\n  {\n    Method: 'eth_newFilter'\n    Parameters: [\n      filter: {\n        fromBlock?: BlockNumber | BlockTag | undefined\n        toBlock?: BlockNumber | BlockTag | undefined\n        address?: Address | Address[] | undefined\n        topics?: LogTopic[] | undefined\n      },\n    ]\n    ReturnType: Quantity\n  },\n  /**\n   * @description Creates a filter to listen for new pending transactions that can be used with `eth_getFilterChanges`\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_newPendingTransactionFilter' })\n   * // =\u003e '0x1'\n   */\n  {\n    Method: 'eth_newPendingTransactionFilter'\n    Parameters?: undefined\n    ReturnType: Quantity\n  },\n  /**\n   * @description Returns the current Ethereum protocol version\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_protocolVersion' })\n   * // =\u003e '54'\n   */\n  {\n    Method: 'eth_protocolVersion'\n    Parameters?: undefined\n    ReturnType: string\n  },\n  /**\n   * @description Sends a **signed** transaction to the network\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_sendRawTransaction', params: ['0x...'] })\n   * // =\u003e '0x...'\n   */\n  {\n    Method: 'eth_sendRawTransaction'\n    Parameters: [signedTransaction: Hex]\n    ReturnType: Hash\n  },\n  /**\n   * @description Sends a **signed** transaction to the network synchronously\n   * @link https://eips.ethereum.org/EIPS/eip-7966\n   * @example\n   * provider.request({ method: 'eth_sendRawTransactionSync', params: ['0x...'] })\n   * // =\u003e '0x...'\n   */\n  {\n    Method: 'eth_sendRawTransactionSync'\n    Parameters:\n      | [signedTransaction: Hex]\n      | [signedTransaction: Hex, timeout: number]\n    ReturnType: TransactionReceipt\n  },\n  /**\n   * @description Simulates execution of a set of calls with optional block and state overrides.\n   * @example\n   * provider.request({ method: 'eth_simulateV1', params: [{ blockStateCalls: [{ calls: [{ from: '0x...', to: '0x...', value: '0x...', data: '0x...' }] }] }, 'latest'] })\n   * // =\u003e { ... }\n   */\n  {\n    Method: 'eth_simulateV1'\n    Parameters: [\n      {\n        blockStateCalls: readonly {\n          blockOverrides?: BlockOverrides.Rpc | undefined\n          calls?: readonly ExactPartial\u003cTransactionRequest\u003e[] | undefined\n          stateOverrides?: RpcStateOverride | undefined\n        }[]\n        returnFullTransactions?: boolean | undefined\n        traceTransfers?: boolean | undefined\n        validation?: boolean | undefined\n      },\n      BlockNumber | BlockTag,\n    ]\n    ReturnType: readonly (Block \u0026 {\n      calls: readonly {\n        error?:\n          | {\n              data?: Hex | undefined\n              code: number\n              message: string\n            }\n          | undefined\n        logs?: readonly Log[] | undefined\n        gasUsed: Hex\n        returnData: Hex\n        status: Hex\n      }[]\n    })[]\n  },\n  /**\n   * @description Destroys a filter based on filter ID\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_uninstallFilter', params: ['0x1'] })\n   * // =\u003e true\n   */\n  {\n    Method: 'eth_uninstallFilter'\n    Parameters: [filterId: Quantity]\n    ReturnType: boolean\n  },\n]\n\nexport type TestRpcSchema\u003cmode extends string\u003e = [\n  /**\n   * @description Add information about compiled contracts\n   * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_addcompilationresult\n   */\n  {\n    Method: `${mode}_addCompilationResult`\n    Parameters: any[]\n    ReturnType: any\n  },\n  /**\n   * @description Remove a transaction from the mempool\n   * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_droptransaction\n   */\n  {\n    Method: `${mode}_dropTransaction`\n    Parameters: [hash: Hash]\n    ReturnType: void\n  },\n  /**\n   * @description Serializes the current state (including contracts code, contract's storage, accounts properties, etc.) into a savable data blob.\n   */\n  {\n    Method: `${mode}_dumpState`\n    Parameters?: undefined\n    ReturnType: Hex\n  },\n  /**\n   * @description Turn on call traces for transactions that are returned to the user when they execute a transaction (instead of just txhash/receipt).\n   */\n  {\n    Method: `${mode}_enableTraces`\n    Parameters?: undefined\n    ReturnType: void\n  },\n  /**\n   * @description Impersonate an account or contract address.\n   * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_impersonateaccount\n   */\n  {\n    Method: `${mode}_impersonateAccount`\n    Parameters: [address: Address]\n    ReturnType: void\n  },\n  /**\n   * @description Returns true if automatic mining is enabled, and false otherwise. See [Mining Modes](https://hardhat.org/hardhat-network/explanation/mining-modes) to learn more.\n   * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_getautomine\n   */\n  {\n    Method: `${mode}_getAutomine`\n    Parameters?: undefined\n    ReturnType: boolean\n  },\n  /**\n   * @description Adds state previously dumped with `dumpState` to the current chain.\n   */\n  {\n    Method: `${mode}_loadState`\n    Parameters?: [Hex] | undefined\n    ReturnType: void\n  },\n  /**\n   * @description Advance the block number of the network by a certain number of blocks\n   * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_mine\n   */\n  {\n    Method: `${mode}_mine`\n    Parameters: [\n      /** Number of blocks to mine. */\n      count: Hex,\n      /** Interval between each block in seconds. */\n      interval: Hex | undefined,\n    ]\n    ReturnType: void\n  },\n  /**\n   * @description Resets the fork.\n   * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_reset\n   */\n  {\n    Method: `${mode}_reset`\n    Parameters: any[]\n    ReturnType: void\n  },\n  /**\n   * @description Modifies the balance of an account.\n   * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_setbalance\n   */\n  {\n    Method: `${mode}_setBalance`\n    Parameters: [\n      /** The address of the target account. */\n      address: Address,\n      /** Amount to send in wei. */\n      balance: Quantity,\n    ]\n    ReturnType: void\n  },\n  /**\n   * @description Modifies the bytecode stored at an account's address.\n   * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_setcode\n   */\n  {\n    Method: `${mode}_setCode`\n    Parameters: [\n      /** The address of the contract. */\n      address: Address,\n      /** Data bytecode. */\n      data: string,\n    ]\n    ReturnType: void\n  },\n  /**\n   * @description Sets the coinbase address to be used in new blocks.\n   * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_setcoinbase\n   */\n  {\n    Method: `${mode}_setCoinbase`\n    Parameters: [\n      /** The address to set as the coinbase address. */\n      address: Address,\n    ]\n    ReturnType: void\n  },\n  /**\n   * @description Enable or disable logging on the test node network.\n   * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_setcoinbase\n   */\n  {\n    Method: `${mode}_setLoggingEnabled`\n    Parameters: [enabled: boolean]\n    ReturnType: void\n  },\n  /**\n   * @description Change the minimum gas price accepted by the network (in wei).\n   * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_setmingasprice\n   */\n  {\n    Method: `${mode}_setMinGasPrice`\n    Parameters: [gasPrice: Quantity]\n    ReturnType: void\n  },\n  /**\n   * @description Sets the base fee of the next block.\n   * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_setnextblockbasefeepergas\n   */\n  {\n    Method: `${mode}_setNextBlockBaseFeePerGas`\n    Parameters: [baseFeePerGas: Quantity]\n    ReturnType: void\n  },\n  /**\n   * @description Modifies an account's nonce by overwriting it.\n   * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_setnonce\n   */\n  {\n    Method: `${mode}_setNonce`\n    Parameters: [\n      /** The account address. */\n      address: Address,\n      /** The new nonce. */\n      nonce: Quantity,\n    ]\n    ReturnType: void\n  },\n  /**\n   * @description Sets the backend RPC URL.\n   */\n  {\n    Method: `${mode}_setRpcUrl`\n    Parameters: [url: string]\n    ReturnType: void\n  },\n  /**\n   * @description Writes a single position of an account's storage.\n   * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_setstorageat\n   */\n  {\n    Method: `${mode}_setStorageAt`\n    Parameters: [\n      /** The account address. */\n      address: Address,\n      /** The storage position index. */\n      index: Quantity,\n      /** The storage value. */\n      value: Quantity,\n    ]\n    ReturnType: void\n  },\n  /**\n   * @description Use this method to stop impersonating an account after having previously used impersonateAccount.\n   * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_stopimpersonatingaccount\n   */\n  {\n    Method: `${mode}_stopImpersonatingAccount`\n    Parameters: [\n      /** The address to stop impersonating. */\n      address: Address,\n    ]\n    ReturnType: void\n  },\n  /**\n   * @description Jump forward in time by the given amount of time, in seconds.\n   * @link https://github.com/trufflesuite/ganache/blob/ef1858d5d6f27e4baeb75cccd57fb3dc77a45ae8/src/chains/ethereum/ethereum/RPC-METHODS.md#evm_increasetime\n   */\n  {\n    Method: `${mode}_increaseTime`\n    Parameters: [seconds: number]\n    ReturnType: Quantity\n  },\n  /**\n   * @description Modifies the balance of an account.\n   * @link https://ganache.dev/#evm_setAccountBalance\n   */\n  {\n    Method: 'evm_setAccountBalance'\n    Parameters: [\n      /** The address of the target account. */\n      address: Address,\n      /** Amount to send in wei. */\n      value: Quantity,\n    ]\n    ReturnType: void\n  },\n  /**\n   * @description Modifies the bytecode stored at an account's address.\n   * @link https://ganache.dev/#evm_setAccountCode\n   */\n  {\n    Method: 'evm_setAccountCode'\n    Parameters: [\n      /** The address of the contract. */\n      address: Address,\n      /** Data bytecode. */\n      data: string,\n    ]\n    ReturnType: void\n  },\n  /**\n   * @description Enables or disables, based on the single boolean argument, the automatic mining of new blocks with each new transaction submitted to the network.\n   * @link https://hardhat.org/hardhat-network/docs/reference#evm_setautomine\n   */\n  {\n    Method: 'evm_setAutomine'\n    Parameters: [boolean]\n    ReturnType: void\n  },\n  /**\n   * @description Sets the block's gas limit.\n   * @link https://hardhat.org/hardhat-network/docs/reference#evm_setblockgaslimit\n   */\n  {\n    Method: 'evm_setBlockGasLimit'\n    Parameters: [gasLimit: Quantity]\n    ReturnType: void\n  },\n  /**\n   * @description Jump forward in time by the given amount of time, in seconds.\n   * @link https://github.com/trufflesuite/ganache/blob/ef1858d5d6f27e4baeb75cccd57fb3dc77a45ae8/src/chains/ethereum/ethereum/RPC-METHODS.md#evm_increasetime\n   */\n  {\n    Method: 'evm_increaseTime'\n    Parameters: [seconds: Quantity]\n    ReturnType: Quantity\n  },\n  /**\n   * @description Similar to `evm_increaseTime` but sets a block timestamp `interval`.\n   * The timestamp of the next block will be computed as `lastBlock_timestamp` + `interval`\n   */\n  {\n    Method: `${mode}_setBlockTimestampInterval`\n    Parameters: [seconds: number]\n    ReturnType: void\n  },\n  /**\n   * @description Removes `setBlockTimestampInterval` if it exists\n   */\n  {\n    Method: `${mode}_removeBlockTimestampInterval`\n    Parameters?: undefined\n    ReturnType: void\n  },\n  /**\n   * @description Enables (with a numeric argument greater than 0) or disables (with a numeric argument equal to 0), the automatic mining of blocks at a regular interval of milliseconds, each of which will include all pending transactions.\n   * @link https://hardhat.org/hardhat-network/docs/reference#evm_setintervalmining\n   */\n  {\n    Method: 'evm_setIntervalMining'\n    Parameters: [number]\n    ReturnType: void\n  },\n  /**\n   * @description Set the timestamp of the next block.\n   * @link https://hardhat.org/hardhat-network/docs/reference#evm_setnextblocktimestamp\n   */\n  {\n    Method: 'evm_setNextBlockTimestamp'\n    Parameters: [Quantity]\n    ReturnType: void\n  },\n  /**\n   * @description Snapshot the state of the blockchain at the current block. Takes no parameters. Returns the id of the snapshot that was created.\n   * @link https://hardhat.org/hardhat-network/docs/reference#evm_snapshot\n   */\n  {\n    Method: 'evm_snapshot'\n    Parameters?: undefined\n    ReturnType: Quantity\n  },\n  /**\n   * @description Revert the state of the blockchain to a previous snapshot. Takes a single parameter, which is the snapshot id to revert to.\n   */\n  {\n    Method: 'evm_revert'\n    Parameters?: [id: Quantity] | undefined\n    ReturnType: void\n  },\n  /**\n   * @description Enables the automatic mining of new blocks with each new transaction submitted to the network.\n   * @link https://ganache.dev/#miner_start\n   */\n  {\n    Method: 'miner_start'\n    Parameters?: undefined\n    ReturnType: void\n  },\n  /**\n   * @description Disables the automatic mining of new blocks with each new transaction submitted to the network.\n   * @link https://ganache.dev/#miner_stop\n   */\n  {\n    Method: 'miner_stop'\n    Parameters?: undefined\n    ReturnType: void\n  },\n  /**\n   * @link https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-txpool#txpool-content\n   */\n  {\n    Method: 'txpool_content'\n    Parameters?: undefined\n    ReturnType: {\n      pending: Record\u003cAddress, Record\u003cstring, Transaction\u003e\u003e\n      queued: Record\u003cAddress, Record\u003cstring, Transaction\u003e\u003e\n    }\n  },\n  /**\n   * @link https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-txpool#txpool-inspect\n   */\n  {\n    Method: 'txpool_inspect'\n    Parameters?: undefined\n    ReturnType: {\n      pending: Record\u003cAddress, Record\u003cstring, string\u003e\u003e\n      queued: Record\u003cAddress, Record\u003cstring, string\u003e\u003e\n    }\n  },\n  /**\n   * @link https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-txpool#txpool-inspect\n   */\n  {\n    Method: 'txpool_status'\n    Parameters?: undefined\n    ReturnType: {\n      pending: Quantity\n      queued: Quantity\n    }\n  },\n  /**\n   * @description Returns whether the client is actively mining new blocks.\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_mining' })\n   * // =\u003e true\n   */\n  {\n    Method: 'eth_mining'\n    Parameters?: undefined\n    ReturnType: boolean\n  },\n  /**\n   * @description Advance the block number of the network by a certain number of blocks.\n   * @link https://ganache.dev/#evm_mine\n   */\n  {\n    Method: 'evm_mine'\n    Parameters?:\n      | [\n          {\n            /** Number of blocks to mine. */\n            blocks: Hex\n          },\n        ]\n      | undefined\n    ReturnType: void\n  },\n  /**\n   * @description Creates, signs, and sends a new transaction to the network regardless of the signature.\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_sendTransaction', params: [{ from: '0x...', to: '0x...', value: '0x...' }] })\n   * // =\u003e '0x...'\n   */\n  {\n    Method: 'eth_sendUnsignedTransaction'\n    Parameters: [transaction: TransactionRequest]\n    ReturnType: Hash\n  },\n]\n\nexport type WalletRpcSchema = [\n  /**\n   * @description Returns a list of addresses owned by this client\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_accounts' })\n   * // =\u003e ['0x0fB69...']\n   */\n  {\n    Method: 'eth_accounts'\n    Parameters?: undefined\n    ReturnType: Address[]\n  },\n  /**\n   * @description Returns the current chain ID associated with the wallet.\n   * @example\n   * provider.request({ method: 'eth_chainId' })\n   * // =\u003e '1'\n   */\n  {\n    Method: 'eth_chainId'\n    Parameters?: undefined\n    ReturnType: Quantity\n  },\n  /**\n   * @description Estimates the gas necessary to complete a transaction without submitting it to the network\n   *\n   * @example\n   * provider.request({\n   *  method: 'eth_estimateGas',\n   *  params: [{ from: '0x...', to: '0x...', value: '0x...' }]\n   * })\n   * // =\u003e '0x5208'\n   */\n  {\n    Method: 'eth_estimateGas'\n    Parameters:\n      | [transaction: TransactionRequest]\n      | [transaction: TransactionRequest, block: BlockNumber | BlockTag]\n      | [\n          transaction: TransactionRequest,\n          block: BlockNumber | BlockTag,\n          stateOverride: RpcStateOverride,\n        ]\n    ReturnType: Quantity\n  },\n  /**\n   * @description Fills a transaction with the necessary data to be signed.\n   *\n   * @example\n   * provider.request({ method: 'eth_fillTransaction', params: [{ from: '0x...', to: '0x...', value: '0x...' }] })\n   * // =\u003e '0x...'\n   */\n  {\n    Method: 'eth_fillTransaction'\n    Parameters: [transaction: TransactionRequest]\n    ReturnType: {\n      capabilities?: Record\u003cstring, unknown\u003e | undefined\n      raw: Hex\n      tx: Transaction\n    }\n  },\n  /**\n   * @description Requests that the user provides an Ethereum address to be identified by. Typically causes a browser extension popup to appear.\n   * @link https://eips.ethereum.org/EIPS/eip-1102\n   * @example\n   * provider.request({ method: 'eth_requestAccounts' }] })\n   * // =\u003e ['0x...', '0x...']\n   */\n  {\n    Method: 'eth_requestAccounts'\n    Parameters?: undefined\n    ReturnType: Address[]\n  },\n  /**\n   * @description Creates, signs, and sends a new transaction to the network\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_sendTransaction', params: [{ from: '0x...', to: '0x...', value: '0x...' }] })\n   * // =\u003e '0x...'\n   */\n  {\n    Method: 'eth_sendTransaction'\n    Parameters: [transaction: TransactionRequest]\n    ReturnType: Hash\n  },\n  /**\n   * @description Sends and already-signed transaction to the network\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_sendRawTransaction', params: ['0x...'] })\n   * // =\u003e '0x...'\n   */\n  {\n    Method: 'eth_sendRawTransaction'\n    Parameters: [signedTransaction: Hex]\n    ReturnType: Hash\n  },\n  /**\n   * @description Sends and already-signed transaction to the network synchronously\n   * @link https://eips.ethereum.org/EIPS/eip-7966\n   * @example\n   * provider.request({ method: 'eth_sendRawTransactionSync', params: ['0x...'] })\n   * // =\u003e '0x...'\n   */\n  {\n    Method: 'eth_sendRawTransactionSync'\n    Parameters:\n      | [signedTransaction: Hex]\n      | [signedTransaction: Hex, timeout: number]\n    ReturnType: TransactionReceipt\n  },\n  /**\n   * @description Calculates an Ethereum-specific signature in the form of `keccak256(\"\\x19Ethereum Signed Message:\\n\" + len(message) + message))`\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_sign', params: ['0x...', '0x...'] })\n   * // =\u003e '0x...'\n   */\n  {\n    Method: 'eth_sign'\n    Parameters: [\n      /** Address to use for signing */\n      address: Address,\n      /** Data to sign */\n      data: Hex,\n    ]\n    ReturnType: Hex\n  },\n  /**\n   * @description Signs a transaction that can be submitted to the network at a later time using with `eth_sendRawTransaction`\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_signTransaction', params: [{ from: '0x...', to: '0x...', value: '0x...' }] })\n   * // =\u003e '0x...'\n   */\n  {\n    Method: 'eth_signTransaction'\n    Parameters: [request: TransactionRequest]\n    ReturnType: Hex\n  },\n  /**\n   * @description Calculates an Ethereum-specific signature in the form of `keccak256(\"\\x19Ethereum Signed Message:\\n\" + len(message) + message))`\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_signTypedData_v4', params: [{ from: '0x...', data: [{ type: 'string', name: 'message', value: 'hello world' }] }] })\n   * // =\u003e '0x...'\n   */\n  {\n    Method: 'eth_signTypedData_v4'\n    Parameters: [\n      /** Address to use for signing */\n      address: Address,\n      /** Message to sign containing type information, a domain separator, and data */\n      message: string,\n    ]\n    ReturnType: Hex\n  },\n  /**\n   * @description Returns information about the status of this client’s network synchronization\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'eth_syncing' })\n   * // =\u003e { startingBlock: '0x...', currentBlock: '0x...', highestBlock: '0x...' }\n   */\n  {\n    Method: 'eth_syncing'\n    Parameters?: undefined\n    ReturnType: NetworkSync | false\n  },\n  /**\n   * @description Calculates an Ethereum-specific signature in the form of `keccak256(\"\\x19Ethereum Signed Message:\\n\" + len(message) + message))`\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'personal_sign', params: ['0x...', '0x...'] })\n   * // =\u003e '0x...'\n   */\n  {\n    Method: 'personal_sign'\n    Parameters: [\n      /** Data to sign */\n      data: Hex,\n      /** Address to use for signing */\n      address: Address,\n    ]\n    ReturnType: Hex\n  },\n  /**\n   * @description Add an Ethereum chain to the wallet.\n   * @link https://eips.ethereum.org/EIPS/eip-3085\n   * @example\n   * provider.request({ method: 'wallet_addEthereumChain', params: [{ chainId: 1, rpcUrl: 'https://mainnet.infura.io/v3/...' }] })\n   * // =\u003e { ... }\n   */\n  {\n    Method: 'wallet_addEthereumChain'\n    Parameters: [chain: AddEthereumChainParameter]\n    ReturnType: null\n  },\n  /**\n   *\n   */\n  {\n    Method: 'wallet_addSubAccount'\n    Parameters: [\n      {\n        account: OneOf\u003c\n          | {\n              keys: readonly {\n                publicKey: Hex\n                type: 'address' | 'p256' | 'webcrypto-p256' | 'webauthn-p256'\n              }[]\n              type: 'create'\n            }\n          | {\n              address: Address\n              chainId?: number | undefined\n              type: 'deployed'\n            }\n          | {\n              address: Address\n              chainId?: number | undefined\n              factory: Address\n              factoryData: Hex\n              type: 'undeployed'\n            }\n        \u003e\n        version: string\n      },\n    ]\n    ReturnType: {\n      address: Address\n      factory?: Address | undefined\n      factoryData?: Hex | undefined\n    }\n  },\n  /**\n   * @description Requests to connect account(s).\n   * @link https://github.com/ethereum/ERCs/blob/abd1c9f4eda2d6ad06ade0e3af314637a27d1ee7/ERCS/erc-7846.md\n   * @example\n   * provider.request({ method: 'wallet_connect' })\n   * // =\u003e { ... }\n   */\n  {\n    Method: 'wallet_connect'\n    Parameters: [\n      {\n        capabilities?: Capabilities | undefined\n        version: string\n      },\n    ]\n    ReturnType: {\n      accounts: readonly {\n        address: Address\n        capabilities?: Capabilities | undefined\n      }[]\n    }\n  },\n  /**\n   * @description Disconnects connected account(s).\n   * @link https://github.com/ethereum/ERCs/blob/abd1c9f4eda2d6ad06ade0e3af314637a27d1ee7/ERCS/erc-7846.md\n   * @example\n   * provider.request({ method: 'wallet_disconnect' })\n   */\n  {\n    Method: 'wallet_disconnect'\n    Parameters?: undefined\n    ReturnType: void\n  },\n  /**\n   * @description Returns the assets owned by the wallet.\n   * @link https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7811.md\n   * @example\n   * provider.request({ method: 'wallet_getAssets', params: [...] })\n   * // =\u003e { ... }\n   */\n  {\n    Method: 'wallet_getAssets'\n    Parameters?: [WalletGetAssetsParameters]\n    ReturnType: WalletGetAssetsReturnType\n  },\n  /**\n   * @description Returns the status of a call batch that was sent via `wallet_sendCalls`.\n   * @link https://eips.ethereum.org/EIPS/eip-5792\n   * @example\n   * provider.request({ method: 'wallet_getCallsStatus' })\n   * // =\u003e { ... }\n   */\n  {\n    Method: 'wallet_getCallsStatus'\n    Parameters?: [string]\n    ReturnType: WalletGetCallsStatusReturnType\n  },\n  /**\n   * @description Gets the connected wallet's capabilities.\n   * @link https://eips.ethereum.org/EIPS/eip-5792\n   * @example\n   * provider.request({ method: 'wallet_getCapabilities' })\n   * // =\u003e { ... }\n   */\n  {\n    Method: 'wallet_getCapabilities'\n    Parameters?:\n      | readonly []\n      | readonly [Address | undefined]\n      | readonly [Address | undefined, readonly Hex[] | undefined]\n      | undefined\n    ReturnType: Prettify\u003cChainIdToCapabilities\u003e\n  },\n  /**\n   * @description Gets the wallets current permissions.\n   * @link https://eips.ethereum.org/EIPS/eip-2255\n   * @example\n   * provider.request({ method: 'wallet_getPermissions' })\n   * // =\u003e { ... }\n   */\n  {\n    Method: 'wallet_getPermissions'\n    Parameters?: undefined\n    ReturnType: WalletPermission[]\n  },\n  /**\n   * @description Requests permissions from a wallet\n   * @link https://eips.ethereum.org/EIPS/eip-7715\n   * @example\n   * provider.request({ method: 'wallet_grantPermissions', params: [{ ... }] })\n   * // =\u003e { ... }\n   */\n  {\n    Method: 'wallet_grantPermissions'\n    Parameters?: [WalletGrantPermissionsParameters]\n    ReturnType: Prettify\u003cWalletGrantPermissionsReturnType\u003e\n  },\n  /**\n   * @description Requests the given permissions from the user.\n   * @link https://eips.ethereum.org/EIPS/eip-2255\n   * @example\n   * provider.request({ method: 'wallet_requestPermissions', params: [{ eth_accounts: {} }] })\n   * // =\u003e { ... }\n   */\n  {\n    Method: 'wallet_requestPermissions'\n    Parameters: [permissions: { eth_accounts: Record\u003cstring, any\u003e }]\n    ReturnType: WalletPermission[]\n  },\n  /**\n   * @description Revokes the given permissions from the user.\n   * @link https://github.com/MetaMask/metamask-improvement-proposals/blob/main/MIPs/mip-2.md\n   * @example\n   * provider.request({ method: 'wallet_revokePermissions', params: [{ eth_accounts: {} }] })\n   * // =\u003e { ... }\n   */\n  {\n    Method: 'wallet_revokePermissions'\n    Parameters: [permissions: { eth_accounts: Record\u003cstring, any\u003e }]\n    ReturnType: null\n  },\n  /**\n   * @description Requests the connected wallet to send a batch of calls.\n   * @link https://eips.ethereum.org/EIPS/eip-5792\n   * @example\n   * provider.request({ method: 'wallet_sendCalls' })\n   * // =\u003e { ... }\n   */\n  {\n    Method: 'wallet_sendCalls'\n    Parameters?: WalletSendCallsParameters\n    ReturnType: WalletSendCallsReturnType\n  },\n  /**\n   * @description Creates, signs, and sends a new transaction to the network\n   * @link https://eips.ethereum.org/EIPS/eip-1474\n   * @example\n   * provider.request({ method: 'wallet_sendTransaction', params: [{ from: '0x...', to: '0x...', value: '0x...' }] })\n   * // =\u003e '0x...'\n   */\n  {\n    Method: 'wallet_sendTransaction'\n    Parameters: [transaction: TransactionRequest]\n    ReturnType: Hash\n  },\n  /**\n   * @description Requests for the wallet to show information about a call batch\n   * that was sent via `wallet_sendCalls`.\n   * @link https://eips.ethereum.org/EIPS/eip-5792\n   * @example\n   * provider.request({ method: 'wallet_showCallsStatus', params: ['...'] })\n   */\n  {\n    Method: 'wallet_showCallsStatus'\n    Parameters?: [string]\n    ReturnType: void\n  },\n  /**\n   * @description Switch the wallet to the given Ethereum chain.\n   * @link https://eips.ethereum.org/EIPS/eip-3326\n   * @example\n   * provider.request({ method: 'wallet_switchEthereumChain', params: [{ chainId: '0xf00' }] })\n   * // =\u003e { ... }\n   */\n  {\n    Method: 'wallet_switchEthereumChain'\n    Parameters: [chain: { chainId: string }]\n    ReturnType: null\n  },\n  /**\n   * @description Requests that the user tracks the token in their wallet. Returns a boolean indicating if the token was successfully added.\n   * @link https://eips.ethereum.org/EIPS/eip-747\n   * @example\n   * provider.request({ method: 'wallet_watchAsset' }] })\n   * // =\u003e true\n   */\n  {\n    Method: 'wallet_watchAsset'\n    Parameters: WatchAssetParams\n    ReturnType: boolean\n  },\n]\n\n///////////////////////////////////////////////////////////////////////////\n// Utils\n\nexport type RpcSchema = readonly {\n  Method: string\n  Parameters?: unknown | undefined\n  ReturnType: unknown\n}[]\n\nexport type RpcSchemaOverride = Omit\u003cRpcSchema[number], 'Method'\u003e\n\nexport type EIP1193Parameters\u003c\n  rpcSchema extends RpcSchema | undefined = undefined,\n\u003e = rpcSchema extends RpcSchema\n  ? {\n      [K in keyof rpcSchema]: Prettify\u003c\n        {\n          method: rpcSchema[K] extends rpcSchema[number]\n            ? rpcSchema[K]['Method']\n            : never\n        } \u0026 (rpcSchema[K] extends rpcSchema[number]\n          ? rpcSchema[K]['Parameters'] extends undefined\n            ? { params?: undefined }\n            : { params: rpcSchema[K]['Parameters'] }\n          : never)\n      \u003e\n    }[number]\n  : {\n      method: string\n      params?: unknown | undefined\n    }\n\nexport type EIP1193RequestOptions = {\n  /** Deduplicate in-flight requests. */\n  dedupe?: boolean | undefined\n  /** Methods to include or exclude from executing RPC requests. */\n  methods?:\n    | OneOf\u003c\n        | {\n            include?: string[] | undefined\n          }\n        | {\n            exclude?: string[] | undefined\n          }\n      \u003e\n    | undefined\n  /** The base delay (in ms) between retries. */\n  retryDelay?: number | undefined\n  /** The max number of times to retry. */\n  retryCount?: number | undefined\n  /** Abort signal to cancel the request. */\n  signal?: AbortSignal | undefined\n  /** Unique identifier for the request. */\n  uid?: string | undefined\n}\n\ntype DerivedRpcSchema\u003c\n  rpcSchema extends RpcSchema | undefined,\n  rpcSchemaOverride extends RpcSchemaOverride | undefined,\n\u003e = rpcSchemaOverride extends RpcSchemaOverride\n  ? [rpcSchemaOverride \u0026 { Method: string }]\n  : rpcSchema\n\nexport type EIP1193RequestFn\u003c\n  rpcSchema extends RpcSchema | undefined = undefined,\n  raw extends boolean = false,\n\u003e = \u003c\n  rpcSchemaOverride extends RpcSchemaOverride | undefined = undefined,\n  _parameters extends EIP1193Parameters\u003c\n    DerivedRpcSchema\u003crpcSchema, rpcSchemaOverride\u003e\n  \u003e = EIP1193Parameters\u003cDerivedRpcSchema\u003crpcSchema, rpcSchemaOverride\u003e\u003e,\n  _returnType = DerivedRpcSchema\u003crpcSchema, rpcSchemaOverride\u003e extends RpcSchema\n    ? raw extends true\n      ? OneOf\u003c\n          | {\n              result: Extract\u003c\n                DerivedRpcSchema\u003crpcSchema, rpcSchemaOverride\u003e[number],\n                { Method: _parameters['method'] }\n              \u003e['ReturnType']\n            }\n          | { error: Rpc.ErrorObject }\n        \u003e\n      : Extract\u003c\n          DerivedRpcSchema\u003crpcSchema, rpcSchemaOverride\u003e[number],\n          { Method: _parameters['method'] }\n        \u003e['ReturnType']\n    : raw extends true\n      ? OneOf\u003c\n          | {\n              result: unknown\n            }\n          | {\n              error: Rpc.ErrorObject\n            }\n        \u003e\n      : unknown,\n\u003e(\n  args: _parameters,\n  options?: EIP1193RequestOptions | undefined,\n) =\u003e Promise\u003c_returnType\u003e\n","import type { Abi } from 'abitype'\n\nimport {\n  AbiConstructorNotFoundError,\n  type AbiConstructorNotFoundErrorType,\n  AbiConstructorParamsNotFoundError,\n  type AbiConstructorParamsNotFoundErrorType,\n} from '../../errors/abi.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { ContractConstructorArgs } from '../../types/contract.js'\nimport type { Hex } from '../../types/misc.js'\nimport {\n  type DecodeAbiParametersErrorType,\n  decodeAbiParameters,\n} from './decodeAbiParameters.js'\n\nconst docsPath = '/docs/contract/decodeDeployData'\n\nexport type DecodeDeployDataParameters\u003c\n  abi extends Abi | readonly unknown[] = Abi,\n\u003e = {\n  abi: abi\n  bytecode: Hex\n  data: Hex\n}\n\nexport type DecodeDeployDataReturnType\u003c\n  abi extends Abi | readonly unknown[] = Abi,\n  ///\n  allArgs = ContractConstructorArgs\u003cabi\u003e,\n\u003e = {\n  bytecode: Hex\n  args: allArgs\n}\n\nexport type DecodeDeployDataErrorType =\n  | AbiConstructorNotFoundErrorType\n  | AbiConstructorParamsNotFoundErrorType\n  | DecodeAbiParametersErrorType\n  | ErrorType\n\nexport function decodeDeployData\u003cconst abi extends Abi | readonly unknown[]\u003e(\n  parameters: DecodeDeployDataParameters\u003cabi\u003e,\n): DecodeDeployDataReturnType\u003cabi\u003e {\n  const { abi, bytecode, data } = parameters as DecodeDeployDataParameters\n  if (data === bytecode) return { bytecode } as DecodeDeployDataReturnType\u003cabi\u003e\n\n  const description = abi.find((x) =\u003e 'type' in x \u0026\u0026 x.type === 'constructor')\n  if (!description) throw new AbiConstructorNotFoundError({ docsPath })\n  if (!('inputs' in description))\n    throw new AbiConstructorParamsNotFoundError({ docsPath })\n  if (!description.inputs || description.inputs.length === 0)\n    throw new AbiConstructorParamsNotFoundError({ docsPath })\n\n  const args = decodeAbiParameters(\n    description.inputs,\n    `0x${data.replace(bytecode, '')}`,\n  )\n  return { args, bytecode } as unknown as DecodeDeployDataReturnType\u003cabi\u003e\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\nimport { type CreateCursorErrorType, createCursor } from '../cursor.js'\nimport { type HexToBytesErrorType, hexToBytes } from '../encoding/toBytes.js'\nimport { type BytesToHexErrorType, bytesToHex } from '../encoding/toHex.js'\n\ntype To = 'hex' | 'bytes'\n\nexport type FromBlobsParameters\u003c\n  blobs extends readonly Hex[] | readonly ByteArray[] =\n    | readonly Hex[]\n    | readonly ByteArray[],\n  to extends To | undefined = undefined,\n\u003e = {\n  /** Blobs to transform to data. */\n  blobs: blobs | readonly Hex[] | readonly ByteArray[]\n  to?: to | To | undefined\n}\n\nexport type FromBlobsReturnType\u003cto extends To\u003e =\n  | (to extends 'bytes' ? ByteArray : never)\n  | (to extends 'hex' ? Hex : never)\n\nexport type FromBlobsErrorType =\n  | BytesToHexErrorType\n  | CreateCursorErrorType\n  | HexToBytesErrorType\n  | ErrorType\n\nexport function fromBlobs\u003c\n  const blobs extends readonly Hex[] | readonly ByteArray[],\n  to extends To =\n    | (blobs extends readonly Hex[] ? 'hex' : never)\n    | (blobs extends readonly ByteArray[] ? 'bytes' : never),\n\u003e(parameters: FromBlobsParameters\u003cblobs, to\u003e): FromBlobsReturnType\u003cto\u003e {\n  const to =\n    parameters.to ?? (typeof parameters.blobs[0] === 'string' ? 'hex' : 'bytes')\n  const blobs = (\n    typeof parameters.blobs[0] === 'string'\n      ? parameters.blobs.map((x) =\u003e hexToBytes(x as Hex))\n      : parameters.blobs\n  ) as ByteArray[]\n\n  const length = blobs.reduce((length, blob) =\u003e length + blob.length, 0)\n  const data = createCursor(new Uint8Array(length))\n  let active = true\n\n  for (const blob of blobs) {\n    const cursor = createCursor(blob)\n    while (active \u0026\u0026 cursor.position \u003c blob.length) {\n      // First byte will be a zero 0x00 byte – we can skip.\n      cursor.incrementPosition(1)\n\n      let consume = 31\n      if (blob.length - cursor.position \u003c 31)\n        consume = blob.length - cursor.position\n\n      for (const _ in Array.from({ length: consume })) {\n        const byte = cursor.readByte()\n        const isTerminator =\n          byte === 0x80 \u0026\u0026 !cursor.inspectBytes(cursor.remaining).includes(0x80)\n        if (isTerminator) {\n          active = false\n          break\n        }\n        data.pushByte(byte)\n      }\n    }\n  }\n\n  const trimmedData = data.bytes.slice(0, data.position)\n  return (\n    to === 'hex' ? bytesToHex(trimmedData) : trimmedData\n  ) as FromBlobsReturnType\u003cto\u003e\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { BlobSidecars } from '../../types/eip4844.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\nimport {\n  type CommitmentToVersionedHashErrorType,\n  commitmentToVersionedHash,\n} from './commitmentToVersionedHash.js'\n\ntype To = 'hex' | 'bytes'\n\nexport type SidecarsToVersionedHashesParameters\u003c\n  sidecars extends BlobSidecars = BlobSidecars,\n  to extends To | undefined = undefined,\n\u003e = {\n  /** Sidecars from blobs. */\n  sidecars: sidecars | BlobSidecars\n  /** Return type. */\n  to?: to | To | undefined\n  /** Version to tag onto the hashes. */\n  version?: number | undefined\n}\n\nexport type SidecarsToVersionedHashesReturnType\u003cto extends To\u003e =\n  | (to extends 'bytes' ? readonly ByteArray[] : never)\n  | (to extends 'hex' ? readonly Hex[] : never)\n\nexport type SidecarsToVersionedHashesErrorType =\n  | CommitmentToVersionedHashErrorType\n  | ErrorType\n\n/**\n * Transforms a list of sidecars to their versioned hashes.\n *\n * @example\n * ```ts\n * import { toBlobSidecars, sidecarsToVersionedHashes, stringToHex } from 'viem'\n *\n * const sidecars = toBlobSidecars({ data: stringToHex('hello world') })\n * const versionedHashes = sidecarsToVersionedHashes({ sidecars })\n * ```\n */\nexport function sidecarsToVersionedHashes\u003c\n  const sidecars extends BlobSidecars,\n  to extends To =\n    | (sidecars extends BlobSidecars\u003cHex\u003e ? 'hex' : never)\n    | (sidecars extends BlobSidecars\u003cByteArray\u003e ? 'bytes' : never),\n\u003e(\n  parameters: SidecarsToVersionedHashesParameters\u003csidecars, to\u003e,\n): SidecarsToVersionedHashesReturnType\u003cto\u003e {\n  const { sidecars, version } = parameters\n\n  const to =\n    parameters.to ?? (typeof sidecars[0].blob === 'string' ? 'hex' : 'bytes')\n\n  const hashes: Uint8Array[] | Hex[] = []\n  for (const { commitment } of sidecars) {\n    hashes.push(\n      commitmentToVersionedHash({\n        commitment,\n        to,\n        version,\n      }) as any,\n    )\n  }\n  return hashes as any\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { Kzg } from '../../types/kzg.js'\n\nexport type DefineKzgParameters = Kzg\nexport type DefineKzgReturnType = Kzg\nexport type DefineKzgErrorType = ErrorType\n\n/**\n * Defines a KZG interface.\n *\n * @example\n * ```ts\n * import * as cKzg from 'c-kzg'\n * import { defineKzg } from 'viem'\n * import { mainnetTrustedSetupPath } from 'viem/node'\n *\n * cKzg.loadTrustedSetup(mainnetTrustedSetupPath)\n *\n * const kzg = defineKzg(cKzg)\n * ```\n */\nexport function defineKzg({\n  blobToKzgCommitment,\n  computeBlobKzgProof,\n}: DefineKzgParameters): DefineKzgReturnType {\n  return {\n    blobToKzgCommitment,\n    computeBlobKzgProof,\n  }\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport {\n  type DefineKzgErrorType,\n  type DefineKzgParameters,\n  type DefineKzgReturnType,\n  defineKzg,\n} from './defineKzg.js'\n\nexport type SetupKzgParameters = DefineKzgParameters \u0026 {\n  loadTrustedSetup(path: string): void\n}\nexport type SetupKzgReturnType = DefineKzgReturnType\nexport type SetupKzgErrorType = DefineKzgErrorType | ErrorType\n\n/**\n * Sets up and returns a KZG interface.\n *\n * @example\n * ```ts\n * import * as cKzg from 'c-kzg'\n * import { setupKzg } from 'viem'\n * import { mainnetTrustedSetupPath } from 'viem/node'\n *\n * const kzg = setupKzg(cKzg, mainnetTrustedSetupPath)\n * ```\n */\nexport function setupKzg(\n  parameters: SetupKzgParameters,\n  path: string,\n): SetupKzgReturnType {\n  try {\n    parameters.loadTrustedSetup(path)\n  } catch (e) {\n    const error = e as Error\n    if (!error.message.includes('trusted setup is already loaded')) throw error\n  }\n  return defineKzg(parameters)\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { CompactSignature, Signature } from '../../types/misc.js'\nimport { type HexToBytesErrorType, hexToBytes } from '../encoding/toBytes.js'\nimport { type BytesToHexErrorType, bytesToHex } from '../encoding/toHex.js'\n\nexport type CompactSignatureToSignatureErrorType =\n  | BytesToHexErrorType\n  | HexToBytesErrorType\n  | ErrorType\n\n/**\n * @description Converts an [EIP-2098 compact signature](https://eips.ethereum.org/EIPS/eip-2098) into signature format.\n *\n * @param signature The compact signature to convert.\n * @returns The compact signature in signature format.\n *\n * @example\n * compactSignatureToSignature({\n *   r: '0x68a020a209d3d56c46f38cc50a33f704f4a9a10a59377f8dd762ac66910e9b90',\n *   yParityAndS: '0x7e865ad05c4035ab5792787d4a0297a43617ae897930a6fe4d822b8faea52064',\n * })\n * // {\n * //   r: '0x68a020a209d3d56c46f38cc50a33f704f4a9a10a59377f8dd762ac66910e9b90',\n * //   s: '0x7e865ad05c4035ab5792787d4a0297a43617ae897930a6fe4d822b8faea52064',\n * //   v: 27n\n * // }\n */\nexport function compactSignatureToSignature({\n  r,\n  yParityAndS,\n}: CompactSignature): Signature {\n  const yParityAndS_bytes = hexToBytes(yParityAndS)\n  const yParity = yParityAndS_bytes[0] \u0026 0x80 ? 1 : 0\n  const s = yParityAndS_bytes\n  if (yParity === 1) s[0] \u0026= 0x7f\n  return { r, s: bytesToHex(s), yParity }\n}\n","import { secp256k1 } from '@noble/curves/secp256k1'\n\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { CompactSignature, Hex } from '../../types/misc.js'\nimport { type NumberToHexErrorType, numberToHex } from '../encoding/toHex.js'\n\nexport type ParseCompactSignatureErrorType = NumberToHexErrorType | ErrorType\n\n/**\n * @description Parses a hex formatted compact signature into a structured compact signature.\n *\n * @param signatureHex Signature in hex format.\n * @returns The structured signature.\n *\n * @example\n * parseCompactSignature('0x6e100a352ec6ad1b70802290e18aeed190704973570f3b8ed42cb9808e2ea6bf4a90a229a244495b41890987806fcbd2d5d23fc0dbe5f5256c2613c039d76db81c')\n * // { r: '0x...', yParityAndS: '0x...' }\n */\nexport function parseCompactSignature(signatureHex: Hex): CompactSignature {\n  const { r, s } = secp256k1.Signature.fromCompact(signatureHex.slice(2, 130))\n  return {\n    r: numberToHex(r, { size: 32 }),\n    yParityAndS: numberToHex(s, { size: 32 }),\n  }\n}\n","import type { Address } from 'abitype'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex, Signature } from '../../types/misc.js'\nimport type { TransactionSerialized } from '../../types/transaction.js'\nimport { type Keccak256ErrorType, keccak256 } from '../hash/keccak256.js'\nimport { parseTransaction } from '../transaction/parseTransaction.js'\nimport {\n  type SerializeTransactionErrorType,\n  serializeTransaction,\n} from '../transaction/serializeTransaction.js'\nimport {\n  type RecoverAddressErrorType,\n  recoverAddress,\n} from './recoverAddress.js'\nimport type { SerializeSignatureErrorType } from './serializeSignature.js'\n\nexport type RecoverTransactionAddressParameters = {\n  serializedTransaction: TransactionSerialized\n  signature?: Hex | ByteArray | Signature\n}\n\nexport type RecoverTransactionAddressReturnType = Address\n\nexport type RecoverTransactionAddressErrorType =\n  | SerializeTransactionErrorType\n  | RecoverAddressErrorType\n  | Keccak256ErrorType\n  | SerializeSignatureErrorType\n  | ErrorType\n\nexport async function recoverTransactionAddress(\n  parameters: RecoverTransactionAddressParameters,\n): Promise\u003cRecoverTransactionAddressReturnType\u003e {\n  const { serializedTransaction, signature: signature_ } = parameters\n\n  const transaction = parseTransaction(serializedTransaction)\n\n  const signature = signature_ ?? {\n    r: transaction.r!,\n    s: transaction.s!,\n    v: transaction.v!,\n    yParity: transaction.yParity!,\n  }\n\n  const serialized = serializeTransaction({\n    ...transaction,\n    r: undefined,\n    s: undefined,\n    v: undefined,\n    yParity: undefined,\n    sidecars: undefined,\n  })\n\n  return await recoverAddress({\n    hash: keccak256(serialized),\n    signature,\n  })\n}\n","import { secp256k1 } from '@noble/curves/secp256k1'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { CompactSignature, Hex } from '../../types/misc.js'\nimport { type HexToBigIntErrorType, hexToBigInt } from '../encoding/fromHex.js'\n\nexport type SerializeCompactSignatureErrorType =\n  | HexToBigIntErrorType\n  | ErrorType\n\n/**\n * @description Converts an [EIP-2098 compact signature](https://eips.ethereum.org/EIPS/eip-2098) into hex format.\n *\n * @param signature The compact signature to convert.\n * @returns The compact signature in hex format.\n *\n * @example\n * serializeCompactSignature({\n *   r: '0x68a020a209d3d56c46f38cc50a33f704f4a9a10a59377f8dd762ac66910e9b90',\n *   yParityAndS: '0x7e865ad05c4035ab5792787d4a0297a43617ae897930a6fe4d822b8faea52064',\n * })\n * // \"0x6e100a352ec6ad1b70802290e18aeed190704973570f3b8ed42cb9808e2ea6bf4a90a229a244495b41890987806fcbd2d5d23fc0dbe5f5256c2613c039d76db81c\"\n */\nexport function serializeCompactSignature({\n  r,\n  yParityAndS,\n}: CompactSignature): Hex {\n  return `0x${new secp256k1.Signature(\n    hexToBigInt(r),\n    hexToBigInt(yParityAndS),\n  ).toCompactHex()}`\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { CompactSignature, Signature } from '../../types/misc.js'\nimport { type HexToBytesErrorType, hexToBytes } from '../encoding/toBytes.js'\nimport { type BytesToHexErrorType, bytesToHex } from '../encoding/toHex.js'\n\nexport type SignatureToCompactSignatureErrorType =\n  | HexToBytesErrorType\n  | BytesToHexErrorType\n  | ErrorType\n\n/**\n * @description Converts a signature into an [EIP-2098 compact signature](https://eips.ethereum.org/EIPS/eip-2098).\n *\n * @param signature The signature to convert.\n * @returns The signature in compact format.\n *\n * @example\n * signatureToCompactSignature({\n *   r: '0x68a020a209d3d56c46f38cc50a33f704f4a9a10a59377f8dd762ac66910e9b90',\n *   s: '0x7e865ad05c4035ab5792787d4a0297a43617ae897930a6fe4d822b8faea52064',\n *   yParity: 0\n * })\n * // {\n * //   r: '0x68a020a209d3d56c46f38cc50a33f704f4a9a10a59377f8dd762ac66910e9b90',\n * //   yParityAndS: '0x7e865ad05c4035ab5792787d4a0297a43617ae897930a6fe4d822b8faea52064'\n * // }\n */\nexport function signatureToCompactSignature(\n  signature: Signature,\n): CompactSignature {\n  const { r, s, v, yParity } = signature\n  const yParity_ = Number(yParity ?? v! - 27n)\n  let yParityAndS = s\n  if (yParity_ === 1) {\n    const bytes = hexToBytes(s)\n    bytes[0] |= 0x80\n    yParityAndS = bytesToHex(bytes)\n  }\n  return { r, yParityAndS }\n}\n"],"version":3}
